From owner-cvs-all@FreeBSD.ORG Sun Jun 6 12:59:11 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 017B616A4CE; Sun, 6 Jun 2004 12:59:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D935143D53; Sun, 6 Jun 2004 12:59:10 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i56Jx6Wp051564; Sun, 6 Jun 2004 19:59:06 GMT (envelope-from green@repoman.freebsd.org) Received: (from green@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i56Jx6GF051563; Sun, 6 Jun 2004 19:59:06 GMT (envelope-from green) Message-Id: <200406061959.i56Jx6GF051563@repoman.freebsd.org> From: Brian Feldman Date: Sun, 6 Jun 2004 19:59:06 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/top machine.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 19:59:11 -0000 green 2004-06-06 19:59:06 UTC FreeBSD src repository Modified files: usr.bin/top machine.c Log: Do not use KERN_PROC_PROC with kvm_getproc(3); instead, if only process (and not thread) scope is to be displayed, use KERN_PROC_ALL and accrue CPU% ourselves, as the kernel makes no attempt to do so. Of course, this doesn't make most stats any less bogus when displaying threaded processes, but at least the CPU time is added up and not just always 0.00%. There are still issues with SCHED_ULE in top(1) that cause other processes to display 0.00% CPU when they in fact have used more. Revision Changes Path 1.51 +17 -4 src/usr.bin/top/machine.c