-
Sasha Goldshtein authored
This new tool attaches to the raw_syscalls:sys_enter and sys_exit tracepoints, and collects frequency counts and optionally latencies of syscalls (aggregated by syscall or by process). It is a fairly natural and efficient extension of Brendan Gregg's syscount from perf-tools. Options include latency tracing, interval printouts, process filtering, summarizing only failed syscalls, and more. NOTE: The translation of syscall numbers to names is performed using a static list, borrowed from strace sources. It is accurate up to syscall 313, and does not include the bpf() syscall, for example. Also, it is only relevant for x86_64. Basic example: ``` $ syscount -P Tracing syscalls, printing top 10... Ctrl+C to quit. [10:13:21] PID COMM COUNT 30216 sshd 533 31391 vi 494 25188 screen 134 25776 mysqld 24 31394 python 10 494 systemd-journal 5 ^C $ syscount -L Tracing syscalls, printing top 10... Ctrl+C to quit. [10:13:34] SYSCALL COUNT TIME (us) select 132 1902458.009 nanosleep 166 11136.305 write 89 41.308 ftruncate 1 33.217 stat 1 22.117 fstat 1 6.134 [unknown: 321] 28 4.553 ioctl 7 4.544 wait4 166 3.962 timerfd_settime 1 3.786 ^C ``` Related: #786
8e583cca