[Logwatch-Devel] Fwd: 'system uptime' service - contribution

Bjorn L. bl_logwatch2 at mblmail.net
Sun Mar 4 23:02:53 MST 2007


If we add it, I suggest it be as zz-uptime, and it be turned off by
default.

In general, the Logwatch scripts parse log files.  The zz-* scripts
are the exception to this, and display real-time system stats.  They
are off by default, except for zz-disk_space (I don't know the history)
and zz-fortune (which only comes alive if you have the 'fortune'
binaries, so I suspect most people don't see it).

Also, I believe that in general, at the lowest setting (Detail=0),
the Logwatch output should reflect items that are in need of attention
or change, and uptime is not in either category.


Kirk Bauer wrote:
> Thanks Jason, I am forwarding this to the list for comment as I'm not
> sure how popular these types of scripts are in Logwatch.  Personally I
> think it is OK to have the variety but I notice that many people don't
> like any extra clutter in the emails.
> 
> ---------- Forwarded message ----------
> From: Jason SJOBECK <jason at sjobeck.com>
> Date: Mar 2, 2007 6:32 PM
> Subject: 'system uptime' service - contribution
> To: kirk at kaybee.org
> 
> 
> Kirk,
> 
> I would like to contribute something very small but potentially
> worthwhile to the project please.
> 
> 
> ------------------------------------------
> ######################################################################
> ####
> # $Id: uptime,v 1.00 2007/02/06 23:59:59 jason at sjobeck.com Exp $
> ######################################################################
> ####
> 
> my $env = ( $ENV{'REAL_LANG'} ? "LANG=".$ENV{'REAL_LANG'}." " : "" ).
>      ( $ENV{'REAL_LC_ALL'} ? "LC_ALL=".$ENV{'REAL_LC_ALL'}." " : ""
> );
> 
> if (($ENV{'PRINTING'} eq "y" ) && (-f "/usr/bin/uptime")) {
>      #print "\n\n------------------ System Uptime
> --------------------\n\n";
>      system("$env /usr/bin/uptime");
>      print "\n";
> }
> elsif (($ENV{'PRINTING'} eq "y" ) && (-f "/usr/bin/uptime")) {
>      #print "\n\n------------------ System Uptime
> --------------------\n\n";
>      system("$env /usr/bin/uptime");
>      print "\n";
> }
> 
> # vi: shiftwidth=3 tabstop=3 syntax=perl et
> ------------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> I think it might live here:
> <http://www2.cvs.logwatch.org:81/index.cgi/logwatch/scripts/services/#
> dirlist>
> 
> Thoughts?
> 
> Cheers.
> 
> Jason Sjöbeck
> sjobeck.com
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Logwatch-Devel mailing list
> Logwatch-Devel at logwatch.org
> http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel


More information about the Logwatch-Devel mailing list