1830204 Members
14943 Online
109999 Solutions
New Discussion

CPU utilization

 
SOLVED
Go to solution
TMcB
Super Advisor

CPU utilization

Hi folks,

On one of my HPUX servers, glance plus is intsalled and gives me the avarage and high CPU utilization.

Can anyone advise me as to how can I find this out on all my other servers (none of which have glance plus)

Thanks for your help
12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: CPU utilization

Hi Terry:

You can use the old UNIX standby's - sar and sadc.

sadc (System activity data collector) can be used to take snapshots on a fixed interval. This does not mean that you will capture peak just what ever the metric happens to be at that point in time.

Man sar and sadc for details.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: CPU utilization

Hi again Terry:

Plan B - you can install the 30-day trial version of Glance on your other boxes from the Application CD's.
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: CPU utilization

Hi,

You can use sar command. sar -u 5 10

You can also use top cammand

man sar for details.

Goodluck..

-USA...
Good Luck..
Carsten Krege
Honored Contributor

Re: CPU utilization

sar should do it for you. E.g.

# sar 5 5
measures 5 times the CPU utilization for 5 second each (good for average)

# sar 1 5
measures 5 times the CPU utilization for 1 second each (good for peak)

Alternatively you can use top(1m) or could install the trial license of Glance on your other unix boxes (expires after some weeks).

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Santosh Nair_1
Honored Contributor

Re: CPU utilization

Top is a really nice utility or you can get yamm (one of my favorites) from the HP porting center:

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/yamm-2.6.0

-Santosh
Life is what's happening while you're busy making other plans
Deshpande Prashant
Honored Contributor

Re: CPU utilization

Hi Terry
For online monitoring you can use
#sar -u 1 5 or #top

If possible install glance on rest systems from app. CD.
You can capture/store history using measureware software or using sadc (/usr/lbin/sa1 and /usr/lbin/sa2 commands) in cronjobs.

Thanks.
Prashant
Take it as it comes.
TMcB
Super Advisor

Re: CPU utilization

Hello again,

I have been able to find out what I need from using sar, but I would now like to be able to run this as a cron job and monitor the systems for 24hours.
I have tried the command /usr/lbin/sa/sa1 and get thef following message :
sadc: Can't create/open data file: No such file or directory

Also, for 24hour monitoring, what would be the best intervalsto add in the cron job

Thanks for your help.
A. Clay Stephenson
Acclaimed Contributor

Re: CPU utilization

HI:

You simply need to create the directrory /var/adm/sa assuming that is where the sa1 script has defined the datafiles directory.

I typically use a 20 min sampling interval.
If it ain't broke, I can fix that.
TMcB
Super Advisor

Re: CPU utilization

Thanks - cron job is now running.
This has created a file /var/adm/sa/sa17,
which is a binary file.
How do I then get the information I want from this file

Again, thankyou.
Volker Borowski
Honored Contributor

Re: CPU utilization

Hi Terry,

if you want a surveiliance for several systems and may be even statistics later, you might consider to try

http://www.bb4.com

Several monitoring agents for this tool appear at http://www.deadcat.net

Hope this helps
Volker
Uday_S_Ankolekar
Honored Contributor

Re: CPU utilization

Hi,

You can also try sarcheck utility for a month free.
www.sarcheck.com for more details.
-USA..
Good Luck..
A. Clay Stephenson
Acclaimed Contributor

Re: CPU utilization

To now get the data from the sa* files, you simply do a sar, e.g. sar -u will display CPU utilization using today's statistics files. You can specify a -f option to choose another day's data.

Any options that sar supports with a number of samples/sampling period set of arguments will not work instrad on today's file by default.


Man sar for all the possible options.

Clay

If it ain't broke, I can fix that.