]> git.saurik.com Git - apple/shell_cmds.git/blame - systime/systime.1
shell_cmds-179.tar.gz
[apple/shell_cmds.git] / systime / systime.1
CommitLineData
57cab491
A
1.Dd April 24, 2012\r
2.Dt systime 1\r
3.Os Darwin\r
4.Sh NAME\r
5.Nm systime\r
6.Nd gather system-wide time during program execution\r
7.Sh SYNOPSIS\r
8.Nm\r
9.Op Fl P\r
10.Ar utility Op Ar argument ...\r
11.Nm\r
12.Fl p\r
13.Nm\r
14.Op Fl P\r
15.Fl u Ar user\r
16.Fl s Ar sys\r
17.Fl i Ar idle\r
18.Sh DESCRIPTION\r
19.Nm\r
20is similar to\r
21.Xr time 1\r
22in that it allows you to execute a utility program. However after execution\r
23completes, it reports the system-wide time that was spent\r
24during that time period, instead of just the portion directly caused\r
25by the utility. This can be used to gather information about CPU\r
26utilization by kernel threads (AIO, networking) and interrupt routines\r
27on behalf of a program, but not directly attributed to it.\r
28.Pp\r
29The\r
30.Nm\r
31program can also be used to snapshot counters with\r
32.Fl p\r
33and then later used with\r
34.Fl u Fl s Fl i\r
35to calculate time spent during a time interval that doesn't correlate\r
36to a specific command execution. For example:\r
37.Pp\r
38.Bd -ragged -offset indent\r
39$ eval `systime -p`\r
40.Pp\r
41$ ... time passes ...\r
42.Pp\r
43$ systime -u $systime_user -s $systime_sys -i $systime_idle\r
44.Pp\r
4518.79 real 2.03 user 1.04 sys\r
46.Ed\r
47.Pp\r
48.Fl P\r
49can be used to print time spent as a percentage of overall CPU capacity\r
50of the system (capped at 100%)\r
51.Sh SEE ALSO\r
52.Xr time 1 ,\r
53.Xr top 1\r