[Logwatch-Devel] zz-disk_space local drives

Bjorn L. bl_logwatch at mblmail.net
Sun Jan 22 18:37:10 MST 2006



Mike Tremaine wrote:
>>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]...

> diff -r1.6 zz-disk_space.conf

>>#Uncomment this to add -l to df command.. Only see local disks
>>#$local_disks_only = 1


I like the idea of having an option.  But I think it might be better
to have -l be the default.  The results of the df command is always
filtered with grep, the result of which always excludes nfs mounts
anyway.  So if we made -l the default no one would see the difference,
anyway, except that it avoids the thrashing on the remote system that
J J Urich mentioned.  (So, in the current cvs code, even if you leave
$local_disk_only uncommented, you will not get any non-local disks
listed anyway - the script would need to be changed too.)

The use of -l came up before, and we decided not to use it, because
the -l is not implemented in different OSs.  That was before the
zz-disk_space code was extended to use different 'df' commands
for different OSs.  Now that we have a if..elsif structure to
deal with different variants of Unix/Linux, it might be useful to
add the -x tmpfs to the Linux variant as well (and any others that
support -x).

In summary, I'm advocating the following:
- For Linux, use -l -x tmpfs as default options, and remove the
   grep.
- For other OSs, use -l or -x or equivalents if they exist; I
   don't know whether they do or not.
- Provide a variable to override the options to df (independent
   of OS).


More information about the Logwatch-Devel mailing list