[CentOS] sadc output to a circular file of given size?

nate centos at linuxpowered.net
Wed Sep 16 21:02:26 UTC 2009


Alan McKay wrote:

> One solution I could think of is if there is some kind of filesystem
> to implement this sort of circular file.

You could create one, use dd to create an empty file that is the
size you want, format it with mke2fs and mount it via loopback

> Any ideas?
> Any other obvious solution I am missing?

For me I have a custom setup that queries sar once a minute for
cpu usage mainly, and truncates it's log files daily, the results
are queried via remote and stored in RRD files. It wouldn't be
hard to configure it to query more often, even though cron
only kicks off once a minute you could have sar run every
minute and log many times during that minute.

nate





More information about the CentOS mailing list