[Logwatch-Devel] zz-disk_space local drives

Mike Tremaine mgt at stellarcore.net
Sat Jan 21 12:19:49 MST 2006


> That option gets my vote... better than having all of the systems run
> logwatch at different times.  I'm sure other people would prefer
> local-only filesystems in the report.
>

This is in cvs now. [2 patches]...

[mgt at dwarfstar services]$ cvs diff zz-disk_space
Index: zz-disk_space
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/zz-disk_space,v
retrieving revision 1.14
diff -r1.14 zz-disk_space
22a23,25
> my $df_options;
> if ( $ENV{'local_disks_only'} ) { $df_options = "-l"; };
>
113c116
<       system("df -P -h | grep '^[/ ]' | awk '$awkprog' | sort -b -r -n -k 5 ");
---
>       system("df -P -h $df_options| grep '^[/ ]' | awk '$awkprog' | sort -b
-r -n -k 5 ");
116c119
<                       system("/usr/xpg4/bin/df -P -h | grep '^/dev/'");
---
>                       system("/usr/xpg4/bin/df -P -h $df_options| grep
'^/dev/'");
118c121
<               system("/usr/xpg4/bin/df -P | grep '^/dev/'");
---
>               system("/usr/xpg4/bin/df -P $df_options| grep '^/dev/'");
124c127
<               system("df -k | grep '^[/ ]'");
---
>               system("df -k $df_options| grep '^[/ ]'");


[mgt at dwarfstar services]$ cvs diff zz-disk_space.conf
Index: zz-disk_space.conf
===================================================================
RCS file: /var/cvs/logwatch/conf/services/zz-disk_space.conf,v
retrieving revision 1.6
diff -r1.6 zz-disk_space.conf
24a25,26
> #$home_dir = "/home"
>
26a29,30
> #$mail_dir = "/var/spool/mail"
>
29a34,36
> #Uncomment this to add -l to df command.. Only see local disks
> #$local_disks_only = 1
>


More information about the Logwatch-Devel mailing list