[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.84 and 1.85

version 1.84, 2004/06/11 16:09:08 version 1.85, 2004/06/14 00:38:02
Line 233 
Line 233 
                         setgid(getgid());                          setgid(getgid());
                         setegid(getegid());                          setegid(getegid());
   
   #ifdef __i386__
                           if (c == 1 && namelist[X_APICINTRHAND].n_value == 0)
                                   printf("huh\n");
                           else
   #endif
                         if (c > 0) {                          if (c > 0) {
                                 (void)fprintf(stderr,                                  (void)fprintf(stderr,
                                     "%s: undefined symbols:", __progname);                                      "%s: undefined symbols:", __progname);
Line 729 
Line 734 
   
         (void)printf("interrupt             total     rate\n");          (void)printf("interrupt             total     rate\n");
   
         {          kread(X_INTRHAND, intrhand, sizeof(intrhand));
                 kread(X_INTRHAND, intrhand, sizeof(intrhand));          kread(X_INTRSTRAY, intrstray, sizeof(intrstray));
                 kread(X_INTRSTRAY, intrstray, sizeof(intrstray));  
   
                 for (i = 0; i < 16; i++) {          for (i = 0; i < 16; i++) {
                         ihp = intrhand[i];                  ihp = intrhand[i];
                         while (ihp) {                  while (ihp) {
                                 if (kvm_read(kd, (u_long)ihp, &ih,                          if (kvm_read(kd, (u_long)ihp, &ih,
                                     sizeof(ih)) != sizeof(ih))                              sizeof(ih)) != sizeof(ih))
                                         errx(1, "vmstat: ih: %s",                                  errx(1, "vmstat: ih: %s",
                                             kvm_geterr(kd));                                      kvm_geterr(kd));
                                 if (kvm_read(kd, (u_long)ih.ih_what, iname,                          if (kvm_read(kd, (u_long)ih.ih_what, iname,
                                     16) != 16)                              16) != 16)
                                         errx(1, "vmstat: ih_what: %s",                                  errx(1, "vmstat: ih_what: %s",
                                             kvm_geterr(kd));                                      kvm_geterr(kd));
                                 snprintf(fname, sizeof fname, "irq%d/%s", i,                          snprintf(fname, sizeof fname, "irq%d/%s", i,
                                     iname);                              iname);
                                 printf("%-16.16s %10lu %8lu\n", fname,                          printf("%-16.16s %10lu %8lu\n", fname,
                                     ih.ih_count, ih.ih_count / uptime);                              ih.ih_count, ih.ih_count / uptime);
                                 inttotal += ih.ih_count;                          inttotal += ih.ih_count;
                                 ihp = ih.ih_next;                          ihp = ih.ih_next;
                         }  
                 }                  }
         }          }
         {          if (namelist[X_APICINTRHAND].n_value) {
                 kread(X_APICINTRHAND, apicintrhand, sizeof(apicintrhand));                  kread(X_APICINTRHAND, apicintrhand, sizeof(apicintrhand));
   
                 for (i = 0; i < 256; i++) {                  for (i = 0; i < 256; i++) {

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85