version 1.59, 2006/04/14 01:08:15 |
version 1.60, 2006/04/14 01:14:56 |
|
|
psiz = 0; |
psiz = 0; |
f2 = 0.0; |
f2 = 0.0; |
|
|
/* |
|
* Last CPU state not calculated yet. |
|
*/ |
|
for (c = 0; c < CPUSTATES; c++) { |
for (c = 0; c < CPUSTATES; c++) { |
i = cpuorder[c]; |
i = cpuorder[c]; |
f1 = cputime(i); |
f1 = cputime(i); |
|
|
while (l-- > 0) |
while (l-- > 0) |
addch(cpuchar[c]); |
addch(cpuchar[c]); |
} |
} |
|
|
/* |
|
* The above code does not account for time in the CP_INTR state. |
|
* Thus the total may be less than 100%. If the total is less than |
|
* the previous total old data may be left on the graph. The graph |
|
* assumes one character position for every 2 percentage points for |
|
* a total of 50 positions. Ensure all positions have been filled. |
|
*/ |
|
while ( psiz++ <= 50 ) |
|
addch(' '); |
|
|
|
putint(ucount(), STATROW, STATCOL, 3); |
putint(ucount(), STATROW, STATCOL, 3); |
putfloat(avenrun[0], STATROW, STATCOL + 17, 6, 2, 0); |
putfloat(avenrun[0], STATROW, STATCOL + 17, 6, 2, 0); |