Technical article 104892

Try to run sar, get: "sar: Can't open /usr/adm/sa/saXX".

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

When I try to run sar(ADM), I get an error message similar to:

sar: Can't open /usr/adm/sa/saXX
or:
sar: Can't open input file

where 'XX' is the current day of the month.

Cause

When SCO OpenServer Release 5/6 is installed, sar's system activity
data collection is disabled.  The call to "sa1" from sys's crontabs
file and the call to "sa2" from root's crontabs file are commented
out.  It is necessary to enable sar data collection to use the sar
command against the default daily historical data.

(Note that running sar against a specified file, or specifying a time interval, works even though the sar data collection is disabled.)

Solution

It is necessary to enable sar data collection activities and thus
provide the functionality to process this history.  When enabled,
standard system activity daily data files will be created behind
the scenes.  It is the sa1 process that collects and stores data
in the binary file /usr/adm/sa/saXX, while sa2 writes a readable
daily report to the file /usr/adm/sa/sarXX.  Both sa1 and sa2 are
run by cron(C).

To enable sar default system activity data collection, run this command:

/usr/lib/sa/sar_enable -y

Should you ever want to disable it, simply run the command again using the -n flag.

Note: You must be root to run sar_enable. For the changes to take effect, reboot the system after running sar_enable(ADM).

See also

Manual pages:
sar_enable(ADM), sar(ADM), sa1(ADM), sa2(ADM), crontab(C)

From the Xinuos technical article database, record 104892. Reproduced with permission. The original is at www.sco.com/ta/104892, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.