1827207 Members
2358 Online
109716 Solutions
New Discussion

sar problem?

 
SOLVED
Go to solution
leereg_6
Advisor

sar problem?

# sar
sar: Can't open /var/adm/sa/sa29


How to resolve the problem and the clue?
3 REPLIES 3
Christian Gebhardt
Honored Contributor
Solution

Re: sar problem?

Hi
Look at "man sar":
...
In the second form, with no sampling interval specified, sar extracts data from a previously recorded file,either the one specified by -f option or, by default, the standard system activity daily data file /var/adm/sa/sadd for the current day dd.
...
Chris
Paula J Frazer-Campbell
Honored Contributor

Re: sar problem?

Hi

When you use sar in this form it is trying to read data from a collection file. -Man sar.

sar can be used in two main ways one is to read from data previously collected and secondly direct collection:-

sar -b 1 10

The following started from cron each day will collect for a 24 hour period on a minute by minute basis.
It is designed to run for 24 hours and then a restart is required.

----------------------
#!/bin/sh

# 1 minute
period=${1:-"60"}

# 24 hours worth
iterations=${2:-"`expr 86400 / $period`"}


echo "sar: $iterations iterations at $period second intervals"
/usr/sbin/sar -A -o /var/adm/sa/sa`date +%d` $period $iterations > /dev/null
--------------------------


HTH

Paula
If you can spell SysAdmin then you is one - anon
Nagarathinam
Advisor

Re: sar problem?

it is an indication that the data collection need to be enabled for system activities.

There are two scripts /usr/lbin/sa/sa1 and /usr/lbin/sa/sa2
On Enable it through a cron at every 20 minutes ( ie., sa1 ) the data is collected at /usr/adm/sa directory as saDD where DD is the DAY of the month and reports are run in the same directory by script ( sa2) at the morning of next day. This can also be done through cron.

Hope this is useful.

A.Naga