Operating System - HP-UX
1833706 Members
2284 Online
110063 Solutions
New Discussion

where is the /var/adm/sa/ directory?

 
SOLVED
Go to solution
mornet
Occasional Advisor

where is the /var/adm/sa/ directory?

Hello everybody,
I'm novice with HP-UX 11.00 on server 9000, and i have to use the "sar" command. In the man page, i see that the file sar[dd] (where dd is the day of the month) in the directory /var/adm/sa/ contains the daily activity report when we use the sar commande. but there is no file and no directory sa/ in var/adm/. what 's the problem?
thanks for all
thomas
6 REPLIES 6
Alex Glennie
Honored Contributor

Re: where is the /var/adm/sa/ directory?

Make sure /var/adm/sa directory is there, if not, create using:
mkdir /var/adm/sa
2. Excute following: usr/lbin/sa/sadc /var/adm/sa/sa`date +%d`
Patrick Wallek
Honored Contributor

Re: where is the /var/adm/sa/ directory?

I don't think that the sa directory in /var/adm is created by default when HP-UX is installed. Who knows why. I just manually created the directory, and did a chmod 775 on it and sar then worked for me.
Dan Hetzel
Honored Contributor
Solution

Re: where is the /var/adm/sa/ directory?

Hi Thomas,

/var/adm/sa isn't created by default during install.
No problem, just create it manually with (as root) 'mkdir /var/adm/sa' followed by a 'chmod 775 /var/adm/sa'

You will then be able to use 'sadc' like this:
/usr/lbin/sa/sadc [t n] [ofile]
See 'man sadc' for details.

Best regards,

Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Steve Massey_1
Frequent Advisor

Re: where is the /var/adm/sa/ directory?

/var/adm/sa is not created by default, as already said create manually.
Run sa1 from cron to get your sa(dd)

30 * * * * /usr/lbin/sa/sa1 1200 3

This would collect data every 20 mins
Darrel Louis
Honored Contributor

Re: where is the /var/adm/sa/ directory?

As already said in the previous answers, it's not default, you need to create it manually.

If you want sar to daily make a new file, add the following to your cron(root):
0 * * * 0-6 /usr/lbin/sa/sa1
13 * * * * /usr/lbin/sa/sa1 600 6

If you just want to take snap shots with sar, you can do the following:
sar -d -q 2 10
mornet
Occasional Advisor

Re: where is the /var/adm/sa/ directory?

tanks for this good and quickly answer.