Greg Troxel writes:

>> I would look in the logs and see if you can find that nut logged
>> something about "low battery" or "forced shutdown".
>
> Well, that's what I'm asking. Where do I find these logs. I poked
> around with journalctl, and found just startup and shutdown messages.

I would look in /var/log/messages, but I use BSD :-)   Seriously that
sounds like a systemd/ubuntu problem more than a nut problem.

I agree. Welcome to systemd:

ls: cannot access '/var/log/messages': No such file or directory

I was hoping that someone would know.

> I dunno, that's what I'm asking. I don't see anything useful logged
> anywhere I looked. I found three things in systemctl, nut-monitor,

Does ubuntu really not have files in /var/log?

There's still plenty of stuff there. But not syslog.

> I'm almost there, as far as motivation goes, to do that. Off-topic: I
> have the same Ubuntu/Debian general complaint: for the longest time
> Debian packaged ancient versions of my packages. Like decades
> ancient. I should say now that a volunteer has stepped out and is
> making progress; but I eventually solved that problem by figuring out
> how to package my tarballs so that they can be cookie-cuttered into
> installable .deb-s, similar to how rpm-aware tarballs can be compiled
> into binary packages without even extracting them.

I know it's a pain. I use pkgsrc, and when something I want is old I
update it in pkgsrc....

I suggest doing the 15s power failure experiment with the upsc shell
script loop.

Well, by the time next power event happens I'll probably have replacement batteries in this unit :-)

But I still would just love knowing where the interesting logs are… I try to avoid knowing anything about systemd that I don't need to know. But my understanding that systemd steals /dev/log, and apparently uses namespaces to inject a discrete socket for every service, so it doesn't matter what identifier a program passes to openlog(). systemd knows where it came from, and it gets logged in each service's journal. So, something that got logged by nut-monitor will get recorded in its journal, ditto for nut-server.

So, if anything was logged to syslog by one or the other, it should appear in its corresponding journal. I even tried --priority=debug, to dump all hijacked syslogs at the debug level.

Nothing. upsmon's log shows that the system booted at 7:06AM, with nothing log up to that point since the previous, normal, start.

[ previous regular boot ]
Oct 02 21:18:04 ripper.email-scan.com nut-monitor[1968]: Init SSL without 
certificate database
Oct 02 21:18:04 ripper.email-scan.com nut-monitor[1968]: upsnotify: failed to 
notify about state 2: no notification tech defined, will not spam more about it
-- Boot 08cb2f30cf1941359ccf683e658bb134 --
Oct 04 07:06:10 ripper.email-scan.com systemd[1]: Starting nut-monitor.service 
- Network UPS Tools - power device monitor and shutdown controller...
Oct 04 07:06:10 ripper.email-scan.com systemd[1]: Started nut-monitor.service - 
Network UPS Tools - power device monitor and shutdown controller.
[ and we're back in business ]


Attachment: pgpfb5WydPWbp.pgp
Description: PGP signature

_______________________________________________
Nut-upsuser mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to