1833883 Members
1860 Online
110063 Solutions
New Discussion

monitor CPU usage

 
SOLVED
Go to solution
Jan Shu
Regular Advisor

monitor CPU usage

Hi All,

I have a HP rp3460 server running hpux11.23 with 4 processors. How to monitor the cpu usage and send alerts to my emailbox, when a single CPU is over 75% usage for 1 hour, or total cpu over 75% usage for 15 min? Thank you.

Regards,
Jan
7 REPLIES 7
D Block 2
Respected Contributor

Re: monitor CPU usage

Jan- can you run: sar command ?

sar 1 10

you can vary the duration or intervals

you might monitor the CPU RunQ, this is more important than just busy work cpu.

if RunQ is long, then you have a real problem. If CPU is busy, then not a big problem. Well, unless you have 100% spinning CPU that might be related to a a Java Thread via SpinLock deadlock.
Golf is a Good Walk Spoiled, Mark Twain.
Jan Shu
Regular Advisor

Re: monitor CPU usage

Hi Tom,

I can run sar command, but I am not sure how to create a job to grep the sar result and send alerts to my pager if CPU is above 85% busy for more than 1 hour.


Thanks,

Regards,
Jan
John Guster
Trusted Contributor

Re: monitor CPU usage

Jan,
The usage of CPU is depending on the interval when you collect data. i.e over 15 minutes, avg maybe 30%, within this 15 minutes, it is possible 100% busy for a couple of seconds. Usually one collect data for days for capacity planning. That means you set script to collect data, then review it.over 75% or 85% usage of CPU is very good thing. If you want catch a runaway process, it will be another approching..
If you have measureware loaded, then there are data on CPU..Hope help. Cheers.
Jan Shu
Regular Advisor

Re: monitor CPU usage

Hi John, thanks for the update. Yes, I am trying to monitor Oracle runaway db jobs. Is there anyway to send alerts to my pager when there is runaway oracle process which is taking 85% CPU for 15 min to hours? Thanks.

Regards,
Jan
Coolmar
Esteemed Contributor
Solution

Re: monitor CPU usage

Hi,

CHeck out the following thread...Victor attached a script that monitors resources including CPU. You could probably apply at least a part of it to suit your needs.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1035476
Jan Shu
Regular Advisor

Re: monitor CPU usage

Hi Coolmar, Thank you for your help. I will look into Victor's script. Have a happy holiday season.

regards,
Jan
Jan Shu
Regular Advisor

Re: monitor CPU usage

I will try Coolmar's solution first. Thank you All.