Operating System - HP-UX
1833875 Members
3295 Online
110063 Solutions
New Discussion

How to enable USER CPU% monitoring?

 
SOLVED
Go to solution
Martti Muikkula
Occasional Visitor

How to enable USER CPU% monitoring?

Hello,
we are running opcagent Version: @(#)HP OpenView VantagePoint A.06.12.

The question is how to get monitored the avg USER CPU in dedicated system?
There is cpu_mon.sh, which checks only %sys, but we are interested in %sys.

BR Martti
9 REPLIES 9
TommyT
Valued Contributor

Re: How to enable USER CPU% monitoring?

Hi Martti.
There probally is some better way to do this but one way could be to use a logfile monitor.

If you use sar -u 30 30 and write the average output to a file, and then set up logfile reader to grep %usr you can define thresholds.

//Tommy
tompa
Senthil Kumar .A_1
Honored Contributor

Re: How to enable USER CPU% monitoring?

Hello Martti,


can you attach your cpu_mon.sh, we will help you modify the script for your requirement..

Once modified.. you can include this in OPC monitor template as a saperate entry so that usr% can be monitored separately.

Regards.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Cem Tugrul
Esteemed Contributor

Re: How to enable USER CPU% monitoring?

Hi Martti,
sar can be use with -u option cpu utilization.Also you can choose your interval and easily write a script,run from
cron.
Also another solution is Glance from Hp
but it is a licensed product.
Good luck,
Our greatest duty in this life is to help others. And please, if you can't
Steven E. Protter
Exalted Contributor

Re: How to enable USER CPU% monitoring?

attaching some potentially useful sar scripts.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cem Tugrul
Esteemed Contributor

Re: How to enable USER CPU% monitoring?

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=888142
Also it is new thread..
Good luck,
Our greatest duty in this life is to help others. And please, if you can't
Martti Muikkula
Occasional Visitor

Re: How to enable USER CPU% monitoring?

Thanks all for good hints!

I've tried to reply, but there's some resource problems in the forum.

Because MWA is in use, maybe the best way is to modify cpu_mon.sh.

Senthil, I'll attach the script here.

BR Martti
Cem Tugrul
Esteemed Contributor

Re: How to enable USER CPU% monitoring?

To Steven,

i sometimes use your scripts and really give
important info so i just want to thank to you
when i see you here

To Martti;
From now on;you may want to submit points
:-)

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Ermin Borovac
Honored Contributor
Solution

Re: How to enable USER CPU% monitoring?

The script is monitoring CPU system time and CPU idle time and it's reporting when values exceed defined thresholds in /var/opt/OV/conf/OpC/cpu_mon.cfg.

I've attached modified cpu_mon.sh that can report on CPU user time. You'll need to add two new parameters in /var/opt/OV/conf/OpC/cpu_mon.cfg: USER_THR and USER_TIMES.

Martti Muikkula
Occasional Visitor

Re: How to enable USER CPU% monitoring?

Thanks a lot!
I tested the script and it seems to work fine.