Re: [wmii] Re: Adding cpu usage to status bar

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Tue, 5 May 2009 16:46:34 -0400

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.

>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.

-- 
Kris Maglione
You do not really understand something unless you can explain it to
your grandmother.
	--Albert Einstein

Received on Tue May 05 2009 - 20:46:34 UTC

This archive was generated by hypermail 2.2.0 : Tue May 05 2009 - 20:48:07 UTC