Man page - syscount-perf(8)
Packages contas this manual
- syscount-perf(8)
- uprobe-perf(8)
- cachestat-perf(8)
- tcpretrans-perf(8)
- functrace-perf(8)
- perf-stat-hist-perf(8)
- funcslower-perf(8)
- bitesize-perf(8)
- execsnoop-perf(8)
- kprobe-perf(8)
- killsnoop-perf(8)
- tpoint-perf(8)
- iolatency-perf(8)
- opensnoop-perf(8)
- reset-ftrace-perf(8)
- funcgraph-perf(8)
- iosnoop-perf(8)
- funccount-perf(8)
apt-get install perf-tools-unstable
Manual
| syscount(8) | System Manager's Manual | syscount(8) |
NAME
syscount - count system calls. Uses Linux perf_events.
SYNOPSIS
syscount [-chv] [-t top] {-p PID|-d seconds|command}
DESCRIPTION
This is a proof-of-concept using perf_events capabilities for older kernel versions, that lack custom in-kernel aggregations. Once they exist, this script can be substantially rewritten and improved (lower overhead).
REQUIREMENTS
Linux perf_events: add linux-tools-common, run "perf", then add any additional packages it requests. Also needs awk.
OPTIONS
EXAMPLES
- Trace and summarize syscalls by process name:
- # syscount
- Trace and summarize syscalls by syscall name (lower overhead):
- # syscount -c
- Trace for 5 seconds, showing by process name:
- # syscount -d 5
- Trace PID 932 only, and show by syscall name (lower overhead):
- # syscount -cp 923
- Execute the """ls""" command, and show by syscall name:
- # syscount -c ls
FIELDS
OVERHEAD
Modes that report syscall names only (-c, -cp PID, -cd secs) have lower overhead, since they use in-kernel counts. Other modes which report process IDs (-cv) or process names (default) create a perf.data file for post processing, and you will see messages about it doing this. Beware of the file size (test for short durations, or use -c to see counts based on in-kernel counters), and gauge overheads based on the perf.data size.
Note that this script delibrately does not pipe perf record into perf script, which would avoid perf.data, because it can create a feedback loop where the perf script syscalls are recorded. Hopefully there will be a fix for this in a later perf version, so perf.data can be skipped, or other kernel features to aggregate by process name in-kernel directly (eg, via eBPF, ktap, or SystemTap).
SOURCE
This is from the perf-tools collection.
- https://github.com/brendangregg/perf-tools
Also look under the examples directory for a text file containing example usage, output, and commentary for this tool.
OS
Linux
STABILITY
Unstable - in development.
AUTHOR
Brendan Gregg
SEE ALSO
iosnoop(8), iolatency(8), iostat(1)
| 2014-07-07 | USER COMMANDS |