Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 2002 13:15:37 -0500
From:      Dragoncrest <>
To:        Francesco Casadei <>, freebsd-questions@FreeBSD.ORG
Subject:   Re: UPS program for Freebsd
Message-ID:  <>
In-Reply-To: <20021229115913.GA642@goku.kasby>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
         So would this program also attack to a UPS that's attached to the 
local machine via Com1?  I'm guessing so, but I wanted to ask for certain 
because this is the only way I can connect the UPS since it has no USB or 
lan connection on it to allow for network monitoring.  :)

At 12:59 PM 12/29/02 +0100, Francesco Casadei wrote:
>On Sat, Dec 28, 2002 at 06:42:29PM -0500, Dragoncrest wrote:
> >       Hi all.  I used to have an email that came from this list detailing
> >       which UPS program to use for freebsd, but for some reason I have 
> lost it..
> > I currently have an APC 650 Pro UPS attached to Com1 on one of my machines
> > and I need to set it up so that it will monitor the machine and shut it
> > down only when there is less than 5 minutes of power left.  I also need it
> > to announce to all logged in users (remote via SSH or locally via the
> > console) the moment the UPS goes on battery and when its getting close to
> > shutdown time, etc.
> >
> >       If anyone can send me this information, I would greatly appreciate
> > it.  Thank you.
> >
> >
> > To Unsubscribe: send mail to
> > with "unsubscribe freebsd-questions" in the body of the message
> >
> > end of the original message
>I use nut - the Network UPS Tools - with an APC Back-UPS Pro 650 and it works
>fine.  Here is a sample output from the included upsc program:
>host: localhost
>MODEL: Back-UPS Pro 650
>SERIAL: NB0130252271
>UTILITY: 230.4
>BATTPCT: 100.0
>ACFREQ: 50.00
>LOADPCT: 032.5
>BATTVOLT: 13.77
>OUTVOLT: 230.4
>BATTDATE: 07/26/01
>You can define a message for each of the following events:
>  ONLINE   : UPS is back online
>  ONBATT   : UPS is on battery
>  LOWBATT  : UPS is on battery and has a low battery (is critical)
>  FSD      : UPS is being shutdown by the master (FSD = "Forced Shutdown")
>  COMMOK   : Communications established with the UPS
>  COMMBAD  : Communications lost to the UPS
>  SHUTDOWN : The system is being shutdown
>  REPLBATT : The UPS battery is bad and needs to be replaced
>  NOCOMM   : A UPS is unavailable (can't be contacted for monitoring)
>Then for each event you defined you can tell nut what to do. From one of the
>configuration files:
># NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
># By default, upsmon sends walls (global messages to all logged in users)
># and writes to the syslog when things happen.  You can change this.
># NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
># Possible values for the flags:
># SYSLOG - Write the message in the syslog
># WALL   - Write the message to all users on the system
># EXEC   - Execute NOTIFYCMD (see above) with the message
># IGNORE - Don't do anything
># If you use IGNORE, don't use any other flags on the same line.
>You can write your own program to execute custom actions, for example I have
>a program that notifies me via SMS when one of the four events ONLINE, ONBATT,
>You can find nut in the ports collection located at sysutils/nut.
>         Francesco Casadei
>You can download my public key from
>or retrieve it from a keyserver (,, ...)
>Key fingerprint is: 1671 9A23 ACB4 520A E7EE  00B0 7EC3 375F 164E B17B

To Unsubscribe: send mail to
with "unsubscribe freebsd-questions" in the body of the message

Want to link to this message? Use this URL: <>