From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 4 14:02:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2A0A16A41C for ; Sat, 4 Jun 2005 14:02:01 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from Neo-Vortex.net (203-173-58-65.dyn.iinet.net.au [203.173.58.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37ABD43D1D for ; Sat, 4 Jun 2005 14:02:00 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from localhost.Neo-Vortex.net (Neo-Vortex@localhost.Neo-Vortex.net [127.0.0.1]) by Neo-Vortex.net (8.13.1/8.12.10) with ESMTP id j54E1wOS063437 for ; Sun, 5 Jun 2005 00:01:58 +1000 (EST) (envelope-from root@Neo-Vortex.net) Date: Sun, 5 Jun 2005 00:01:58 +1000 (EST) From: Neo-Vortex To: freebsd-hackers@freebsd.org Message-ID: <20050604235846.X62115@Neo-Vortex.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: vmstat reporting incorrect cpu usage X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2005 14:02:02 -0000 I've noticed if i run vmstat with no params when rebuilding the kernel i get this right: # vmstat procs memory page disk faults cpu r b w avm fre flt re pi po fr sr ad0 in sy cs us sy id 2 1 0 294156 44596 313 0 0 0 296 1 0 82 85 225 14 8 78 # But, if i run it like this # vmstat -c 2 procs memory page disk faults cpu r b w avm fre flt re pi po fr sr ad0 in sy cs us sy id 1 1 0 299580 38204 313 0 0 0 296 1 0 82 85 225 14 8 78 1 1 0 294996 42876 886 0 0 0 2061 0 3 2222 1364 2231 81 19 0 # The second result shows what top does, but the first one seems to be completely wrong... # vmstat -c 6 procs memory page disk faults cpu r b w avm fre flt re pi po fr sr ad0 in sy cs us sy id 1 1 0 300136 36196 313 0 0 0 296 1 0 82 85 225 14 8 78 1 1 0 301040 35312 230 0 0 0 9 0 0 2193 489 2156 87 13 0 1 1 0 296720 39644 1234 0 0 0 2326 0 5 2190 1530 2185 70 30 0 1 1 0 297092 39228 1435 0 0 0 1336 0 3 2200 1562 2188 75 25 0 1 1 0 298488 37844 1573 0 0 0 1229 0 4 2206 1592 2191 69 31 0 1 1 0 299372 36908 316 0 0 0 123 0 96 2301 618 2442 86 14 0 # Only the first one seems to do it though... FreeBSD 5.3-RELEASE. Does this happen for anyone else? (Mabe someone running 5.4 can test this?) ~Neo-Vortex