Unix restarts error in sar command

Hi Folks,

I am again here with a peculier problem.

Please see the code

[3:23pm] root@celdws01: # sar -u -f /var/adm/sa/sa21

SunOS celdws01 5.9 Generic_118558-34 sun4u    12/21/2011

10:10:09    %usr    %sys    %wio   %idle
10:10:09        unix restarts    

Can anyone help me in understanding the problem?

I suspect that you are not running the data collection programs in cron.
If you do not collect the data, it will not be there for "sar".
See "man sa1" on most systems.

It always helps to mention what Operating System and version you have.

Thanks for the reply bro..but my system is SOLARIS 9.0 and i have the DC program in sys cron scheduled..still it doesn't work..I have also restarted the cron..

Please post the data collection cron entries and a directory listing of the example "sa21" file which will show file permissions.

Is "sar" basically working (albeit without history):

sar -u 10 10
  0 * * * 0-6 /usr/lib/sa/sa1
  0,20,40 * * * 0-6 /usr/lib/sa/sa1
  

This is the entry in sys cron for Data collection.
the sa21 file has permissions of 777.

Normal sar is working without any error

Next check your cron log and see if these crons are running and not failing for some reason.

You don't seem to be running "sa2". Unless you run "sa2" (or have some other way of maintaining the "sa" files on a daily basis) there will be data from the same day number in previous months which you do not want. This could include a restart from months ago.

I'm not sure that your second "sa1" cron is correct. See "man sa1" for an example.

Does this output anything:

grep sys /etc/cron.d/cron.deny
grep sys /etc/cron.d/cron.allow

Hi Methyl,

The same codes are implemented on other systems and the sar works fine.
So there is no doubt about the cron entry.

Please suggest something else Bro..

Maybe this will help (but just realized you may be having issue just with sa21 file, so the below URL may not help in your case)

SUMMARY: sar not working in Solaris 9 on V880 or V240

So does the "unix restarts" only appears for sa21 file? If that is just one file and rest of the sar outputs fine, then you have corrupted sar data in that file. Probably nothing you can do about it.

Bro..this appears in all the files..