[BACK]Return to vmstat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vmstat

Diff for /src/usr.bin/vmstat/vmstat.c between version 1.113 and 1.114

version 1.113, 2009/10/27 23:59:49 version 1.114, 2009/11/22 22:22:14
Line 390 
Line 390 
                         warn("could not read vm.vmmeter");                          warn("could not read vm.vmmeter");
                         bzero(&total, sizeof(total));                          bzero(&total, sizeof(total));
                 }                  }
                 (void)printf("%2u%2u%2u",                  (void)printf(" %u %u %u ",
                     total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw);                      total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw);
 #define rate(x) ((((unsigned)x) + halfuptime) / uptime) /* round */  #define rate(x) ((((unsigned)x) + halfuptime) / uptime) /* round */
 #define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10))  #define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10))
                 (void)printf("%7u %7u ",                  (void)printf("%6u %7u ",
                     pgtok(total.t_avm), pgtok(total.t_free));                      pgtok(total.t_avm), pgtok(total.t_free));
                 (void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults));                  (void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults));
                 (void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact));                  (void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact));
Line 427 
Line 427 
 printhdr(void)  printhdr(void)
 {  {
         int i;          int i;
           static int printedhdr;
   
           if (printedhdr && !isatty(STDOUT_FILENO))
                   return;
   
         (void)printf(" procs    memory       page%*s", 20, "");          (void)printf(" procs    memory       page%*s", 20, "");
         if (ndrives > 0)          if (ndrives > 0)
                 (void)printf("%s %*straps          cpu\n",                  (void)printf("%s %*straps          cpu\n",
Line 445 
Line 449 
                             dr_name[i][strlen(dr_name[i]) - 1]);                              dr_name[i][strlen(dr_name[i]) - 1]);
         (void)printf(" int   sys   cs us sy id\n");          (void)printf(" int   sys   cs us sy id\n");
         hdrcnt = winlines - 2;          hdrcnt = winlines - 2;
           printedhdr = 1;
 }  }
   
 /*  /*

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114