Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Oct 1997 03:52:06 +0930
From:      Mike Smith <mike@smith.net.au>
To:        Zoltan Sebestyen <sebesty@cs.elte.hu>
Cc:        FreeBSD hackers mailinglist <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: cpu/memory monitoring 
Message-ID:  <199710031822.DAA04089@word.smith.net.au>
In-Reply-To: Your message of "Fri, 03 Oct 1997 19:11:38 %2B0200." <Pine.LNX.3.95.971003190823.5744A-100000@neumann.cs.elte.hu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I'd like to know if there's any other any other program than top, which
> monitors the REAL cpu and memory load, but have more simple source code.

What is "REAL cpu and memory load"?  

The problem here is, I think, that you have seen what Microsoft (and 
some other vendors) pass off as a "simple" CPU/memory monitor and think 
that there is some simple value that is "CPU load" or "memory load".

In reality, things aren't so simple.  What do you consider "memory 
load"?  Do you mean all pages that have been recently referenced?  All 
pages that are accounted for (ie. not "free")?  Do you classify pages 
into degrees of "freeness"?  

And how do you propose to accumulate this figure?  Traversing all of 
the memory information isn't cheap.   If you want to get a feel for 
memory usage, and to give you some idea of the complexity involved, try 
looking at the output of 'vmstat -m'.  And that's just the _kernel_.

As for CPU load, again: what is "CPU load"?  The amount of CPU time 
"not idle"?  How about otherwise-idle time that is consumed in 
speculative makework?  Is that "free but better-used"?  How about 
interrupt time?

The only way to present this sort of information is either to dumb it 
down Microsoft-style, or present it all and be generous enough to 
assume the user isn't completely stupid.

mike





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710031822.DAA04089>