Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.