Re: SAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
To: General Red Hat Linux discussion list <redhat-list@xxxxxxxxxx>
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@xxxxxxxxxx?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 
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux