Operating System - HP-UX
1826056 Members
4181 Online
109690 Solutions
New Discussion

Re: sadc performance data gets very large

 
SOLVED
Go to solution
Heiko_7
Advisor

sadc performance data gets very large

goodmorning,

this morning i came upon an unix server onwhich the are getting performance data using sadc.

crontab:

0 * * * * /usr/lbin/sa/sadc 300 12 /opt/sa/sa`date +%d`

the file /opt/sa/sa is getting very big.
Is there a way in which i can truncate this binary file ????

thanx in advanced

5 REPLIES 5
harry d brown jr
Honored Contributor

Re: sadc performance data gets very large


You could get glance/measureware and perfview and get real data: http://managementsoftware.hp.com/products/gplus/index.html

If you don't care to see the performance results then simply

cat /dev/null > FILENAME

live free or die
harry d brown jr

Live Free or Die
Heiko_7
Advisor

Re: sadc performance data gets very large

Thnx Harry,

was not what i was looking for but it did the trick. Nobody was using the data anyway. I might even stop collecting it in the future.

with kind regards,

Heiko
Rory R Hammond
Trusted Contributor
Solution

Re: sadc performance data gets very large

Heiko,

I collect sadc information using sa1 and sa2, which are shell scripts that call sadc and sar. becase of the `date +%d` you have at most 31 files. (sa01 ... sa31). You should not have any more than 1 file for ever day in the past month. Because there are at most 31 files in this directory, each containing one day's worth of data, the disk space required should not be very large.

If you don't have much disk space for data collection. You can
1. decrease the frequency in which you run sadc.
2. write a script to delete or migrate the oldest files in /opt/sa (my records by default are put in /var/adm/sa instead of /opt/sa)

The reason your files are getting big is because of your 12 sample records.

On my system,
/usr/lbin/sa/sa1 1 1 produces 59028 bytes of output

/usr/lbin/sa/sa1 1 12 produces 236112 bytes of output.

You might try adjusting the number of samples



My crontab entrys are:

0 * * * * /usr/lbin/sa/sa1
20,40 8-17 * * 1-5 /usr/lbin/sa/sa1

This is a daily report:
5 18 * * 1-5 /usr/lbin/sa/sa2 -s 8:00 -e 18:01 -i 900 -A
There are a 100 ways to do things and 97 of them are right
Heiko_7
Advisor

Re: sadc performance data gets very large

Rory

thanks for you reply

i haven't been online for a long time,

I change my collection as you sugested, you never know when i need the data


greetings

Heiko
Rory R Hammond
Trusted Contributor

Re: sadc performance data gets very large

Grettings!

I was suprised to get a reply aft such a long time. I agree, You will never know when you need the data. but, The information has proven invaluable during "bad times"

Rory
There are a 100 ways to do things and 97 of them are right