Manual Pages for UNIX Darwin command on man dtruss
MyWebUniversity

Manual Pages for UNIX Darwin command on man dtruss

dtruss(1m) USER COMMANDS dtruss(1m)

NAME

dtruss - process syscall details. Uses DTrace.

SYNOPSIS

ddttrruussss [-acdeflhoLs] [-t syscall] { -p PID | -n name | command }

DESCRIPTION

dtruss prints details on process system calls. It is like a DTrace ver-

sion of truss, and has been designed to be less intrusive than truss. Of particular interest is the elapsed times and on cpu times, which can identify both system calls that are slow to complete, and those which are consuming CPU cycles. Since this uses DTrace, only the root user or users with the dtracekernel privilege can run this command. OOPPTTIIOONNSS

-a print all details

-b bufsize

dynamic variable buffer size. Increase this if you notice dynamic variable drop errors. The default is "4m" for 4 megabytes per CPU.

-c print system call counts

-d print relative timestamps, us

-e print elapsed times, us

-f follow children as they are forked

-l force printing of pid/lwpid per line

-L don't print pid/lwpid per line

-n name

examine processes with this name

-o print on-cpu times, us

-s print stack backtraces

-p PID examine this PID

-t syscall

examine this syscall only EEXXAAMMPPLLEESS

run and examine the "df -h" command

# ddttrruussss df -h

examine PID 1871

# ddttrruussss -p 1871

examine all processes called "tar"

# ddttrruussss -n tar

run test.sh and follow children

# ddttrruussss -f test.sh

run the "date" command and print elapsed and on cpu times,

# ddttrruussss -eo date

FFIIEELLDDSS PID/LWPID Process ID / Lightweight Process ID RELATIVE

relative timestamps to the start of the thread, us (microsec-

onds) ELAPSD elapsed time for this system call, us

CPU on-cpu time for this system call, us

SYSCALL(args) system call name, with arguments (some may be evaluated) DDOOCCUUMMEENNTTAATTIIOONN

See the DTraceToolkit for further documentation under the Docs direc-

tory. The DTraceToolkit docs may include full worked examples with ver-

bose descriptions explaining the output. EEXXIITT

dtruss will run forever until Ctrl-C is hit, or if a command was exe-

cuted dtruss will finish when the command ends.

AUTHOR Brendan Gregg [Sydney, Australia]

SEE ALSO

procsystime(1M), dtrace(1M), truss(1)

version 0.80 Jun 17, 2005 dtruss(1m)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™