syscount(8)
β¨ syscount(8) β¨
Okay so here's the deal, bestie: this is the manual for syscount, the tool that summarizes syscall counts and latencies π (it's giving system manager's manual energy, honestly).
π NAME
syscount - Summarize syscall counts and latencies. π
πΈ SYNOPSIS
syscount [-h] [-p PID] [-t TID] [-c PPID] [-i INTERVAL] [-d DURATION]
[-T TOP] [-x] [-e ERRNO] [-L] [-m] [-P] [-l] [--syscall SYSCALL]
π¦ DESCRIPTION
okay so this tool traces syscall entry and exit tracepoints and summarizes either the number of syscalls of each type, or the number of syscalls per process. it can also collect latency (invocation time) for each syscall or each process. iconic β¨
Since this uses BPF, only the root user can use this tool. π not me being locked out of my own tools π
π§ REQUIREMENTS
You need CONFIG_BPF and bcc. Linux 4.7+ is required to attach a BPF program to the raw_syscalls:sys_{enter,exit} tracepoints, used by this tool. ngl that's the main requirement, so make sure your kernel is up to date π«Ά
π OPTIONS
-hβ Print the usage message. πββοΈ-p PIDβ Trace only this process. π―-t TIDβ Trace only this thread. π§΅-c PPIDβ Trace only child of this pid. πΆ-i INTERVALβ Print the summary at the specified interval (in seconds). β°-d DURATIONβ Total duration of trace (in seconds). β³-T TOPβ Print only this many entries. Default:10. π-xβ Trace only failed syscalls (i.e., the return value from the syscall was< 0). π-e ERRNOβ Trace only syscalls that failed with that error (e.g.-e EPERMor-e 1). π-mβ Display times in milliseconds. Default: microseconds. β‘-Pβ Summarize by process and not by syscall. π§ββοΈ-lβ List the syscalls recognized by the tool (hard-coded list). Syscalls beyond this list will still be displayed, as"[unknown: nnn]"where nnn is the syscall number. π--syscall SYSCALLβ Trace this syscall only (use option-lto get all recognized syscalls). π
π EXAMPLES
Summarize all syscalls by syscall:
# syscount
Summarize all syscalls by process:
# syscount -P
Summarize only failed syscalls:
# syscount -x
Summarize only syscalls that failed with EPERM:
# syscount -e EPERM
Trace PID 181 only:
# syscount -p 181
Summarize syscalls counts and latencies:
# syscount -L
π FIELDS
PIDβ Process ID πCOMMβ Process name π·οΈSYSCALLβ Syscall name, or"[unknown: nnn]"for syscalls that aren't recognized π€·ββοΈCOUNTβ The number of events π’TIMEβ The total elapsed time (inusorms) β±οΈ
π OVERHEAD
For most applications, the overhead should be manageable if they perform 1000's or even 10,000's of syscalls per second. For higher rates, the overhead may become considerable. For example, tracing a loop of 4 million calls to geteuid(), slows it down by 1.85x when tracing only syscall counts, and slows it down by more than 5x when tracing syscall counts and latencies. However, this represents a rate of >3.5 million syscalls per second, which should not be typical. π’
π§ SOURCE
This is from bcc. π
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool. π
π₯οΈ OS
Linux π§
π«§ STABILITY
Unstable - in development. π§
π AUTHOR
Sasha Goldshtein, Rocky Xing π«Ά
π SEE ALSO
funccount(8), ucalls(8), argdist(8), trace(8), funclatency(8) β¨
Bestie, you're officially a syscount expert now. Pulled from bcc, manual section 8, dated 2017-02-15 (USER COMMANDS). Stay iconic and stay root-powered πππ¦
π¦ where this page comes from
- centos-stream 10: bcc-tools 0.36.1-1.el10 Β· Apache-2.0
- centos-stream 9: bcc-tools 0.36.1-1.el9 Β· ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 Β· Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms