CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: wiz Date: Fri Jun 26 15:45:18 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: dtruss.1m opensnoop.1m Log Message: Sort options and their descriptions. Replace tab with space in table. Make non-standard section subsections. Comment out Xr to procsystime(1) which does not exist on NetBSD. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.5 src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.6 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.5 Thu Jun 25 14:08:48 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Fri Jun 26 15:45:18 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: dtruss.1m,v 1.5 2020/06/25 14:08:48 uwe Exp $ +.\" $NetBSD: dtruss.1m,v 1.6 2020/06/26 15:45:18 wiz Exp $ .Dd June 25, 2020 .Dt DTRUSS 1 .Os @@ -7,7 +7,7 @@ .Nd process syscall details. Uses DTrace .Sh SYNOPSIS .Nm -.Op Fl acdeflhoLs +.Op Fl acdeflhLos .Op Fl t Ar syscall .Op Fl p Ar PID | Fl n Ar name | command .Sh DESCRIPTION @@ -39,18 +39,18 @@ print relative timestamps, us (microseco print elapsed times, us .It Fl f follow children as they are forked -.It Fl l -force printing of pid/lwpid per line .It Fl L don't print pid/lwpid per line +.It Fl l +force printing of pid/lwpid per line .It Fl n Ar name examine processes with this name .It Fl o print on-cpu times, us -.It Fl s -print stack backtraces .It Fl p Ar PID examine this PID +.It Fl s +print stack backtraces .It Fl t Ar syscall examine this syscall only .El @@ -59,7 +59,7 @@ examine this syscall only .It PID/LWPID Ta Process ID\|/\|Lightweight Process ID .It RELATIVE Ta relative timestamps to the start of the thread, us .It ELAPSDTa elapsed time for this system call, us -.It CPU Ta on-cpu time for this system call, us +.It CPU Ta on-cpu time for this system call, us .It SYSCALL(args) Ta system call name, with arguments (some may be evaluated) .El .Sh EXAMPLES @@ -88,9 +88,9 @@ run the command and print elapsed and on cpu times, .Pp .Dl Ic dtruss -eo date -.Sh STABILITY +.Ss STABILITY stable \(em needs the syscall provider. -.Sh DOCUMENTATION +.Ss 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. @@ -98,8 +98,8 @@ descriptions explaining the output. dtruss will run forever until Ctrl\-C is hit, or if a command was executed dtruss will finish when the command ends. .Sh SEE ALSO -.Xr dtrace 1 , -.Xr procsystime 1 +.Xr dtrace 1 +.\".Xr procsystime 1 .Sh AUTHORS .An Brendan Gregg [Sydney, Australia] Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.4 src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.5 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.4 Thu Jun 25 14:59:51 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Fri Jun 26 15:45:18 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: opensnoop.1m,v 1.4 2020/06/25 14:59:51 uwe Exp $ +.\" $NetBSD: opensnoop.1m,v 1.5 2020/06/26 15:45:18 wiz Exp $ .Dd June 25, 2020 .Dt OPENSNOOP 1 .Os @@ -22,16 +22,22 @@ attempting to open files that do not exi Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. .Bl -tag -width Fl -.It Fl a -print all data .It Fl A dump all data, space delimited +.It Fl a +print all data .It Fl c print current working directory of process .It Fl e print errno value +.It Fl f Ar pathname +file pathname to snoop .It Fl g print full command arguments +.It Fl n Ar name +process name to snoop +.It Fl p Ar PID +process ID to snoop .It Fl s print start time, us .It Fl v @@ -40,12 +46,6 @@ print start time, string only print failed opens .It Fl Z print zonename -.It Fl f Ar pathname -file pathname to snoop -.It Fl n Ar name -process name to snoop -.It Fl p Ar PID -process ID to snoop .El .Bl -column "STRTIME" .It Sy Fields Ta Sy Description @@ -81,9 +81,9 @@ See error codes, Snoop this file only, .Pp .Dl Ic opensnoop -f /etc/passwd -.Sh STABILITY +.Ss STABILITY stable \(em needs the syscall provider. -.Sh DOCUMENTATION +.Ss 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.
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: uwe Date: Thu Jun 25 14:59:51 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: opensnoop.1m Log Message: Try to improve markup. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.3 src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.4 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.3 Thu Jun 25 09:39:19 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Thu Jun 25 14:59:51 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: opensnoop.1m,v 1.3 2020/06/25 09:39:19 sevan Exp $ +.\" $NetBSD: opensnoop.1m,v 1.4 2020/06/25 14:59:51 uwe Exp $ .Dd June 25, 2020 .Dt OPENSNOOP 1 .Os @@ -16,12 +16,12 @@ tracks file opens. As a process issues a file open, details such as UID, PID and pathname are printed out. -The returned file descriptor is printed, a value of -1 indicates an error. +The returned file descriptor is printed, a value of \-1 indicates an error. This can be useful for troubleshooting to determine if appliacions are attempting to open files that do not exist. Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. -.Bl -tag -width Ds +.Bl -tag -width Fl .It Fl a print all data .It Fl A @@ -47,51 +47,49 @@ process name to snoop .It Fl p Ar PID process ID to snoop .El -.Bl -column fieldtitle description +.Bl -column "STRTIME" .It Sy Fields Ta Sy Description -.It ZONE Ta Zone name -.It UID Ta User ID -.It PID Ta Process ID -.It PPID Ta Parent Process ID -.It FD Ta File Descriptor (-1 is error) -.It ERR Ta errno value ( see -.Pa /usr/include/sys/errno.h -) -.It CWD Ta current working directory of process -.It PATH Ta pathname for file open -.It COMM Ta command name for the process -.It ARGS Ta argument listing for the process -.It TIME Ta timestamp for the open event, us -.It STRTIME Ta timestamp for the open event, string +.It ZONE Ta Zone name +.It UID Ta User ID +.It PID Ta Process ID +.It PPID Ta Parent Process ID +.It FDTa File Descriptor +.Pq \-1 is error +.It ERR Ta Va errno +value +.Pq see Pa /usr/include/sys/errno.h +.It CWD Ta current working directory of process +.It PATH Ta pathname for file open +.It COMM Ta command name for the process +.It ARGS Ta argument listing for the process +.It TIME Ta timestamp for the open event, us +.It STRTIME Ta timestamp for the open event, string .El .Sh EXAMPLES Default output, print file opens by process as they occur, -.Bd -literal -offset indent -.Ic opensnoop -.Ed +.Pp +.Dl Ic opensnoop .Pp Print human readable timestamps, -.Bd -literal -offset indent -.Ic opensnoop -v -.Ed +.Pp +.Dl Ic opensnoop -v .Pp See error codes, -.Bd -literal -offset indent -.Ic opensnoop -e -.Ed +.Pp +.Dl Ic opensnoop -e .Pp Snoop this file only, -.Bd -literal -offset indent -.Ic opensnoop -f /etc/passwd -.Ed +.Pp +.Dl Ic opensnoop -f /etc/passwd .Sh STABILITY -stable - needs the syscall provider. +stable \(em needs the syscall provider. .Sh 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. .Sh EXIT -opensnoop will run forever until Ctrl\-C is hit. +.Nm +will run forever until Ctrl\-C is hit. .Sh SEE ALSO .Xr dtrace 1 .Sh AUTHORS @@ -100,8 +98,7 @@ opensnoop will run forever until Ctrl\-C .Sh BUGS Occasionally the pathname for the file open cannot be read and the following error will be seen, -.Bd -literal -offset indent -dtrace: error on enabled probe ID 6 (...): invalid address -.Ed +.Pp +.Dl dtrace: error on enabled probe ID 6 (...): invalid address .Pp this is normal behaviour.
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: uwe Date: Thu Jun 25 14:08:48 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: dtruss.1m Log Message: Try to improve markup. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.4 src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.5 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.4 Thu Jun 25 09:39:19 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Thu Jun 25 14:08:48 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: dtruss.1m,v 1.4 2020/06/25 09:39:19 sevan Exp $ +.\" $NetBSD: dtruss.1m,v 1.5 2020/06/25 14:08:48 uwe Exp $ .Dd June 25, 2020 .Dt DTRUSS 1 .Os @@ -22,17 +22,19 @@ consuming CPU cycles. .Pp Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. -.Bl -tag -width Ds +.Bl -tag -width Fl .It Fl a print all details .It Fl b Ar bufsize dynamic variable buffer size. Increase this if you notice dynamic variable drop errors. -The default is "4m" for 4 megabytes per CPU. +The default is +.Ql "4m" +for 4\~megabytes per CPU. .It Fl c print system call counts .It Fl d -print relative timestamps, us +print relative timestamps, us (microseconds) .It Fl e print elapsed times, us .It Fl f @@ -52,41 +54,42 @@ examine this PID .It Fl t Ar syscall examine this syscall only .El -.Bl -column fieldtitle description -.It Sy Fields Ta Sy Description -.It PID/LWPID Process ID / Lightweight Process ID -.It RELATIVE relative timestamps to the start of the thread, us (microseconds) -.It ELAPSD elapsed time for this system call, us -.It CPU on-cpu time for this system call, us -.It SYSCALL(args) system call name, with arguments (some may be evaluated) +.Bl -column "SYSCALL(args)" +.It Sy Field Ta Sy Description +.It PID/LWPID Ta Process ID\|/\|Lightweight Process ID +.It RELATIVE Ta relative timestamps to the start of the thread, us +.It ELAPSDTa elapsed time for this system call, us +.It CPU Ta on-cpu time for this system call, us +.It SYSCALL(args) Ta system call name, with arguments (some may be evaluated) .El .Sh EXAMPLES -run and examine the "df -h" command -.Bd -literal -offset indent -.Ic dtruss df -h -.Ed +run and examine the +.Ql df -h +command +.Pp +.Dl Ic dtruss df -h .Pp examine PID 1871 -.Bd -literal -offset indent -.Ic dtruss -p 1871 -.Ed +.Pp +.Dl Ic dtruss -p 1871 .Pp examine all processes called "tar" -.Bd -literal -offset indent -.Ic dtruss -n tar -.Ed -.Pp -run test.sh and follow children -.Bd -literal -offset indent -.Ic dtruss -f test.sh -.Ed -.Pp -run the "date" command and print elapsed and on cpu times, -.Bd -literal -offset indent -.Ic dtruss -eo date -.Ed +.Pp +.Dl Ic dtruss -n tar +.Pp +run +.Ql test.sh +and follow children +.Pp +.Dl Ic dtruss -f test.sh +.Pp +run the +.Ql date +command and print elapsed and on cpu times, +.Pp +.Dl Ic dtruss -eo date .Sh STABILITY -stable - needs the syscall provider. +stable \(em needs the syscall provider. .Sh DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: sevan Date: Thu Jun 25 09:39:19 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: dtruss.1m opensnoop.1m Log Message: Fix column layout To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.3 src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.4 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.3 Wed Jun 24 18:49:01 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Thu Jun 25 09:39:19 2020 @@ -1,5 +1,5 @@ -.\" $NetBSD: dtruss.1m,v 1.3 2020/06/24 18:49:01 sevan Exp $ -.Dd June 24, 2020 +.\" $NetBSD: dtruss.1m,v 1.4 2020/06/25 09:39:19 sevan Exp $ +.Dd June 25, 2020 .Dt DTRUSS 1 .Os .Sh NAME @@ -52,19 +52,13 @@ examine this PID .It Fl t Ar syscall examine this syscall only .El -.Pp -Description of fields -.Bl -column -.It PID/LWPID -Process ID / Lightweight Process ID -.It RELATIVE -relative timestamps to the start of the thread, us (microseconds) -.It ELAPSD -elapsed time for this system call, us -.It CPU -on-cpu time for this system call, us -.It SYSCALL(args) -system call name, with arguments (some may be evaluated) +.Bl -column fieldtitle description +.It Sy Fields Ta Sy Description +.It PID/LWPID Process ID / Lightweight Process ID +.It RELATIVE relative timestamps to the start of the thread, us (microseconds) +.It ELAPSD elapsed time for this system call, us +.It CPU on-cpu time for this system call, us +.It SYSCALL(args) system call name, with arguments (some may be evaluated) .El .Sh EXAMPLES run and examine the "df -h" command Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.2 src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.3 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.2 Wed Jun 24 18:06:01 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Thu Jun 25 09:39:19 2020 @@ -1,5 +1,5 @@ -.\" $NetBSD: opensnoop.1m,v 1.2 2020/06/24 18:06:01 sevan Exp $ -.Dd June 24, 2020 +.\" $NetBSD: opensnoop.1m,v 1.3 2020/06/25 09:39:19 sevan Exp $ +.Dd June 25, 2020 .Dt OPENSNOOP 1 .Os .Sh NAME @@ -47,35 +47,22 @@ process name to snoop .It Fl p Ar PID process ID to snoop .El -.Pp -Description of fields -.Bl -column -.It ZONE -Zone name -.It UID -User ID -.It PID -Process ID -.It PPID -Parent Process ID -.It FD -File Descriptor (-1 is error) -.It ERR -errno value (see +.Bl -column fieldtitle description +.It Sy Fields Ta Sy Description +.It ZONE Ta Zone name +.It UID Ta User ID +.It PID Ta Process ID +.It PPID Ta Parent Process ID +.It FD Ta File Descriptor (-1 is error) +.It ERR Ta errno value ( see .Pa /usr/include/sys/errno.h ) -.It CWD -current working directory of process -.It PATH -pathname for file open -.It COMM -command name for the process -.It ARGS -argument listing for the process -.It TIME -timestamp for the open event, us -.It STRTIME -timestamp for the open event, string +.It CWD Ta current working directory of process +.It PATH Ta pathname for file open +.It COMM Ta command name for the process +.It ARGS Ta argument listing for the process +.It TIME Ta timestamp for the open event, us +.It STRTIME Ta timestamp for the open event, string .El .Sh EXAMPLES Default output, print file opens by process as they occur,
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: sevan Date: Wed Jun 24 18:49:01 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: dtruss.1m Log Message: No truss here To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.2 src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.3 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.2 Wed Jun 24 18:43:38 2020 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Wed Jun 24 18:49:01 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: dtruss.1m,v 1.2 2020/06/24 18:43:38 sevan Exp $ +.\" $NetBSD: dtruss.1m,v 1.3 2020/06/24 18:49:01 sevan Exp $ .Dd June 24, 2020 .Dt DTRUSS 1 .Os @@ -101,7 +101,8 @@ descriptions explaining the output. dtruss will run forever until Ctrl\-C is hit, or if a command was executed dtruss will finish when the command ends. .Sh SEE ALSO -procsystime(1M), dtrace(1M), truss(1) +.Xr dtrace 1 , +.Xr procsystime 1 .Sh AUTHORS .An Brendan Gregg [Sydney, Australia]
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: sevan Date: Wed Jun 24 18:43:38 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: dtruss.1m Log Message: mdocify To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.1.1.1 src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.2 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m:1.1.1.1 Wed Sep 30 22:01:09 2015 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/dtruss.1m Wed Jun 24 18:43:38 2020 @@ -1,123 +1,107 @@ -.TH dtruss 1m "$Date: 2015/09/30 22:01:09 $" "USER COMMANDS" -.SH NAME -dtruss \- process syscall details. Uses DTrace. -.SH SYNOPSIS -.B dtruss -[\-acdeflhoLs] [\-t syscall] { \-p PID | \-n name | command } -.SH DESCRIPTION -dtruss prints details on process system calls. It is like a DTrace -version 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 -dtrace_kernel privilege can run this command. -.SH OS -Solaris -.SH STABILITY -stable - needs the syscall provider. -.SH OPTIONS -.TP -\-a +.\" $NetBSD: dtruss.1m,v 1.2 2020/06/24 18:43:38 sevan Exp $ +.Dd June 24, 2020 +.Dt DTRUSS 1 +.Os +.Sh NAME +.Nm dtruss +.Nd process syscall details. Uses DTrace +.Sh SYNOPSIS +.Nm +.Op Fl acdeflhoLs +.Op Fl t Ar syscall +.Op Fl p Ar PID | Fl n Ar name | command +.Sh DESCRIPTION +.Nm +prints details on process system calls. +It is like a DTrace version of truss, and has been designed to be less +intrusive than truss. +.Pp +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. +.Pp +Since this uses DTrace, only the root user or users with the dtrace_kernel +privilege can run this command. +.Bl -tag -width Ds +.It Fl a print all details -.TP -\-b bufsize -dynamic variable buffer size. Increase this if you notice dynamic -variable drop errors. The default is "4m" for 4 megabytes per CPU. -.TP -\-c +.It Fl b Ar bufsize +dynamic variable buffer size. +Increase this if you notice dynamic variable drop errors. +The default is "4m" for 4 megabytes per CPU. +.It Fl c print system call counts -.TP -\-d +.It Fl d print relative timestamps, us -.TP -\-e +.It Fl e print elapsed times, us -.TP -\-f +.It Fl f follow children as they are forked -.TP -\-l +.It Fl l force printing of pid/lwpid per line -.TP -\-L +.It Fl L don't print pid/lwpid per line -.TP -\-n name +.It Fl n Ar name examine processes with this name -.TP -\-o +.It Fl o print on-cpu times, us -.TP -\-s +.It Fl s print stack backtraces -.TP -\-p PID +.It Fl p Ar PID examine this PID -.TP -\-t syscall +.It Fl t Ar syscall examine this syscall only -.PP -.SH EXAMPLES -.TP -run and examine the "df -h" command -# -.B dtruss -df -h -.PP -.TP -examine PID 1871 -# -.B dtruss -\-p 1871 -.PP -.TP -examine all processes called "tar" -# -.B dtruss -\-n tar -.PP -.TP -run test.sh and follow children -# -.B dtruss -\-f test.sh -.TP -run the "date" command and print elapsed and on cpu times, -# -.B dtruss -\-eo date -.PP -.SH FIELDS -.TP -PID/LWPID +.El +.Pp +Description of fields +.Bl -column +.It PID/LWPID Process ID / Lightweight Process ID -.TP -RELATIVE +.It RELATIVE relative timestamps to the start of the thread, us (microseconds) -.TP -ELAPSD +.It ELAPSD elapsed time for this system call, us -.TP -CPU +.It CPU on-cpu time for this system call, us -.TP -SYSCALL(args) +.It SYSCALL(args) system call name, with arguments (some may be evaluated) -.PP -.SH 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. -.SH EXIT +.El +.Sh EXAMPLES +run and examine the "df -h" command +.Bd -literal -offset indent +.Ic dtruss df -h +.Ed +.Pp +examine PID 1871 +.Bd -literal -offset indent +.Ic dtruss -p 1871 +.Ed +.Pp +examine all processes called "tar" +.Bd -literal -offset indent +.Ic dtruss -n tar +.Ed +.Pp +run test.sh and follow children +.Bd -literal -offset indent +.Ic dtruss -f test.sh +.Ed +.Pp +run the "date" command and print elapsed and on cpu times, +.Bd -literal -offset indent +.Ic dtruss -eo date +.Ed +.Sh STABILITY +stable - needs the syscall provider. +.Sh DOCUMENTATION +See the DTraceToolkit for further documentation under the Docs directory. +The DTraceToolkit docs may include full worked examples with verbose
CVS commit: src/external/cddl/dtracetoolkit/dist/Man/man1m
Module Name:src Committed By: sevan Date: Wed Jun 24 18:06:01 UTC 2020 Modified Files: src/external/cddl/dtracetoolkit/dist/Man/man1m: opensnoop.1m Log Message: mdocify To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m diff -u src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.1.1.1 src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.2 --- src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m:1.1.1.1 Wed Sep 30 22:01:09 2015 +++ src/external/cddl/dtracetoolkit/dist/Man/man1m/opensnoop.1m Wed Jun 24 18:06:01 2020 @@ -1,139 +1,120 @@ -.TH opensnoop 1m "$Date: 2015/09/30 22:01:09 $" "USER COMMANDS" -.SH NAME -opensnoop \- snoop file opens as they occur. Uses DTrace. -.SH SYNOPSIS -.B opensnoop -[\-a|\-A|\-ceghsvxZ] [\-f pathname] [\-n name] [\-p PID] -.SH DESCRIPTION -opensnoop tracks file opens. As a process issues a file open, details -such as UID, PID and pathname are printed out. - -The returned file descriptor is printed, -a value of -1 indicates an error. This can be useful -for troubleshooting to determine if appliacions are attempting to -open files that do not exist. - +.\" $NetBSD: opensnoop.1m,v 1.2 2020/06/24 18:06:01 sevan Exp $ +.Dd June 24, 2020 +.Dt OPENSNOOP 1 +.Os +.Sh NAME +.Nm opensnoop +.Nd snoop file opens as they occur. Uses DTrace +.Sh SYNOPSIS +.Nm +.Op Fl a | Fl A | Fl ceghsvxZ +.Op Fl f Ar pathname +.Op Fl n Ar name +.Op Fl p Ar PID +.Sh DESCRIPTION +.Nm +tracks file opens. +As a process issues a file open, details such as UID, PID and pathname are +printed out. +The returned file descriptor is printed, a value of -1 indicates an error. +This can be useful for troubleshooting to determine if appliacions are +attempting to open files that do not exist. Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. -.SH OS -Solaris -.SH STABILITY -stable - needs the syscall provider. -.SH OPTIONS -.TP -\-a +.Bl -tag -width Ds +.It Fl a print all data -.TP -\-A +.It Fl A dump all data, space delimited -.TP -\-c +.It Fl c print current working directory of process -.TP -\-e +.It Fl e print errno value -.TP -\-g +.It Fl g print full command arguments -.TP -\-s +.It Fl s print start time, us -.TP -\-v +.It Fl v print start time, string -.TP -\-x +.It Fl x only print failed opens -.TP -\-Z +.It Fl Z print zonename -.TP -\-f pathname +.It Fl f Ar pathname file pathname to snoop -.TP -\-n name +.It Fl n Ar name process name to snoop -.TP -\-p PID +.It Fl p Ar PID process ID to snoop -.PP -.SH EXAMPLES -.TP -Default output, print file opens by process as they occur, -# -.B opensnoop -.PP -.TP -Print human readable timestamps, -# -.B opensnoop -\-v -.PP -.TP -See error codes, -# -.B opensnoop -\-e -.PP -.TP -Snoop this file only, -# -.B opensnoop -\-f /etc/passwd -.PP -.SH FIELDS -.TP -ZONE +.El +.Pp +Description of fields +.Bl -column +.It ZONE Zone name -.TP -UID +.It UID User ID -.TP -PID +.It PID Process ID -.TP -PPID +.It PPID Parent Process ID -.TP -FD +.It FD File Descriptor (-1 is error) -.TP -ERR -errno value (see /usr/include/sys/errno.h) -.TP -CWD +.It ERR +errno value (see +.Pa /usr/include/sys/errno.h +) +.It CWD current working directory of process -.TP -PATH +.It PATH pathname for file open -.TP -COMM +.It COMM command name for the process -.TP -ARGS +.It ARGS argument listing for the process -.TP -TIME +.It TIME timestamp for the open event, us -.TP -STRTIME +.It STRTIME timestamp for the open event, string -.SH 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. -.SH EXIT -opensnoop will run forever until Ctrl\-C is hit. -.SH BUGS -occasionally the pathname for the file open cannot be read -and the following error will be seen, - +.El +.Sh EXAMPLES +Default output, print file opens by process as they occur, +.Bd -literal -offset indent +.Ic opensnoop +.Ed +.Pp +Print human readable timestamps, +.Bd -literal -offset indent +.Ic opensnoop -v +.Ed +.Pp +See error codes, +.Bd -literal -offset indent +.Ic opensnoop -e +.Ed +.Pp +Snoop this file only, +.Bd -literal -offset indent +.Ic opensnoop -f /etc/passwd +.Ed +.Sh STABILITY +stable - needs the syscall provider. +.Sh 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. +.Sh EXIT +opensnoop will run forever until Ctrl\-C is hit. +.Sh SEE ALSO +.Xr dtrace 1 +.Sh AUTHORS +.An Brendan Gregg +[Sydney, Australia] +.Sh BUGS +Occasionally the pathname