summaryrefslogtreecommitdiff
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-02 01:23:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-02 01:23:31 +0000
commit869088a97dea2c8dbae9b890c2716d0b5d71a4d6 (patch)
tree377ad1eacf1758adde28d8993f49ca17f34c5188 /usr.bin/vmstat/vmstat.c
parentc9f35332a66f063defada1b9c4767c60720f6095 (diff)
print i386 irqs nicer, so that sharing is more obvious
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 7caa671cdcc..808ecbcd879 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1,5 +1,5 @@
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.33 1999/08/16 19:06:15 art Exp $ */
+/* $OpenBSD: vmstat.c,v 1.34 1999/09/02 01:23:30 deraadt Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -746,7 +746,7 @@ dointr()
long inttotal;
time_t uptime;
int intrstray[16];
- char iname[17];
+ char iname[17], fname[31];
int i;
iname[16] = '\0';
@@ -763,7 +763,9 @@ dointr()
errx(1, "vmstat: ih: %s", kvm_geterr(kd));
if (kvm_read(kd, (u_long)ih.ih_what, iname, 16) != 16)
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;
ihp = ih.ih_next;
}