1834798 Members
2897 Online
110070 Solutions
New Discussion

Re: cannot sar -u

 
SOLVED
Go to solution
Sritharan
Valued Contributor

cannot sar -u

Hi,

when I do sar -u it shows
sar: Can't open /var/adm/sa/sa19

how do I get the sar daemon run ???

TIA

Sri
Known is a drop...unknown is an ocean -> quote from a movie
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: cannot sar -u

Hi Sri:

If you don't specify a sampling interval, 'sar' looks for a previously recorded file. Try something like:

# sar 5 10

This will yield 5-samples taken every 10-seconds. See the man pages (1M) for more information.

Regards!

...JRF...

Wodisch_1
Honored Contributor

Re: cannot sar -u

Hi Sri,

to setup "sadc" (the System Activity Data Collector) read the man page about "sadc" and follow the instruction about the "crontab" entries for "sa1" ("sa2" is not really needed).

About an hour later you should be able to use "sar" without interval parameters!

HTH,
Wodisch
nnf97
Regular Advisor

Re: cannot sar -u

Or you can just create the file which sar is looking for, in this case touch /var/adm/sa/sa19 would do it. The last two numbers reflect the date.
Live Free or Die (New Hampshire)
Philip Chan_1
Respected Contributor
Solution

Re: cannot sar -u

Sri,

Parameters were missing in your sar command, the correct syntax should be,

sar -u [n]

where is a compulsory argument which actually refer to sampling intervals (in seconds), and [n] is the number of repeats. Do "man sar" to see details.

BTW, there is no daemon process for sar (it doesn't require one).

Rgds,
Philip
Sritharan
Valued Contributor

Re: cannot sar -u

Hi,

Thanks everybody
I should read the man pages more !!!

Thanks Again
Sri
Known is a drop...unknown is an ocean -> quote from a movie
John Dvorchak
Honored Contributor

Re: cannot sar -u

What I do is run sar from cron every 20 minutes to give me a snapshot of the system. First make sure that the directory /var/adm/sa exists, if not create it. Then if you want to run sar in cron here is what I do on all of my machines:

# Sar records every 20 minutes during working hours and hourly otherwise
0 * * * 0,6 /usr/lbin/sa/sa1
0 8-17 * * 1-5 /usr/lbin/sa/sa1 1200 3
0 18-7 * * 1-5 /usr/lbin/sa/sa1


good luck

If it has wheels or a skirt, you can't afford it.