blob: aa8256b7b7a9cf4cedb874bd275883ac930a7b97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
The following demonstrates the cpudists program. It prints distributions
of CPU time consumed by the Kernel, Idle thread, or Processes.
Here we run cpudists for 5 seconds once,
# ./cpudists 5 1
2005 Apr 28 00:08:42,
KERNEL
value ------------- Distribution ------------- count
4096 | 0
8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1134
16384 |@@@@@@@@@ 344
32768 |@@@ 104
65536 | 3
131072 | 0
262144 | 1
524288 | 0
1048576 | 11
2097152 | 0
PROCESS
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@ 170
32768 |@@@@@@@@@@@@@@@@@@ 331
65536 |@@@@@@@@ 152
131072 |@ 17
262144 |@ 25
524288 |@ 13
1048576 | 4
2097152 | 9
4194304 | 0
IDLE
value ------------- Distribution ------------- count
2097152 | 0
4194304 |@ 9
8388608 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 418
16777216 |@@@ 31
33554432 | 0
The value indicates the time in nanoseconds, the count the number of
runs for this length.
From the above, we can see the kernel has run many times - but for short
intervals each time. Processes have taken fom 10 to 60 microseconds;
and when the idle thread runs it runs for some time - around 8 milliseconds
for each.
cpudists has a "-a" option for all processes,
# ./cpudists -a 5 1
2005 Apr 28 00:17:34,
mapping-daemon
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 |@@@@@@@@@@@@@ 1
65536 | 0
sendmail
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 |@@@@@@@@@@@@@ 1
131072 | 0
nautilus
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 |@@@@@@@@@@@@@ 1
131072 | 0
fmd
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 |@@@@@@@@@@@@@ 1
131072 | 0
in.routed
value ------------- Distribution ------------- count
65536 | 0
131072 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
262144 | 0
miniserv.pl
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 | 0
131072 |@@@@@@@@@@@@@ 1
262144 | 0
xscreensaver
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 |@@@@@@@@@@@@@@@@@@@@ 2
131072 | 0
gnome-vfs-daemon
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@ 3
32768 | 0
65536 |@@@@@@@@@@@@@@@@ 2
131072 | 0
gnome-panel
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@ 1
32768 |@@@@@@@@@@@@@@@@ 2
65536 | 0
131072 |@@@@@@@@@@@@@@@@ 2
262144 | 0
svc.startd
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10
32768 |@@@@@@@@@@@ 4
65536 |@@@ 1
131072 | 0
nscd
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 25
32768 |@ 1
65536 | 0
131072 |@ 1
262144 | 0
gnome-netstatus-
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
32768 | 0
65536 | 0
131072 | 0
262144 | 0
524288 | 0
1048576 |@@@@@@@@@@@@@ 1
2097152 | 0
mixer_applet2
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@ 10
32768 |@@@@@@@@@@@@@@@@@ 19
65536 |@@@@@@@@@@@@@@ 16
131072 | 0
soffice.bin
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@ 7
32768 |@@@@@@@@@@@@@@@@@@@ 14
65536 |@@@@@@@@ 6
131072 | 0
262144 |@@@ 2
524288 | 0
1048576 | 0
2097152 |@ 1
4194304 | 0
dtrace
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@ 8
32768 | 0
65536 | 0
131072 | 0
262144 |@@@ 1
524288 |@@@@@@@@@ 3
1048576 | 0
2097152 |@@@ 1
4194304 | 0
Xorg
value ------------- Distribution ------------- count
32768 | 0
65536 |@@@@@@@@@@@@@@@@@@@@ 15
131072 |@@@@@@@@ 6
262144 |@@@@@@@@@@@@ 9
524288 | 0
java_vm
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@@@@@@@@@@@@@ 101
32768 |@@@@@@@@@@@@@@@@ 84
65536 |@@@@ 20
131072 | 0
gnome-terminal
value ------------- Distribution ------------- count
16384 | 0
32768 |@@@@@@@@@@@@@@@@ 12
65536 |@@@@@@@@@@@ 8
131072 |@ 1
262144 | 0
524288 |@@@@@@@@@@@@ 9
1048576 | 0
acroread
value ------------- Distribution ------------- count
8192 | 0
16384 | 1
32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 188
65536 |@@@@@@@@ 47
131072 |@@ 10
262144 | 0
mozilla-bin
value ------------- Distribution ------------- count
8192 | 0
16384 |@@@@@@@@ 21
32768 |@@@@@ 13
65536 |@@@@@@@@@@@@@ 36
131072 |@@@@@@@ 19
262144 |@@@ 9
524288 |@@ 5
1048576 |@ 2
2097152 |@@ 5
4194304 | 0
KERNEL
value ------------- Distribution ------------- count
4096 | 0
8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 1085
16384 |@@@@@@@@@@@ 443
32768 |@@ 98
65536 | 5
131072 | 1
262144 | 1
524288 | 0
1048576 | 11
2097152 | 0
fsflush
value ------------- Distribution ------------- count
131072 | 0
262144 |@@@@@@@ 1
524288 | 0
1048576 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
2097152 | 0
4194304 | 0
8388608 | 0
16777216 | 0
33554432 |@@@@@@@ 1
67108864 | 0
IDLE
value ------------- Distribution ------------- count
524288 | 0
1048576 | 1
2097152 | 0
4194304 |@ 13
8388608 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 411
16777216 |@@@ 31
33554432 | 0
|