procsystime1m
Analyse system call times. uses dtrace.
Usage
procsystime [-acehoT]
[{-p
PID | -n
name | command}]
Overview
procsystime prints details on system call times for processes, both the elapsed times and on-cpu times can be printed.
The elapsed times are interesting, to help identify syscalls that take some time to complete (during which the process may have slept). CPU time helps us identify syscalls that are consuming CPU cycles to run.
Since this uses DTrace, only users with root privileges can run this command.
Options
-
-a -
print all data
-
-c -
print syscall counts
-
-e -
print elapsed times, ns
-
-o -
print CPU times, ns
-
-T -
print totals
-
-p PID -
examine this PID
-
-n name -
examine processes which have this name
Examples
Print elapsed times for PID 1871,
|
# |
|---|---|
Print elapsed times for processes called "tar",
|
# |
Print CPU times for "tar" processes,
|
# |
Print syscall counts for "tar" processes,
|
# |
Print elapsed and CPU times for "tar" processes,
|
# |
print all details for "bash" processes,
|
# |
run and print details for "df -h",
|
# |
Fields
SYSCALL
|
System call name |
|---|---|
TIME (ns)
|
Total time, nanoseconds |
COUNT
|
Number of occurrences |
Documentation
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output.
Exit
procsystime will sample until Ctrl-C is hit.
Releases
115 releases since Mac OS X 10.5; the text changed 1 time.