From owner-freebsd-ports Sun Nov 21 12: 0: 6 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C1A7A1527B for ; Sun, 21 Nov 1999 12:00:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA77706; Sun, 21 Nov 1999 12:00:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sun, 21 Nov 1999 12:00:03 -0800 (PST) Message-Id: <199911212000.MAA77706@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: "Chris D. Faulhaber" Subject: Re: ports/15023: lmmon 0.60 port breaks -s single-shot option Reply-To: "Chris D. Faulhaber" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/15023; it has been noted by GNATS. From: "Chris D. Faulhaber" 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 | produces the proper result. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message