Subject: Re: CPU states
To: Petar Bogdanovic <p+netbsd@2005.smokva.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 04/05/2006 13:58:34
On Wed, 5 Apr 2006, Petar Bogdanovic wrote:

> is there another way then top(1) to get the following line?
> 
> *****************************************************
> CPU states: 1.0% user, 3.9% nice, 5.9% system, 28.4% interrupt, 60.8% idle

sysctl kern.cp_time

For example:

$ sysctl kern.cp_time
kern.cp_time: user = 9642517, nice = 5103238, sys = 3244004, intr = 
150236, idle = 424285181

I think you can add all up to be the total and then do percentages for 
each.

 Jeremy C. Reed

echo '9,J8HD,fDGG8B@?:536FC5=8@I;C5?@H5B0D@5GBIELD54DL>@8L?:5GDEJ8LDG1' |\
sed ss,s50EBsg | tr 0-M 'p.wBt SgiIlxmLhan:o,erDsduv/cyP'