System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

sar -f showing output from a month ago instead of yesterday

SOLVED
Go to solution
Craig Storm
Occasional Visitor

sar -f showing output from a month ago instead of yesterday

When I issue the command:

sar -u -f /var/adm/sa/sa04

I get output from one month ago instead of from yesterday. In other words, if today is 5/5/2009, I get sar output from 4/4/2009. Has anyone seen this behavior and know how to fix it?
6 REPLIES
Steven E. Protter
Exalted Contributor

Re: sar -f showing output from a month ago instead of yesterday

Shalom,

Your system is not regularly updating performance data. There is usually a daemon on most distributions of Linux that updates this data.

It is not running on your system.

I can not be more specific as you have not shared with us your distribution information.

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
skt_skt
Honored Contributor

Re: sar -f showing output from a month ago instead of yesterday

was the time stamp of /var/adm/sa/sa04 in May or April?
Craig Storm
Occasional Visitor

Re: sar -f showing output from a month ago instead of yesterday

I appreciate the prompt replies to my question. sar is running daily on my servers. The time stamps on the files under /var/adm/sa are showing the correct dates. Example:

-rw-r--r-- 1 root root 3759994 May 4 23:53 sar04
-rw-r--r-- 1 root root 2277744 May 4 23:55 sa04

command and resulting output shows:

# sar -u -f /var/adm/sa/sa04|head
Linux 2.6.9-78.0.8.ELsmp (combined) 04/04/2009

12:00:02 AM CPU %user %nice %system %iowait %idle
12:05:02 AM all 12.66 0.00 0.21 0.08 87.04
Ivan Ferreira
Honored Contributor
Solution

Re: sar -f showing output from a month ago instead of yesterday

Looks like a bug, and somebody is not doing it's homework:

https://bugzilla.redhat.com/show_bug.cgi?id=469137

My suggestion, you should use collectl instead of sar.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Craig Storm
Occasional Visitor

Re: sar -f showing output from a month ago instead of yesterday

Very useful information. The link contains content that will lead to getting this problem resolved. Thanks to all who responded.
Ivan Ferreira
Honored Contributor

Re: sar -f showing output from a month ago instead of yesterday

Hi Craig. The best way to thank is by assigning points to the answers you get.

Please review:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Cheers.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?