Re: [Apcupsd-users] apcupsd 3.14.0 ether/net loses sync?
Brought to you by:
adk0212
|
From: Adam K. <akr...@ro...> - 2007-03-25 15:00:33
|
Jan Ceuleers wrote:
> Adam,
>
> It's happened again.
>
> Adam Kropelin wrote:
>>> Would it help if, next time I notice the problem and before
>>> restarting the daemon, I try and attach an strace to the apcdev
>>> process, like so:
>>
>> Yes, that would be a good source of information. I'm very curious
>> where it is getting stuck.
>
> [root@skr03 root]# ps -aux --forest | grep apc
> root 1016 0.0 0.7 10224 964 ? S Mar21 0:05
> /sbin/apcupsd -f
> root 1027 0.0 0.7 10224 964 ? S Mar21 0:00 \_
> /sbin/apcupsd
> root 1032 0.0 0.7 10224 964 ? S Mar21 0:00 \_
> /sbin/apc
It is interesting that you appear to be running a different threading
library than I am. On my newly-installed CentOS 3 vm I see only a single
apcupsd process whereas you seem to show a process per thread, which is
(or at least was; I've lost track) the typical linux threading model. I
never did pay much attention to LinuxThreads vs. NPTL and such. I should
research this a bit.
> [root@skr03 root]# strace -p 1027
> getppid() = 1016
> poll([{fd=4, events=POLLIN}], 1, 2000) = 0
> getppid() = 1016
> poll([{fd=4, events=POLLIN}], 1, 2000) = 0
> getppid() = 1016
> poll([{fd=4, events=POLLIN}], 1, 2000) = 0
> getppid() = 1016
> poll([{fd=4, events=POLLIN}], 1, 2000) = 0
> getppid() = 1016
> poll([{fd=4, events=POLLIN}], 1, 2000) = 0
> getppid() = 1016
> poll( <unfinished ...>
> [root@skr03 root]#
That looks like the nis server thread you're stracing (fd #4 is the
socket on which apcupsd is listening for nis connections, which is
unused in your scenario). Could you strace pid 1032 instead?
> Checking open files:
>
> [root@skr03 root]# lsof | grep 3551
> apcupsd 1016 root 6u IPv4 2691 TCP *:3551
> (LISTEN) apcupsd 1016 root 8u IPv4 11953 TCP
> skr03.xperim.be:3512->penta.xperim.be:3551 (ESTABLISHED)
> apcupsd 1027 root 6u IPv4 2691 TCP *:3551
> (LISTEN) apcupsd 1027 root 8u IPv4 11953 TCP
> skr03.xperim.be:3512->penta.xperim.be:3551 (ESTABLISHED)
> apcupsd 1032 root 6u IPv4 2691 TCP *:3551
> (LISTEN) apcupsd 1032 root 8u IPv4 11953 TCP
> skr03.xperim.be:3512->penta.xperim.be:3551 (ESTABLISHED)
' lsof | grep apc' should show that fd #4 is a TCP socket on port 3551
open for listening, which is the server side of nis and unfortunately
uninteresting for this particular problem case.
--Adam
|