Operating System - HP-UX
1748175 Members
4291 Online
108758 Solutions
New Discussion юеВ

Re: how to check CPU utilization

 
resolve of disks fails
Occasional Advisor

how to check CPU utilization

Hi

I run the glance command to check CPU utilization there I got CPU utilization as follows Current=7% Average=21% and High=100%.Is there any command or tool from which we can check for which perticular process it got 100% .I want to check this 100% even after one day also.

Regards
Vishal
9 REPLIES 9
Sunny123_1
Esteemed Contributor

Re: how to check CPU utilization

Hi

You can use top command or sar utility.

Refer the man pages of sar and top.

Regards
Sunny
Steven E. Protter
Exalted Contributor

Re: how to check CPU utilization

Shalom,

top.

sar

glance/gpm

Check out this script set:
http://www.hpux.ws/?p=6

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
Stephan.
Honored Contributor

Re: how to check CPU utilization

Hi Vishal,
you can use perfview to analyse the historical data - glance is just for real time analyses.
resolve of disks fails
Occasional Advisor

Re: how to check CPU utilization

Hi,

By using sar ,top command i can see only present running process but not yesterdays process. I want to see previous days process for which CPU utilizationgoes high(100%).For that any specific commnad .How i need install following script http://www.hpux.ws/?p=6.What exactly it will do .


Regards
Vishal
Ganesan R
Honored Contributor

Re: how to check CPU utilization

Hi,

You need OVPA, perfview to get the historical data. OVPA will work with glance to store the historical data.

Top, sar, glance will not give you the historical data.
Best wishes,

Ganesh.
Tingli
Esteemed Contributor

Re: how to check CPU utilization

sar can be set in crontab and the saved file will be kept in /var/adm/sa. For example:

0,10,20,30,40,50 * * * * /usr/lib/sa/sa1
45 23 * * 1-5 /usr/lib/sa/sa2 -i 1200 -A

You can just view the files in /var/adm/sa which has the info of cpu for last 30 days.

Bill Hassell
Honored Contributor

Re: how to check CPU utilization

No need to use another utility. Run glance, then press the letter o (that's lowercase o) and press return to select the first option: 1) process. You will now see a table that allows you to filter only interesting processes. I typically fill in the form with CPU = 10, disk = 50, RSS=300, VSS=500, user,program,TTY set to all, match=or and sort by cpu. Then Perform Task (if you have softkeys on your terminal, or press return until it goes back to the main screen. Now the heaviest CPU load will be at the top of the list.

Hint: While glance is running, press the ? character. It shows you all the shortcut keys like d for disk or l for lan or i for filesystem I/O.


Bill Hassell, sysadmin
resolve of disks fails
Occasional Advisor

Re: how to check CPU utilization

Hi

As per the steps I run glance then pressed small letter "o" then pressed the return till goes to main menu .In main menu I able to see todays process but I what want is two days back processes.Is there any option where i can get date & time wise process list
So that i can identify the process which took more time

Regards
Vishal
Bill Hassell
Honored Contributor

Re: how to check CPU utilization

Glance is a real time display and always shows what is happening now. However, in the background, there are logs kept in /var/opt/perf which contains records for several days. You must run the extract program to find the options you need to see CPU usage at a particular date and time. Use the command: man extract to see the options.


Bill Hassell, sysadmin