Re: Fwd: 'system uptime' service - contribution
"Bjorn L." <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > Date: Mar 2, 2007 6:32 PM > Subject: 'system uptime' service - contribution > To: [email protected] > > > 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 [email protected] 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 > [email protected] > http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel