*BSD News Article 76241


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!newsserver.jvnc.net!newsreader.jvnc.net!news
From: John Lucas <jlucas@uvi.edu>
Subject: Re: CPU Utilization
Content-Type: text/plain; charset=us-ascii
Message-ID: <3214CCB0.41C67EA6@uvi.edu>
Sender: news@tigger.jvnc.net (Zee News Genie)
Content-Transfer-Encoding: 7bit
Organization: University of the Virgin Islands
References: <4u34m6$qt3@news.hits.net> <320755DA.3C8A@www.play-hookey.com> <Dvsy4B.5sJ@news.hawaii.edu>
Mime-Version: 1.0
Date: Fri, 16 Aug 1996 19:32:00 GMT
X-Mailer: Mozilla 2.01 (X11; I; FreeBSD 2.1.0-RELEASE i386)
Lines: 47

Christopher Y L Wong wrote:
> 
> Ken Bigelow (kbigelow@www.play-hookey.com) wrote:
> : Chris Wong wrote:
> : >
> : > I guess my previous post didn't get through.  Anyhow... I can't seem to
> : > get CPU percentages or any form of CPU utilization except uptime.
> : >
> : > Has anybody experienced this?  Is there something that isn't set up
> : > correctly?
> : >
> : > I'm using 2.1.0 btw.
> : >
> : > I've lived with it for so long but now...
> : >
> 
> : Run top to see activity of the most active processes. It's in the
> : packages distribution.
> : --
> 
> No... top/ps/vmstat whatnot doesn't work. It gives me 0.0% CPU %.
> Every one of them... Any ideas as to why?
> 

Maybe your CPU isn't doing anything :-}

Seriously, I have top from the 2.1.0 packages installed and I get the following
initial header on a system here:

load averages:   0.00,  0.00,  0.00  15:00:39
63 processes:  1 running, 61 sleeping, 1 zombie
Cpu states:  0.5% user,  0.0% nice,  0.5% system,  0.2% interrupt, 98.9% idle
Memory: 18M Act 3068K Inact 5696K Wired 536K Free 100% Swap


Addmittedly this system is lightly loaded but with 61 (small) processes
running, I do get a non-zero % CPU utilization. This system is a WWW server.
Unless you are running something compute intensive (compiling for instance),
your load is probably too small to show up. I also suspect the absolute
accuracy of any of these sorts of programs, they are best used as relative
measures. You can also get %CPU from : ps -Saux

-- 
| John Lucas                          jlucas@uvi.edu                 |
| Information Technology              NIC Handle: JL423              |
| University of the Virgin Islands    (809) 693-1216                 |
| St. Thomas, VI 00802                http://www.uvi.edu/jlucas.html |