Operating System - HP-UX
1759530 Members
2876 Online
108883 Solutions
New Discussion юеВ

SAR (SA1) Activity Report

 
Charles Legge
Occasional Contributor

SAR (SA1) Activity Report

Hello, Even though the man page doesn't specifiy an output option for the SA1 report, can the output be redirected to an alternate mount point other then the default /var/adm/sa?

Thanks in advance, Charles.
4 REPLIES 4
James A. Donovan
Honored Contributor

Re: SAR (SA1) Activity Report

The /usr/lbin/sa/sa1 file is a script, which if you really wanted to, you could edit to change the location of the output files.
Remember, wherever you go, there you are...
Enrico P.
Honored Contributor

Re: SAR (SA1) Activity Report

Hi,
you can also use the -f option with sar command.

Enrico.
Bill Douglass
Esteemed Contributor

Re: SAR (SA1) Activity Report

/usr/lbin/sa/sa1 is a simple shell script. The variable DFILE specifies the output file name:

DFILE=/var/adm/sa/sa$DATE

You can modify this to put the sa files where you like.

You should update sa2 as well if you plan on using it, as it has /var/adm/sa in several places.

You can also make /var/adm/sa a symlink to another directory, and avoid changing the scripts. This would help if you do and upgrade or patch that replaces sa1 and sa2, since you would lose your changes.
T. M. Louah
Esteemed Contributor

Re: SAR (SA1) Activity Report

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.

Exapmple, send sar sample to sar.out every 3 sec, 2 times:

# sar -o /tmp/sar.out 3 2

HP-UX e4402usw B.11.11 U 9000/800 06/26/03

09:40:24 %usr %sys %wio %idle
09:40:27 0 0 0 100
09:40:30 0 0 0 100

Average 0 0 0 100
--> reading cpu info :
# sar -u -f /tmp/sar.out

HP-UX e4402usw B.11.11 U 9000/800 06/26/03

09:40:24 %usr %sys %wio %idle
09:40:27 0 0 0 100
09:40:30 0 0 0 100

Average 0 0 0 100

--> reading disk info :
# sar -d -f /tmp/sar.out

HP-UX e4402usw B.11.11 U 9000/800 06/26/03

09:40:24 device %busy avque r+w/s blks/s avwait avserv
09:40:27 c1t6d0 2.66 0.50 2 15 8.50 15.03
09:40:30 c1t6d0 0.33 0.50 0 1 8.89 10.12

Average c1t6d0 1.50 0.50 1 8 8.55 14.33

Hope this helps.
Cheers
T??
Little learning is dangerous!