2

I want to be able to generate the system activity report every 30 seconds or every minute and store in a file and use it for diagnostic purposes on my VM. So I give an output file for the sar command and read it using the "-f" option. But I only use the CPU utilization and network utilization part of the report and so rest is all that I don't want to save (waste the space in the disk to store these reports). Also the sar files that are generated are all binary. Is there a way to collect these stats for the CPU and network utilization alone? and so save almost 2/3rds the space on the disk?

2 Answers 2

1

I use sar back in 2009. Try to read before answering this one. If I recall correctly. sar collect the data via sa1 and sa2 command that is controlled by cron on how often will sa1 and sa2 collect the data.

To read the CPU data we can use -u option and for network we can use -n option. Is this what you're looking for?

You can configure how much data that you want to keep in /var/log/sa/ on /etc/sysconfig/sysstat (up to one month)

0

Not a Sar response, but look into collectl. See: http://collectl.sourceforge.net/

It's a nice package, and you will be able to customize the output to provide only what you need.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .