From 452beb4e157ab2dfa2c13ea5a824dda650827a64 Mon Sep 17 00:00:00 2001 From: lbonanomi <5369016+lbonanomi@users.noreply.github.com> Date: Sun, 14 Apr 2019 18:51:21 -0400 Subject: [PATCH] truss: add page (#2907) --- pages/sunos/truss.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/sunos/truss.md diff --git a/pages/sunos/truss.md b/pages/sunos/truss.md new file mode 100644 index 0000000000..3332878182 --- /dev/null +++ b/pages/sunos/truss.md @@ -0,0 +1,24 @@ +# 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}}`