1 .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
8 .Nd show system call usage statistics
20 displays an ongoing sample of system call and page fault usage statistics for
24 It requires root privileges due to the kernel tracing facility it uses to
27 Page faults can be of the following types:
28 .Bl -tag -width CACHEHITTT -compact
30 page had to read from disk
32 page was created and zero filled
34 page was copied from another page
36 page was found in the cache
39 The arguments are as follows:
44 option is specified, it expects a path to a
47 contains the mappings for the system calls.
48 This option overrides the default location of the system call codefile which
49 is found in /usr/share/misc/trace.codes.
53 option generates output that is sorted by call count.
54 This overrides the default sort by time.
60 to turn off its continuous window updating style of output and instead output
61 as a continuous scrolling of data.
65 updates its output at one second intervals.
66 This sampling interval may be changed by specifying the
72 .It pid | cmd | -E execute
73 The last argument must be a process id, a running command name, or using the
75 option, an execution path followed by optional arguments.
76 The system call usage data for the process or command is displayed.
79 flag is used, sc_usage will launch the executable, pass along any optional
80 arguments and display system call usage date for that executable.
83 The data columns displayed are as follows:
84 .Bl -tag -width LAST_PATHNAME_WAITED_FOR -compact
91 the amount of cpu time consumed
93 the absolute time the process is waiting
95 the current system call type
96 .It LAST_PATHNAME_WAITED_FOR
97 for each active thread, the last pathname
98 that was referenced by a system call that blocked
100 the cumulative time that a thread has been blocked
104 current scheduling priority
109 command also displays some global state in the first few lines of output,
110 including the number of preemptions, context switches, threads, faults and
111 system calls, found during the sampling period.
112 The current time and the elapsed time that the command has been running is also
116 command is also SIGWINCH savvy, so adjusting your window geometry may change
117 the list of system calls being displayed.
120 will cause sc_usage to exit immediately.
121 Typing any other character will cause sc_usage to reset its counters and the
125 sc_usage Finder -e -s2
128 will sort the Finder process usage data according to system call count and
129 update the output at 2 second intervals.