Kris Maglione <maglione.k_AT_gmail.com> wrote:
> [-- text/plain, encoding 7bit, charset: us-ascii, 36 lines --]
> 
> On Tue, May 05, 2009 at 06:50:07PM +0100, Alexander Clouter wrote:
>>Eugh, that truly is horrible.
>>
>>Have a look at /proc/stat and section 1.8 of 
>>Documentation/filesystems/proc.txt in the Linux kernel tree.
> 
> You're right, but I don't think /proc/stat is especially useful. 
> It requires too much processing for a script. I've lately used 
> iostat, because it gives me disk useage information along with 
> CPU usage. The attached script is fairly arcane, but most of it 
> goes towards determining the background/foreground color for a 
> given usage.
>
The intertubes seems rather keen on 'sar' (from the Debian 'sysstat' 
package) for skinning this particular cat.  For me I still cannot recall 
my CPU running at anything realistically other than 100% or 0%.
>>To be honest, getting CPU 'usage' is pretty pointless as it's either 
>>busy, idle or busy waiting on IO.  You should be using loadavg really 
>>as instantaneous CPU usage tells you nothing.
> 
> I don't agree. I have my load averages in my bar, but I still 
> generally find immediate CPU usage statistics more useful. Load 
> averages are probably useful for servers, but for my 
> workstations, I like to know fairly immediately when something 
> starts using a lot of CPU time, and I find my brain more than 
> apt at guessing just how loaded my system is based on those 
> data. As for load averages, I have to wait at least 30 seconds 
> before I begin to see the effect of any runaway process, and the 
> value never seems to be of nearly as much use to me as the CPU 
> utilization percentage.
> 
Every person for themselves I guess :)
One thing I will say in my 'defence', that 30 seconds lag is the time it 
takes for it to *settle*...meanwhile it is visibly rising every second 
as it's a 30 second average sampling at 1Hz.
Cheers
-- Alexander Clouter .sigmonster says: No campfires allowed.Received on Tue May 05 2009 - 22:20:21 UTC
This archive was generated by hypermail 2.2.0 : Tue May 05 2009 - 23:12:08 UTC