0

I was trying the below entries to get the sar information for every 5 minutes including the 00:00:00 (midnight) data.

0 * * * * root /usr/lib64/sa/sa1 300 6

*/5 1-22 * * * root /usr/lib64/sa/sa1 1 1

0,5,10,15,20,25,30,35,40,45,50,55 23 * * * root /usr/lib64/sa/sa1 1 1

55 23 * * * root /usr/lib64/sa/sa1 300 2

5,10,15,20,25,30,35,40,45,50,55 0 * * * root /usr/lib64/sa/sa1 1 1

But the above command adds the midnight data at end of the previous daily data file.

I want to get the reading of 00:00:00 midnight entry in the same day file.

1 Answer 1

0

That is the default behavior, so it seems that you just have systat write to two files at midnight (during log rotation), but it looks like your crontab is doing that already. Perhaps rotating the file before midnight will fix that.

It looks like you are not using 12.5.1 or later, so add this to your crontab:

 #Update log sar reports every day at 2358 hours
 58 23 * * *  root /usr/lib64/sa/sa1 1 1

Please see this site.

You must log in to answer this question.

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