Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 1999 11:10:44 -0800 (PST)
From:      parag@codegen.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/15023: lmmon 0.60 port breaks -s single-shot option
Message-ID:  <199911211910.LAA59134@pinhead.parag.codegen.com>

next in thread | raw e-mail | index | archive | help

>Number:         15023
>Category:       ports
>Synopsis:       lmmon 0.60 port breaks -s single-shot option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 21 11:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Parag Patel
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
CodeGen, Inc.
>Environment:

	FreeBSD 3.3-STABLE
	ASUS P97-DS dual Pentium-II/300MHz motherboard

>Description:

	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!

	I don't know what the right fix the author would prefer, but the
	hack below allows it to work for me.

	(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.)

>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;*/

 #ifndef HAVE_SMB
        interface = INTERFACE_IO;


>Release-Note:
>Audit-Trail:
>Unformatted:


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?199911211910.LAA59134>