]>
Commit | Line | Data |
---|---|---|
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 | |
20 | is similar to\r | |
21 | .Xr time 1\r | |
22 | in that it allows you to execute a utility program. However after execution\r | |
23 | completes, it reports the system-wide time that was spent\r | |
24 | during that time period, instead of just the portion directly caused\r | |
25 | by the utility. This can be used to gather information about CPU\r | |
26 | utilization by kernel threads (AIO, networking) and interrupt routines\r | |
27 | on behalf of a program, but not directly attributed to it.\r | |
28 | .Pp\r | |
29 | The\r | |
30 | .Nm\r | |
31 | program can also be used to snapshot counters with\r | |
32 | .Fl p\r | |
33 | and then later used with\r | |
34 | .Fl u Fl s Fl i\r | |
35 | to calculate time spent during a time interval that doesn't correlate\r | |
36 | to 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 | |
45 | 18.79 real 2.03 user 1.04 sys\r | |
46 | .Ed\r | |
47 | .Pp\r | |
48 | .Fl P\r | |
49 | can be used to print time spent as a percentage of overall CPU capacity\r | |
50 | of the system (capped at 100%)\r | |
51 | .Sh SEE ALSO\r | |
52 | .Xr time 1 ,\r | |
53 | .Xr top 1\r |