monitoring cpu load

monitoring cpu load

Post by hans m4 » Tue, 16 Aug 2005 05:39:31



hi all

i am running a sunfire v880 with 8 cpu's and
defined a project called "oracle" which
is bound to 2 cpu's

i am looking for a tool which reports the
cpu load for 2 specific cpu's like
"sar -u" does it for all cpu's

best regards
hans

--

 
 
 

monitoring cpu load

Post by Jean-Louis Liagr » Tue, 16 Aug 2005 05:41:22



> hi all

> i am running a sunfire v880 with 8 cpu's and
> defined a project called "oracle" which
> is bound to 2 cpu's

> i am looking for a tool which reports the
> cpu load for 2 specific cpu's like
> "sar -u" does it for all cpu's

mpstat

 
 
 

monitoring cpu load

Post by hans m4 » Thu, 18 Aug 2005 15:51:20


it gives only a current snapshot
it isn't possible to view previously collected data
with mpstat, isn't it ?

best regards
hans

--

 
 
 

monitoring cpu load

Post by Jean-Louis Liagr » Thu, 18 Aug 2005 16:32:15



> it gives only a current snapshot

without arguments, it actually gives an average of stats
since last reboot.

Quote:> it isn't possible to view previously collected data
> with mpstat, isn't it ?

mpstat doesn't collect samples, but you can easily script it, eg:

mpstat 30 120 > /var/tmp/mpstat.out

will collect for one hour with a 30 sec interval.

You can also directly peek the kernel counters like this:

kstat -T d -p cpu:*:sys:cpu_ticks_idle \
   cpu:*:sys:cpu_ticks_kernel cpu:*:sys:cpu_ticks_user 30