SAR
Sean McGlynn
sean_mcglynn at yahoo.com
Thu Apr 19 13:43:29 UTC 2007
Thank you. I think I will try to make use of your script, and the tutorial looks good as well.
----- Original Message ----
From: Andrew Bacchi <bacchi at rpi.edu>
To: General Red Hat Linux discussion list <redhat-list at redhat.com>
Sent: Thursday, April 19, 2007 9:14:11 AM
Subject: Re: SAR
Sean,
I don't bother saving the sysstat data longer than the default, but I
create a series of data files of my own, from the sa database. Here's a
very brief and unsophisticated Perl script that will create a report
each day. I run it from cron just before midnight each day. You can do
with it what you will. Also have a look at the sysstat web page for
some good ideas. http://perso.orange.fr/sebastien.godard/tutorial.html
daily-sar.pl
-----------------------------------
#!/usr/bin/perl -w
use strict;
use warnings;
my $today = `date +%F`;
my $outfile = "/root/sar/sar.$today";
my @u = system("/usr/bin/sar -u >> $outfile");
my @d = system("/usr/bin/sar -d >> $outfile");
my @b = system("/usr/bin/sar -b >> $outfile");
my @q = system("/usr/bin/sar -q >> $outfile");
my @r = system("/usr/bin/sar -r >> $outfile");
exit;
Sean McGlynn wrote:
> Hello,
>
> Every ten minutes cron runs a script that runs sadc, which writes statistics to the applicable file in /var/log/sa/. Theses files are only saved for nine days. Is there some way to modify the process so the files are stored indefinitely? I know I could write a script to copy the files to an archive directory, but I'm thinking that something is causing the files to be deleted, and it would be cleaner to change that aspect of it.
>
> Thank you.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the redhat-list
mailing list