[Nut-upsuser] NOTIFYCMD not running
Michelle Dupuis
support at ocg.ca
Thu Jan 18 05:36:44 CET 2007
I think you're onto something...here's the details:
I'm running "Network UPS Tools upsd 2.0.3", on a dual-core AMD 64bit with
Fedora Core 5 kernel 2.6.18-1.2949.
My permissions are:
drwxr-xr-x 2 root root 4096 Jan 17 22:05 ups
And
-rw-r----- 1 root nut 3954 Jan 16 17:59 ups.conf
-rw-r----- 1 root nut 1501 Jan 16 18:00 upsd.conf
-rw-r----- 1 root nut 2303 Dec 2 22:07 upsd.users
-rw-r----- 1 root nut 11685 Jan 17 22:05 upsmon.conf
-rw-r----- 1 root nut 3884 Nov 16 14:38 upssched.conf
I'm it running under user account "nutmon", which is NOT a member of nut.
Once I added nutmon to the nut group my logger event worked. I'll dig some
more.
Thanks,
Michelle
-----Original Message-----
From: Charles Lepple [mailto:clepple at gmail.com]
Sent: Wednesday, January 17, 2007 11:19 PM
To: Michelle Dupuis
Cc: nut-upsuser at lists.alioth.debian.org
Subject: Re: [Nut-upsuser] NOTIFYCMD not running
On 1/17/07, Michelle Dupuis <support at ocg.ca> wrote:
> I changed the line to:
> NOTIFYCMD "logger 'upsmon: test running notify command'"
>
> But my simulated powerfailure has the same results:
>
> Jan 17 22:50:21 vmhost2 upsmon[6800]: UPS upsmasonville at localhost on
> battery Jan 17 22:50:21 vmhost2 wall[7835]: wall: user nutmon
> broadcasted 1 lines (40 chars) Jan 17 22:50:21 vmhost2 logger: UPS
> upsmasonville at localhost on battery
Not quite the same results - now you have some output from "logger".
In order to debug this, the results need to be consistent and repeatable.
Some questions to narrow things down:
* What version of NUT are you running?
* What kind of system are you running?
* What do the permissions look like on files in /etc/ups or /etc/nut?
(this can cause problems when reloading configuration files)
* How did you reload the upsmon.conf configuration file?
* Are you sure that you get the same results when you run the "logger"
command by hand?
Based on your latest config file excerpt, this is the command line that
should get passed to /bin/sh (via the system() C library call):
logger 'upsmon: test running notify command' "UPS upsmasonville at localhost
on battery"
--
- Charles Lepple
More information about the Nut-upsuser
mailing list