Operating System - HP-UX
1832872 Members
2245 Online
110048 Solutions
New Discussion

Re: Monitor CPU usage over a period of time.

 
SOLVED
Go to solution
CJENSEN_1
Regular Advisor

Monitor CPU usage over a period of time.

Hello Everyone,
Is there an easy way to monitor CPU usage over the course of an 8hour day? IE - is there anything else other than sar or top that is within HPUX 11.11? This is on a RP5470 server.
Thanks,
8 REPLIES 8
TwoProc
Honored Contributor
Solution

Re: Monitor CPU usage over a period of time.

Easy way is a) Glance and b) Perfview. Glance is good at giving you the "right now" picture. Perfview will give you the view over time - comparing days to days etc, over a large time over many variables. Both must be purchased from HP. A free trial of Glance is on your installation CD's. You could call your HP salesman for a trial eval period of Perfview, and I'm sure they'd grant it.
We are the people our parents warned us about --Jimmy Buffett
Rick Garland
Honored Contributor

Re: Monitor CPU usage over a period of time.

PerfView for viewing trend attributes over a period of time.

Glance is "real-time"

top is real time.

sar lets you specify time length and the time increments, if you want to collect every 15 min or every 30 min.

Tim D Fulford
Honored Contributor

Re: Monitor CPU usage over a period of time.

Hi

As the previous reply said PerfView is only fore viewing the stats. MeasureWare or PerformanceAgent actually logs the data.. This data can then be viewed by PerfView, or you can output it into ASCII & importv into MS Excel.

To install MeasureWare you actually install GlancePlus PAK... The PAK bit is important, as it contains the measureware software. If you install GlancePlus you ONLY get glance... Ive come across quite a few servers where people say I have Glance, therefor I have measureware.. this is not so.

Regards

Tim
-
Devesh Pant_1
Esteemed Contributor

Re: Monitor CPU usage over a period of time.

You can use sar in a script and call the script though cron every few minutes and appeed the output to a file

for CPU
eg. sar -u >> /{dir}/cpu_filename
for multiporocessor activity
eg. sar -M >> /{dir}/multi_cpu_filename

thanks
Devesh
Rory R Hammond
Trusted Contributor

Re: Monitor CPU usage over a period of time.

I have a script that runs about every 15 minutes
from cron taking snap shots the are very involved but a simple example is as follows

vmstat |grep -v o >> logfile

that the letter o in grep (it removes the headers)

the output is one line record. you are intereted in the CPU IDLE colume (man vmstat)

I put a header in logfile and have them named
vm01, vm02 ...vm31 so I can track cpu swaping etc for the last 31 days. do montly summary
Got examples for O'Reilly System Performance Tuning (pub Dec 1992).
You can do something similar with "uptime"

Rory
There are a 100 ways to do things and 97 of them are right
Steven E. Protter
Exalted Contributor

Re: Monitor CPU usage over a period of time.

Attaching a full range of sar scripts:

Can be run for any length of time.

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
Gopi Sekar
Honored Contributor

Re: Monitor CPU usage over a period of time.


you can use sar utility. add it in to crontab and get it executed every 1 minute or so. it collects the statistics and stores it in /var/log/ directory

Regards,
Gopi
Never Never Never Giveup
Sยภเl Kย๓คг
Respected Contributor

Re: Monitor CPU usage over a period of time.

PerfView would be the best solution
Your imagination is the preview of your life's coming attractions