Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 1999 12:00:03 -0800 (PST)
From:      "Chris D. Faulhaber" <jedgar@fxp.org>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/15023: lmmon 0.60 port breaks -s single-shot option
Message-ID:  <199911212000.MAA77706@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/15023; it has been noted by GNATS.

From: "Chris D. Faulhaber" <jedgar@fxp.org>
To: parag@codegen.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/15023: lmmon 0.60 port breaks -s single-shot option
Date: Sun, 21 Nov 1999 14:50:45 -0500 (EST)

 On Sun, 21 Nov 1999 parag@codegen.com wrote:
 
 > >Synopsis:       lmmon 0.60 port breaks -s single-shot option
 > 
 > 	The "-s" option does not work any longer in version 0.60.  It
 > 	used to work in 0.55.
 > 
 > 	Looking at the code, there appear to be two lines (in the patch
 > 	below) that set the delay to 1 if it is less than zero.  Hoever,
 > 	the -s option sets delay to -1!
 > 
 
 This was a 'fix' to prevent someone from specifying a delay of 0 and
 eating up too much processor time.
 
 > 	I don't know what the right fix the author would prefer, but the
 > 	hack below allows it to work for me.
 > 
 
 Why don't you ask me?  My email address is in the port's Makefile and
 DESCR, and in the sources (lmmon.h, lmmon.c, lmmon.8, and README).
 
 > 	(I have built a script wrapper around lmmon that converts its
 > 	output to a single-line, logs the info via syslog, checks for
 > 	out-of-range conditions, and emails warnings if anything is
 > 	out-of-range.  It still has a ways to go to emulate the upsd
 > 	daemon that monitors the UPS and cleanly shuts the system down.
 > 	Still, it's quite handy for logging the stats via cron.
 > 	However, it needs the patch below to operate.)
 > 
 
 Nice to see it's being used...a daemon to do this is in the works; or see
 healthd in the ports.
 
 > >How-To-Repeat:
 > 
 > 	Build it and try the -s option.
 > 
 > >Fix:
 > 	
 > 
 > --- lmmon.c-org Tue Nov  2 16:28:20 1999
 > +++ lmmon.c     Sun Nov 21 11:04:04 1999
 > @@ -134,8 +134,8 @@
 >         argc -= optind;
 >         argv += optind;
 > 
 > -       if (delay < 1)
 > -               delay = 1;
 > +       /*if (delay < 1)
 > +               delay = 1;*/
 
 This was supposed to be:  delay = -1;
 
 Either way, see http://www.fxp.org/~jedgar/lmmon-0.61.tar.gz or wait until
 the PR (ports/15026) that fixes this is committed; or just use your fix :)
 
 -----
 Chris D. Faulhaber               |  You can ISO9001 certify the process of 
 System/Network Administrator,    |  shooting yourself in the foot, so long
 Reality Check Information, Inc.  |  as the process is documented and reliably
 <jedgar@fxp.org>                 |  produces the proper result.
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911212000.MAA77706>