From owner-freebsd-bugs Wed Jan 19 8: 0: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 28BC214DC8 for ; Wed, 19 Jan 2000 08:00:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA99183; Wed, 19 Jan 2000 08:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from irbs.irbs.com (irbs.irbs.com [209.36.62.129]) by hub.freebsd.org (Postfix) with ESMTP id A2574152BE for ; Wed, 19 Jan 2000 07:54:21 -0800 (PST) (envelope-from jc@irbs.com) Received: (from jc@localhost) by irbs.irbs.com (8.8.5/8.8.5) id KAA05077; Wed, 19 Jan 2000 10:54:10 -0500 (EST) Message-Id: <200001191554.KAA05077@irbs.irbs.com> Date: Wed, 19 Jan 2000 10:54:10 -0500 (EST) From: John Capo Reply-To: jc@irbs.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/16206: PATCH: vmstat column alignment, %ll not supported in -stable Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 16206 >Category: bin >Synopsis: PATCH: vmstat column alignment, %ll not supported in -stable >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 19 08:00:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: John Capo >Release: FreeBSD 3.4-STABLE i386 >Organization: IRBS Engineering >Environment: 3.4 system with high interrupt rate >Description: 3.4 with latest vmstat.c MFC: interrupt total rate clk0 irq0 88009614 99 rtc0 irq8 112654001 127 pci irq12 1681736896 1910 pci irq15 824752586 937 pci irq10 1645044289 1869 pci irq11 206810620 234 fdc0 irq6 1 0 wdc0 irq14 149002 0 Total 264189713 1 Bogus column alignment and Total printed as 32 bit value. With included patch: interrupt total rate clk0 irq0 88010165 99 rtc0 irq8 112654707 127 pci irq12 1681747863 1910 pci irq15 824757776 937 pci irq10 1645055676 1869 pci irq11 206811727 234 fdc0 irq6 1 0 wdc0 irq14 149004 0 Total 4559186919 5180 >How-To-Repeat: Generate a bunch of interrupts, run vmstat -i >Fix: Index: vmstat.c =================================================================== RCS file: /usr/cvs/src/usr.bin/vmstat/vmstat.c,v retrieving revision 1.29.2.3 diff -u -r1.29.2.3 vmstat.c --- vmstat.c 2000/01/18 17:39:38 1.29.2.3 +++ vmstat.c 2000/01/19 15:43:43 @@ -774,18 +774,18 @@ errx(1, "malloc"); kread(X_INTRCNT, intrcnt, (size_t)nintr); kread(X_INTRNAMES, intrname, (size_t)inamlen); - (void)printf("interrupt total rate\n"); + (void)printf("interrupt total rate\n"); inttotal = 0; nintr /= sizeof(long); while (--nintr >= 0) { if (*intrcnt) - (void)printf("%-12s %8lu %8lu\n", intrname, + (void)printf("%-12s %10lu %8lu\n", intrname, *intrcnt, *intrcnt / uptime); intrname += strlen(intrname) + 1; inttotal += *intrcnt++; } - (void)printf("Total %8llu %8llu\n", inttotal, - inttotal / (u_int64_t) uptime); + (void)printf("Total %10qu %8qu\n", inttotal, + inttotal / uptime); } void >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message