1832751 Members
2798 Online
110045 Solutions
New Discussion

Re: sar

 
Jade Bulante
Frequent Advisor

sar

I am trying to run the sar command and it gives me this error:

# sar -a
sar: Can't open /var/adm/sa/sa13

I have followed the instructions on the documentation page but the command does not work at all. Do I have to create a directory called sa??

I have also used this command:

/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`

Please let me know if you can help out??

Thanks.



8 REPLIES 8
Madhu Sudhan_1
Respected Contributor

Re: sar

If the above mentioned directory is not existent. Create it. You should be fine.

...Madhu
Think Positive
Maureen Gunkel
Trusted Contributor

Re: sar

Jade,
If the directory does exist, perhaps it is a permissions problem?
No matter where you go, there you are.
vladimir_1
Frequent Advisor

Re: sar

You have to specify at least a time interval:

sar -a 1

Regards
Darrel Louis
Honored Contributor

Re: sar

Jade,

By default the /var/adm/sa doesn't exists.
check man sar and sa1.

You can add it in cron so that every night a new file is created and that sar monitors your system.
If you have all the above but it still doesn't work, check with "what /usr/sbin/sar", which revision you have and with "cksum /usr/sbin/sar" for the sizes, if they are correct according with what it should be.
If you want to monitor sar for just now use:
sar -u 2 5.


Have Fun
jherring
Regular Advisor

Re: sar

vladmir is right if you are just running

# sar -a

this error is going to happen. You must specify the time interval.

Jon

Darrel Louis
Honored Contributor

Re: sar

Jade,

The full credit has to go to Vladimir.
The answer given by him is correct.
CHRIS_ANORUO
Honored Contributor

Re: sar

Update your crontab with the following
0 6-22 * * * /usr/lbin/sa/sa1 1200 4
30 22-5 * * * /usr/lbin/sa/sa1 1200 3
30 23 * * * /usr/lbin/sa/sa2 -s 00:00 -e 23:45 -i 3600 -u -b -d -w -q -v

Create directory "sa" in /var/adm and update your crontab as shown above or use the time intervals that suits you.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
nnf97
Regular Advisor

Re: sar

mkdir /var/adm/sa
mkdir /var/adm/sa/sa13
And you should be all set.
And after that you can start to figure out the various other settings that are available with sar.

Regards,
Nabeel
Live Free or Die (New Hampshire)