version 1.33, 1999/08/16 19:06:15 |
version 1.34, 1999/09/02 01:23:30 |
|
|
long inttotal; |
long inttotal; |
time_t uptime; |
time_t uptime; |
int intrstray[16]; |
int intrstray[16]; |
char iname[17]; |
char iname[17], fname[31]; |
int i; |
int i; |
|
|
iname[16] = '\0'; |
iname[16] = '\0'; |
|
|
errx(1, "vmstat: ih: %s", kvm_geterr(kd)); |
errx(1, "vmstat: ih: %s", kvm_geterr(kd)); |
if (kvm_read(kd, (u_long)ih.ih_what, iname, 16) != 16) |
if (kvm_read(kd, (u_long)ih.ih_what, iname, 16) != 16) |
errx(1, "vmstat: ih_what: %s", kvm_geterr(kd)); |
errx(1, "vmstat: ih_what: %s", kvm_geterr(kd)); |
printf("%-16.16s %10ld %8ld\n", iname, ih.ih_count, ih.ih_count / uptime); |
snprintf(fname, sizeof fname, "irq%d/%s", i, iname); |
|
printf("%-16.16s %10ld %8ld\n", fname, ih.ih_count, |
|
ih.ih_count / uptime); |
inttotal += ih.ih_count; |
inttotal += ih.ih_count; |
ihp = ih.ih_next; |
ihp = ih.ih_next; |
} |
} |