mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-10 11:29:59 +03:00
25 lines
582 B
Markdown
25 lines
582 B
Markdown
|
# truss
|
||
|
|
||
|
> Troubleshooting tool for tracing system calls.
|
||
|
> SunOS equivalent of strace.
|
||
|
|
||
|
- Start tracing a program by executing it, following all child processes:
|
||
|
|
||
|
`truss -f {{program}}`
|
||
|
|
||
|
- Start tracing a specific process by its PID:
|
||
|
|
||
|
`truss -p {{pid}}`
|
||
|
|
||
|
- Start tracing a program by executing it, showing arguments and environment variables:
|
||
|
|
||
|
`truss -a -e {{program}}`
|
||
|
|
||
|
- Count time, calls, and errors for each system call and report a summary on program exit:
|
||
|
|
||
|
`truss -c -p {{pid}}`
|
||
|
|
||
|
- Trace a process filtering output by system call:
|
||
|
|
||
|
`truss -p {{pid}} -t {{system_call_name}}`
|