-
A list of Linux tools and diagnostic utilities for OS-based investigations
-
Measure CPU used by the JVM:
$ ps -efo cputime -p <pid_Spark_JVM>
- Get the metrics directly from
/proc/<pid>/stat
or/proc/<pid>/status
-
Find process PID for JVM applications (e.g. Spark):
jps | grep SparkSubmit # use this to find pid_Spark_JVM
-
Monitor system usage per process with
pidstat
pidstat 3 10
# measure all processespidstat -T ALL -p <pid> 10 10
# measure threads of a given pid
-
system-wide tools
vmstat 3 10
mpstat -P ALL 3 10
sar 3 10
top
htop
atop
dstat
-
tiptop
- measures CPU metrics, including IPC, can be run with -p option
-
Measure I/O per pid
pidstat -d -T ALL -p <pid> 3 10
# measure also I/Oiotop -p <pid> 3 10
-
Measure I/O
sar -d 3 10
iostat -xc 3 10
-
Network
sar -n DEV 3 10
nethogs
# per-process metricsiftop
# per-process metrics
-
Config info
dmidecode
/proc/cpuinfo
,/proc/meminfo
cpupower frequency-info
turbostat --debug
lspci
,lscpu
,lsscsi
,lsblk
-
Tracing, monitoring, debugging
strace -f -p <pid>
- JVM jtools:
jstack <pid>
,jmap
,jvisualvm
,jdb
,jconsole
- gdb
-
Dynamic tracing and tool kits
- perf-tools https://github.com/brendangregg/perf-tools
- cachestat, iosnoop, ..., https://github.com/brendangregg/perf-tools/tree/master/bin
- funccount -d 5 'sys_read'
- bin/syscount -cp
- perf http://www.brendangregg.com/perf.html
- BPF-based performance tools
- Ftrace
- perf-tools https://github.com/brendangregg/perf-tools
-
Misc