Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Beyond top: Command-Line Monitoring on the JVM ...
Search
Colin Jones
October 29, 2015
Programming
710
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Beyond top: Command-Line Monitoring on the JVM (JavaOne 2015)
A session from JavaOne 2015
Colin Jones
October 29, 2015
More Decks by Colin Jones
See All by Colin Jones
A Bug's Life: What if `select` is Broken After All?
trptcolin
0
200
Underestimated costs of microservice architectures
trptcolin
3
1.6k
FP vs. OOP: Beyond the Bikeshed
trptcolin
0
480
Diving into the Details with DTrace! (RubyConf 2016 edition)
trptcolin
2
550
Diving into the Details with DTrace
trptcolin
3
550
Adopting FP: the good, the familiar, and the unknown
trptcolin
0
290
Finding out what's *really* going on, with DTrace!
trptcolin
1
420
Beyond top: Command-Line Monitoring on the JVM (ClojureRemote)
trptcolin
0
180
ZooKeeper: Wait-free coordination for Internet-scale systems
trptcolin
2
240
Other Decks in Programming
See All in Programming
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.4k
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
130
ALB ログから Trace を気合で繋げる技術
fohte
7
880
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
640
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
580
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
130
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.6k
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
140
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
AIの中の人になってみる
htkym
0
170
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
640
ラッコキーワード サービス紹介資料
rakko
1
4.8M
We Are The Robots
honzajavorek
0
350
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Automating Front-end Workflow
addyosmani
1369
210k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Building Applications with DynamoDB
mza
96
7.2k
Into the Great Unknown - MozCon
thekraken
41
2.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Marketing to machines
jonoalderson
1
5.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Transcript
Beyond top(1) Command-Line Monitoring on the JVM Colin Jones @trptcolin
8th Light
None
What to expect
command-line tooling
on the JVM
introspection & serviceability
--all-flags=false
war stories
real-life usage (well, re-enacted anyway)
A long time ago in a software shop far, far
away…
Things are going pretty well
What does this thing look like? app-architecture Postgres Web /
API Application Server Load Balancer Periodic Job Application Server 3rd-party Service A 3rd-party Service B Monitored email account End users: native mobile app Admin users: desktop browsers
But strange things are afoot
the server sometimes gets really slow
the team has to manually restart the application server
incident response time is ~5 minutes
Yes, strange things are afoot
Pain, frustration, anger
Just the facts
sometimes, things get slow
all requests seem to be affected
the JVM stays up
restart the JVM and everything is fine
What could it be?
Demo
More facts, please!
constant full GCs
what’s in the heap
what application code was running
The right tools for the job
vmstat system-level: CPU, memory, disk, context switching
top per-process: CPU & memory
jps what’s our PID?
jstack status of all threads (right now-ish!)
jcmd what can’t it do?! jcmd [PID] help (sorry, JVM
6 users: see jinfo/jmap/jstack)
jstat GC classloader compiler
Mystery solved!
Now “just” fix it
idea 1: eliminate the leak
idea 2: eliminate the cache altogether?
idea 3: delete the feature
idea 4: full-text search engine
So we’re good now… until the next incident
Lessons
“it’s slow” could mean lots of things
“high CPU” could mean lots of things
collecting data is crucial in a crisis
reproducing the issue helps me sleep at night
Other “right tools for the job”
Heap analyzers
Profilers
Constant monitoring & alerting
Dynamic tracing
Learning more
Books
operators are standing by! man jstat man jstack jcmd [PID]
help [COMMAND] etc.
Thank you! Colin Jones @trptcolin 8th Light