[Nut-upsuser] UPS Monitor Won't Start: invalid directive monitor
Jarrod Coombes
emailjrc at gmail.com
Mon Nov 22 18:43:28 GMT 2021
I have port set to:
port = /dev/APC-t and port = /dev/APC-b respectively, and that does seem to
work as the system is able to uniquely identify each UPS. When this was set
to auto, it was obvious that NUT was just returning info on the first UPS
it hit and this was causing a sort of "sharing violation" which was
cluttering up the logs.
Jarrod Coombes
On Mon, Nov 22, 2021 at 2:10 AM Jim Klimov <jimklimov at gmail.com> wrote:
> The "serial" config fields are for serial numbers, and I'd expect they are
> what helps NUT identify your devices.
>
> Some value of "port" is required; maybe it could be the "/dev/apc-X"
> instead of "auto".
>
> Jim
>
> On Mon, Nov 22, 2021, 11:04 Jarrod Coombes via Nut-upsuser <
> nut-upsuser at alioth-lists.debian.net> wrote:
>
>> > most of NUT is case-sensitive, so this should be "MONITOR".
>>
>> That seems to have done the trick. Did I miss that in the documentation?
>> It's definitely not called out in the example config, is it possible to
>> make a suggestion that this get added? It would have saved a ton of time
>> and head bashing.
>>
>> > If these dev nodes work, it is just coincidence
>>
>> Well if I remove them, then I get errors about duplicate commands and the
>> upsc command clearly returns info from only one UPS. So it would appear
>> that the "port = " is definitely not being ignored by something.
>>
>> >In your case, it sounds like you can specify "serial =" for each UPS in
>> ups.conf.
>>
>> So "serial = /dev/apc-t" and " "serial = /dev/apc-b" under the
>> appropriate UPS in the config?
>>
>> Thanks for the help!
>>
>>
>> Jarrod
>>
>> On Sun, Nov 21, 2021 at 7:21 PM Charles Lepple <clepple at gmail.com> wrote:
>>
>>> On Nov 21, 2021, at 9:28 PM, Jarrod Coombes via Nut-upsuser <
>>> nut-upsuser at alioth-lists.debian.net> wrote:
>>> >
>>> > When I try to start the UPS monitor service I get:
>>> >
>>> > Starting Network UPS Tools - power device monitor and shutdown
>>> controller...
>>> > fopen /run/nut/upsmon.pid: No such file or directory
>>> > /etc/nut/upsmon.conf line 86: invalid directive monitor APC-t at localhost
>>> 1 admin <8 random letters> master
>>> > /etc/nut/upsmon.conf line 87: invalid directive monitor APC-b at localhost
>>> 1 admin <8 random letters> master
>>>
>>> ^^^^^^^ most of NUT is
>>> case-sensitive, so this should be "MONITOR".
>>>
>>> > The two UPSes are identical, so I created some custom udev rules to
>>> create /dev/apc-t and /dev/apc-b and this appears to work. I can run ls
>>> /dev/a* and get:
>>> >
>>> > /dev/apc-b /dev/apc-t /dev/autofs
>>>
>>> If these dev nodes work, it is just coincidence - the usbhid-ups driver
>>> cannot open a specific UPS by a /dev node, and the port option is ignored:
>>>
>>> https://networkupstools.org/docs/man/usbhid-ups.html#_implementation
>>>
>>> In your case, it sounds like you can specify "serial =" for each UPS in
>>> ups.conf.
>>>
>>> > _______________________________________________
>>> > Nut-upsuser mailing list
>>> > Nut-upsuser at alioth-lists.debian.net
>>> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>>
>>> _______________________________________________
>> Nut-upsuser mailing list
>> Nut-upsuser at alioth-lists.debian.net
>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20211122/300fe9d9/attachment.htm>
More information about the Nut-upsuser
mailing list