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

Re: CPU Usage Report (historical)

 
SOLVED
Go to solution
Marylou Kohlmeier
Frequent Advisor

CPU Usage Report (historical)

Is there a way to run a CPU usage report from previous days/months? I'm trying to gather information to justify a case during our "registration" period here at our campus.

Any info will be appreciated.

thank you,
Marylou
8 REPLIES 8
Mel Burslan
Honored Contributor

Re: CPU Usage Report (historical)

If you are or were running measureware (part of glance package, check process called mwa), you should have this data in the log files. Log files are placed in /var/opt/perf/datafiles.

If you have these files :

logappl
logdev
logglob
logindx
logpcmd0
logproc
logtran

you can use extract utility (if you do not have a graphical performance analysis tool that is) to get textual data out of them.

Hope this helps.
________________________________
UNIX because I majored in cryptology...
Marylou Kohlmeier
Frequent Advisor

Re: CPU Usage Report (historical)

root:/var/opt/perf/datafiles #ll
total 1904
-rw-r--r-- 1 root sys 472 Feb 26 2007 .glancerc
-rw-r--r-- 1 root sys 7540 Feb 26 2007 .gpm
-rw-rw-rw- 1 root sys 958411 Dec 5 2007 mikslp.db

These are all the files I have under the directory above and cannot find any with logdev, etc

Marylou
kevin_m
Valued Contributor

Re: CPU Usage Report (historical)

Are you by chance running sar? Check for the process using 'ps -ef|grep sad'. It will keep 30 days worth of history that has CPU statistics. Or just type 'sar' and see if you get any output. The default results are for the current day.
- Kevin
Marylou Kohlmeier
Frequent Advisor

Re: CPU Usage Report (historical)

If you use "SAR", how will you get the info for, let's say, last May?
Bill Hassell
Honored Contributor

Re: CPU Usage Report (historical)

There is no history kept automatically. You would have to already be running sar, glance or other tool with logs being kept. If not, there is no history data to look at.


Bill Hassell, sysadmin
kevin_m
Valued Contributor

Re: CPU Usage Report (historical)

Do you see any files in /var/adm/sa? Sar keeps 31 days of history in that directory (if it's been running that long). You could get information before that by restoring older files from backups. That's not the easiest solution but using sar for recent data is much faster than formatting the output of the extract command.
Marylou Kohlmeier
Frequent Advisor

Re: CPU Usage Report (historical)

sdisk
1/0/14/1/0.10.4.0.0.0.4
sdisk
1/0/0/3/1.2.0
4.0.0.0.4
root:/var/adm/sa #

I have plenty of files under /var/adm/sa, but they are all about sdisk
kevin_m
Valued Contributor
Solution

Re: CPU Usage Report (historical)

As suggested you might not have any history then. Check for the sad process or a crontab entry in case the files are located somewhere else. If it's not running I'd suggest adding it going forward. As an example this will capture stats at 10 minute intervals:
0 * * * * /usr/lbin/sa/sa1 600 6