[Nut-upsuser] syslog flooding
Gene Heskett
gene.heskett at gmail.com
Sun Nov 21 04:21:25 UTC 2010
On Saturday, November 20, 2010 10:54:55 pm Charles Lepple did opine:
> On Nov 19, 2010, at 7:13 AM, Gene Heskett wrote:
> > Greetings;
> >
> > Nut pull & build from about two weeks ago, 2.4.3 I believe.
>
> The 2.4.3 tarball, or from SVN? (If SVN, there should be a number
> after 2.4.3, such as 2.4.3-r1234).
>
> > Belkin UPS.
> >
> > I have everything working but a proper shutdown of upsd when I reboot,
> > it hangs there and needs the hdwe reset button to reset it. That
> > may be
> > related to my finding more than 1 K##upsd and more than one
> > K##upsmon, in
> > /etc/rc5.d and which I have now nuked.
> >
> > However, while its working well enough to monitor, it is flooding the
> > syslog every 2 seconds with:
> >
> > Nov 19 07:05:56 coyote upsd[4884]: mainloop: Interrupted system call
> > Nov 19 07:05:56 coyote upsd[4884]: Signal 15: exiting
> > Nov 19 07:05:56 coyote usbhid-ups[4874]: Signal 15: exiting
>
> ^^^ Is this part repeating, or was this just the first portion after
> restarting NUT? (In a normal setup, upsd should be started once, and
> shouldn't be killed until shutdown time.)
>
Damn, sorry I didn't explain that. Yes, I wanted to show that it stopped
with upsd stopping, and started again when it started. Then repeats the
status - 121 at 2 second intervals forever.
> > Nov 19 07:06:30 coyote klogd: ohci_hcd 0000:00:02.0: urb e7d21400
> > path 9 ep1in 93120000 cc 9 --> status -121
>
> Looks like -121 is -EREMOTEIO, which apparently means this (from
> Documentation/usb/error-codes.txt in the kernel tree):
>
> "The data read from the endpoint did not fill the
> specified buffer, and URB_SHORT_NOT_OK was set in
> urb->transfer_flags."
>
But if queried, the status output was normal ANAICT.
> The fact that it is happening every two seconds might be a clue, but I
> am not familiar with the main status loop in usbhid-ups (I would have
> thought it would poll only once every 30 seconds, based on the man
> page). Perhaps one of the authors of usbhid-ups has a better idea of
> whether we can fix this (since libusb doesn't expose the URB
> transfer_flags options), or if it is something we can't work around.
I believe the ups actually outputs a complete but simplified status frame
every 2 seconds so that a better timeline can be logged. I have seen
similar stuff on earlier installs by catting the interface it was plugged
into. In any event, it stopped when I decided to build the usbdevfs file
system into the kernel, or at least that stoppage corresponded to rebooting
to that kernel. I don't even have a SWAG what the connection there might
be.
But now I am having trouble with /etc/init.d/upsd again. On a shutdown it
gets to the turning off swap line, followed by a line from upsd echoing the
$nutuser, and hangs forever or till I tap the the reset button. And since
that started, it will not start properly and has to be restarted by hand
once I've logged in. I suspect I need to nuke the lockfile before doing
anything else in the startup as its not being properly nuked at the
shutdown.
chkconfig upsd now says:
[root at coyote ~]# chkconfig --list upsd
upsd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 7:on
And I just discovered chkconfig's resetpriorities option, so maybe that will
fix it.
In the meantime I'll look the script over & see if its leaving stale lock
files around.
Thanks Charles.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If you are over 80 years old and accompanied by your parents, we will
cash your check.
More information about the Nut-upsuser
mailing list