Solaris Application Programming, 1/e - Chapter 4 - Parent Directory
Solaris Application Programming, 1/e - Chapter 4 - Parent Directory
Solaris Application Programming, 1/e - Chapter 4 - Parent Directory
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
62 <strong>Chapter</strong> 4 Informational Tools<br />
% pgrep -l soff<br />
28059 soffice2.bin<br />
28182 soffice1.bin<br />
% pgrep -lU root<br />
0 sched<br />
1 init<br />
2 pageout<br />
3 fsflush<br />
760 sac<br />
...<br />
Example 4.17 Output from pgrep<br />
4.3.7 Reporting Activity for All Processors (mpstat)<br />
The mpstat tool reports activity on a per-processor basis. It reports a number of<br />
useful measures of activity that may indicate issues at the system level. Like<br />
vmstat, mpstat takes an interval parameter that specifies how frequently the<br />
data should be reported. The first lines of output reported give the data since boot<br />
time; the rates are reported in events per second. Sample output from mpstat is<br />
shown in Example 4.18.<br />
Example 4.18 Sample Output from mpstat<br />
$ mpstat 1<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 29 1 38 214 108 288 10 6 14 0 562 36 2 0 62<br />
1 27 1 27 44 29 177 9 6 67 0 516 33 2 0 65<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 7 0 11 207 103 64 9 10 0 0 7 39 1 0 60<br />
1 0 0 4 14 2 54 11 11 0 0 5 61 0 0 39<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 0 0 6 208 106 60 7 8 0 0 14 47 0 0 53<br />
1 0 0 65 16 9 46 6 7 0 0 4 53 2 0 45<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 0 0 6 204 103 36 6 3 0 0 5 68 0 0 32<br />
1 0 0 1 9 2 64 6 7 0 0 5 32 0 0 68<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 0 0 2 205 104 14 10 2 0 0 4 98 0 0 2<br />
1 0 0 1 34 31 93 2 2 0 0 15 2 0 0 98<br />
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl<br />
0 0 0 8 204 104 40 2 6 0 0 5 51 0 0 49<br />
1 0 0 0 11 2 58 8 6 0 0 5 49 0 0 51<br />
....<br />
Each line of output corresponds to a particular CPU for the previous second.<br />
The columns in the mpstat output are as follows.<br />
CPU: The ID of the CPU to which the data belongs. Data is reported on a per-<br />
CPU basis.