1 .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
8 .Nd show system call usage statistics
15 pid | cmd | -E execute
18 displays an ongoing sample of system call and
19 page fault usage statistics for a given process,
20 in a 'top' like fashion.
22 Page faults can be of the following types:
23 .Bl -tag -width CACHEHITTT -compact
25 page had to read from disk
27 page was created and zero filled
29 page was copied from another page
31 page was found in the cache
34 The arguments are as follows:
39 option is specified, it expects a path to a
42 contains the mappings for the system calls. This option
43 overrides the default location of the system call codefile
44 which is found in /usr/share/misc/trace.codes.
48 option generates output that is sorted by call count.
49 This overrides the default sort by time.
55 to turn off it's continuous window updating style of
56 output and instead output as a continuous scrolling
61 updates its output at one second intervals. This sampling
62 interval may be changed by specifying the
67 .It pid | cmd | -E execute
68 The last argument must be a process id, a running command
69 name, or using the -E option, an execution path followed
70 by optional arguments.
71 The system call usage data for the process or command
73 If the -E flag is used, sc_usage will launch the executable,
74 pass along any optional arguments and display system call
75 usage date for that executable.
78 The data columns displayed are as follows:
79 .Bl -tag -width LAST_PATHNAME_WAITED_FOR -compact
86 the amount of cpu time consumed
88 the absolute time the process is waiting
90 the current system call type
91 .It LAST_PATHNAME_WAITED_FOR
92 for each active thread, the last pathname
93 that was referenced by a system call that blocked
95 the cumulative time that a thread has been blocked
99 current scheduling priority
104 command also displays some global state in the first few lines of output,
105 including the number of preemptions, context switches, threads, faults
106 and system calls, found during the sampling period. The current time
107 and the elapsed time that the command has been running is also
111 command is also SIGWINCH savvy, so adjusting your window geometry may change
112 the list of system calls being displayed. Typing a 'q' will cause sc_usage to
113 exit immediately. Typing any other character will cause sc_usage to reset its
114 counters and the display.
117 sc_usage Finder -e -s2
120 will sort the Finder process usage data according to system call count
121 and update the output at 2 second intervals.