53 lines
2.2 KiB
Diff
53 lines
2.2 KiB
Diff
--- vmstat.c
|
|
+++ vmstat.c 2008-12-10 13:32:25.667300056 +0100
|
|
@@ -150,15 +150,15 @@ static int format_1000(unsigned long lon
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
static void new_header(void){
|
|
- printf("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n");
|
|
+ printf("procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------\n");
|
|
printf(
|
|
- "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s\n",
|
|
+ "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n",
|
|
"r","b",
|
|
"swpd", "free", a_option?"inact":"buff", a_option?"active":"cache",
|
|
"si","so",
|
|
"bi","bo",
|
|
"in","cs",
|
|
- "us","sy","id","wa"
|
|
+ "us","sy","id","wa", "st"
|
|
);
|
|
}
|
|
|
|
@@ -173,7 +173,7 @@ static unsigned long unitConvert(unsigne
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
static void new_format(void) {
|
|
- const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u\n";
|
|
+ const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
|
|
unsigned int tog=0; /* toggle switch for cleaner code */
|
|
unsigned int i;
|
|
unsigned int hz = Hertz;
|
|
@@ -217,8 +217,8 @@ static void new_format(void) {
|
|
(unsigned)( (100*duse + divo2) / Div ),
|
|
(unsigned)( (100*dsys + divo2) / Div ),
|
|
(unsigned)( (100*didl + divo2) / Div ),
|
|
- (unsigned)( (100*diow + divo2) / Div ) /* ,
|
|
- (unsigned)( (100*dstl + divo2) / Div ) */
|
|
+ (unsigned)( (100*diow + divo2) / Div ),
|
|
+ (unsigned)( (100*dstl + divo2) / Div )
|
|
);
|
|
|
|
for(i=1;i<num_updates;i++) { /* \\\\\\\\\\\\\\\\\\\\ main loop ////////////////// */
|
|
@@ -266,8 +266,8 @@ static void new_format(void) {
|
|
(unsigned)( (100*duse+divo2)/Div ), /*us*/
|
|
(unsigned)( (100*dsys+divo2)/Div ), /*sy*/
|
|
(unsigned)( (100*didl+divo2)/Div ), /*id*/
|
|
- (unsigned)( (100*diow+divo2)/Div )/*, //wa
|
|
- (unsigned)( (100*dstl+divo2)/Div ) //st */
|
|
+ (unsigned)( (100*diow+divo2)/Div ), //wa
|
|
+ (unsigned)( (100*dstl+divo2)/Div ) //st
|
|
);
|
|
}
|
|
}
|