Operating System - HP-UX
1833048 Members
2517 Online
110049 Solutions
New Discussion

Re: Daily o/p file for sar not found.

 
SOLVED
Go to solution
Pulse001
Regular Advisor

Daily o/p file for sar not found.

I am not able to find 'sa' directory under '/var/adm'. but manpage for sar tells that by default daily file is stored at '/var/adm/sa/sadd' where dd specifies date i.e sa08 will be the file for today. But i donot find any 'sa' directory under '/var/adm'.
Do i need to configure some file to start saving the daily file ?
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: Daily o/p file for sar not found.

Yes, see sa1(1m).
OFC_EDM
Respected Contributor

Re: Daily o/p file for sar not found.

In case you don't have the man pages installed for sa1 here's a link

http://docs.hp.com/en/B2355-90692/sa1.1M.html
The Devil is in the detail.
Solution

Re: Daily o/p file for sar not found.

Accounting is one of those funny things that never really gets explained much in tghe manuals... I don't really use it any more, but these are my notes from about 8 years ago on how to do it on 11.00. I can't imagine its changed significantly (if at all) since then. Still you might want to check all the scripts and files mentioned are still there...

____________________________________________

Create the following directory

/var/adm/sa

Add the following entried to the file /usr/spool/cron/crontabs/adm

# adm crontab file for
#
# Run Daily Accounting
0 4 * * 1-6 /usr/sbin/acct/runacct 2> /var/adm/acct/nite/fd2log
#
# Check size of /var/adm/pacct
0 * * * * /usr/sbin/acct/ckpacct
#
# Create summary files
15 5 1 * * /usr/sbin/acct/monacct
#
# Collect system accounting information and store in binary format
0 7-17 * * * /usr/lib/sa/sa1 1200 3
#
# Write a daily report to /var/adm/sa/sadd (where dd is day number)
0 18 * * 1-6 /usr/lib/sa/sa2 -s 7:00 -e 18:01 -i 3600 -A
#
# Disk Accounting
0 2 * * 4 /usr/sbin/acct/dodisk

Remove all comments from /etc/fstab (as some of the default accounting scripts don't handle them correctly)

Set flag to 1 in /etc/rc.config.d/acct, as follows:

#!/sbin/sh
# @(#) $Revision: 72.5 $
# Process accounting. See acct(1m)
#
# START_ACCT: Set to 1 to start process accounting
#
START_ACCT=1

Comment out the superfluous "date" commands in the script /usr/sbin/acct/dodisk (there are 2 lines which just call "date" but do nothing else). This prevents adm receiving pointless mail from cron with just date stamps in it

Set up /etc/acct/holidays file for the current year
____________________________________________


HTH

Duncan

I am an HPE Employee
Accept or Kudo
Pulse001
Regular Advisor

Re: Daily o/p file for sar not found.

Thanks Duncan,
I created sa directory under /var/adm and put the following entry in crontab

0 * * * * /usr/lbin/sa/sa1

This gives me o/p every hour and stores in file /var/adm/sa/sadd where dd is current date.I also set START_ACCT=1 in /etc/rc.config.d/acct file. That's all i have done and now i am getting the desired result.

Thanks for your kind help friends..