[Nut-upsuser] NUT on Linux, pid related errors

Charles Lepple clepple at gmail.com
Wed Jul 31 13:04:25 UTC 2013

On Jul 30, 2013, at 1:36 PM, Kris Jordan wrote:

> upsd removes its pid files when it's stopped, upsmon does not.

Hmm, interesting observation. Offhand, I think both should remove the PID files, but the way that upsmon drops root privileges might make this difficult.

> If I remove upsmon's manually after stopping it, I get a different message for it when I start it back up...
> fopen /var/run/nut/upsmon.pid: No such file or directory
> I can see the fopen errors happening because of the pre-existing process check. But for the first upsmon case, what is it trying to "kill"?

When you say the "first" upsmon case, do you mean this line?


> If this is normal operation, maybe they shouldn't be printed to the console?

Agreed. It would probably involve adding another parameter to the sendsignal() calls, indicating whether the kill() function call is expected to fail or not. Patches welcome :-)

Charles Lepple
clepple at gmail

More information about the Nut-upsuser mailing list