[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.105 and 1.106

version 1.105, 2007/09/13 22:30:51 version 1.106, 2007/10/26 14:15:25
Line 416 
Line 416 
                     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) (((x) + halfuptime) / uptime)   /* round */  #define rate(x) (((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("%7u %7u ",
                     pgtok(total.t_avm), pgtok(total.t_free));                      pgtok(total.t_avm), pgtok(total.t_free));
                 (void)printf("%5u ", 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));
                 (void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins));                  (void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins));
                 (void)printf("%3u %3u ",                  (void)printf("%3u %3u ",
Line 450 
Line 450 
 {  {
         int i;          int i;
   
         (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",
                    ((ndrives > 1) ? "disks" : "disk"),                     ((ndrives > 1) ? "disks" : "disk"),
                    ((ndrives > 1) ? ndrives * 4 - 4 : 0), "");                     ((ndrives > 1) ? ndrives * 4 - 5 : 0), "");
         else          else
                 (void)printf("%*s  traps          cpu\n",                  (void)printf("%*s  traps           cpu\n",
                    ndrives * 3, "");                     ndrives * 3, "");
   
         (void)printf(" r b w    avm    fre   flt  re  pi  po  fr  sr ");          (void)printf(" r b w    avm     fre  flt  re  pi  po  fr  sr ");
         for (i = 0; i < dk_ndrive; i++)          for (i = 0; i < dk_ndrive; i++)
                 if (dk_select[i])                  if (dk_select[i])
                         (void)printf("%c%c%c ", dr_name[i][0],                          (void)printf("%c%c%c ", dr_name[i][0],

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106