In our enviroment we have serval gentoo machines connected to a APC SMART-UPS RT 10000. we use apcupsd (using snmp/ethernet driver) via tcp/ip to connect to the web management card. When a machine looses the network connection, apcupsd is not able to reinitate communication correctly. Reproducible: Always Steps to Reproduce: 1. start apcupsd (output of "apcaccess" is fine) 2. plug out network cable / plug in network cable 3. run "apcaccess". program hangs. apcupsd utilizes cpu by aprox 20% on our PE2650. Actual Results: - apcupsd incr. cpu usage. - apcaccess output hangs. - controlled shutdown will not work (not tested, but as the communcation does not work this will be the expected result) Expected Results: after a lost network connection, apcupsd should try to reconnect or fail a errormessage. output of "ps axfu" when apcupsd "hangs". =8<== root 22863 30.1 0.1 5620 1520 ? Rs Nov08 823:29 /usr/sbin/apcupsd root 22866 0.0 0.1 5620 1520 ? S Nov08 0:00 \_ /usr/sbin/apcupsd root 22867 0.0 0.1 5620 1520 ? S Nov08 0:00 \_ /usr/sbin/apcupsd =8<== output of "ps axfu" when apcupsd works fine. =8<== root 11453 0.0 0.1 5624 1572 ? Ss 10:51 0:00 /usr/sbin/apcupsd root 11455 0.0 0.1 5624 1572 ? S 10:51 0:00 \_ /usr/sbin/apcupsd root 11456 0.0 0.1 5624 1572 ? S 10:51 0:00 \_ /usr/sbin/apcupsd =8<== output of "apcaccess" =8<== APC : 001,055,1316 DATE : Wed Nov 10 11:07:49 CET 2004 HOSTNAME : leela RELEASE : 3.10.15 VERSION : 3.10.15 (04 August 2004) gentoo UPSNAME : UPS_IDEN CABLE : Ethernet Link MODEL : SNMP UPS Driver UPSMODE : Stand Alone STARTTIME: Wed Nov 10 10:51:42 CET 2004 STATUS : ONLINE LINEV : 226.0 Volts LOADPCT : 22.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 46.0 Minutes MBATTCHG : 10 Percent MINTIMEL : 10 Minutes MAXTIME : 0 Seconds MAXLINEV : 227.0 Volts MINLINEV : 223.0 Volts OUTPUTV : 229.0 Volts SENSE : High DWAKE : 000 Seconds DSHUTD : 020 Seconds DLOWBATT : 02 Minutes LOTRANS : 161.0 Volts HITRANS : 253.0 Volts RETPCT : 000.0 Percent ITEMP : 30.0 C Internal ALARMDEL : 5 seconds BATTV : 00.0 Volts LINEFREQ : 49.0 Hz LASTXFER : Automatic or explicit self test NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : OK STESTI : biweekly STATFLAG : 0x02000008 Status Flag DIPSW : 0x00 Dip Switch REG1 : 0x00 Register 1 REG2 : 0x00 Register 2 REG3 : 0x00 Register 3 MANDATE : 06/26/04 SERIALNO : xxx BATTDATE : 06/26/04
In our enviroment we have serval gentoo machines connected to a APC SMART-UPS RT 10000. we use apcupsd (using snmp/ethernet driver) via tcp/ip to connect to the web management card. When a machine looses the network connection, apcupsd is not able to reinitate communication correctly. Reproducible: Always Steps to Reproduce: 1. start apcupsd (output of "apcaccess" is fine) 2. plug out network cable / plug in network cable 3. run "apcaccess". program hangs. apcupsd utilizes cpu by aprox 20% on our PE2650. Actual Results: - apcupsd incr. cpu usage. - apcaccess output hangs. - controlled shutdown will not work (not tested, but as the communcation does not work this will be the expected result) Expected Results: after a lost network connection, apcupsd should try to reconnect or fail a errormessage. output of "ps axfu" when apcupsd "hangs". =8<== root 22863 30.1 0.1 5620 1520 ? Rs Nov08 823:29 /usr/sbin/apcupsd root 22866 0.0 0.1 5620 1520 ? S Nov08 0:00 \_ /usr/sbin/apcupsd root 22867 0.0 0.1 5620 1520 ? S Nov08 0:00 \_ /usr/sbin/apcupsd =8<== output of "ps axfu" when apcupsd works fine. =8<== root 11453 0.0 0.1 5624 1572 ? Ss 10:51 0:00 /usr/sbin/apcupsd root 11455 0.0 0.1 5624 1572 ? S 10:51 0:00 \_ /usr/sbin/apcupsd root 11456 0.0 0.1 5624 1572 ? S 10:51 0:00 \_ /usr/sbin/apcupsd =8<== output of "apcaccess" =8<== APC : 001,055,1316 DATE : Wed Nov 10 11:07:49 CET 2004 HOSTNAME : leela RELEASE : 3.10.15 VERSION : 3.10.15 (04 August 2004) gentoo UPSNAME : UPS_IDEN CABLE : Ethernet Link MODEL : SNMP UPS Driver UPSMODE : Stand Alone STARTTIME: Wed Nov 10 10:51:42 CET 2004 STATUS : ONLINE LINEV : 226.0 Volts LOADPCT : 22.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 46.0 Minutes MBATTCHG : 10 Percent MINTIMEL : 10 Minutes MAXTIME : 0 Seconds MAXLINEV : 227.0 Volts MINLINEV : 223.0 Volts OUTPUTV : 229.0 Volts SENSE : High DWAKE : 000 Seconds DSHUTD : 020 Seconds DLOWBATT : 02 Minutes LOTRANS : 161.0 Volts HITRANS : 253.0 Volts RETPCT : 000.0 Percent ITEMP : 30.0 C Internal ALARMDEL : 5 seconds BATTV : 00.0 Volts LINEFREQ : 49.0 Hz LASTXFER : Automatic or explicit self test NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : OK STESTI : biweekly STATFLAG : 0x02000008 Status Flag DIPSW : 0x00 Dip Switch REG1 : 0x00 Register 1 REG2 : 0x00 Register 2 REG3 : 0x00 Register 3 MANDATE : 06/26/04 SERIALNO : xxx BATTDATE : 06/26/04¯äAtJ NOMOUTV : 230 NOMBATTV : 0.0 HUMIDITY : 0.0 AMBTEMP : 0.0 EXTBATTS : 1 BADBATTS : 0 FIRMWARE : 476.12.W APCMODEL : Smart-UPS RT 10000 Xunknown END APC : Wed Nov 10 11:08:15 CET 2004 =8<== emerge info =8<== Portage 2.0.51-r3 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 i686) ================================================================= System uname: 2.6.9-gentoo-r1 i686 Intel(R) Xeon(TM) CPU 2.40GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux26-headers-2.6.8.1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs candy ccache distlocks sandbox sfperms userpriv" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://www.gigaload.org/gentoo.org/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="" USE="acl apm berkdb bitmap-fonts crypt f77 fam foomaticdb fortran gdbm imap ldap libg++ libwww maildir ncurses nls pam pdflib perl pythonreadline samba sasl slang snmp spell sse ssl tcpd unicode x86 xml2 zlib" =8<==
when i disconnect the network cable from the usv dmesg shows: process `apcupsd' is using obsolete setsockopt SO_BSDCOMPAT and apcupsd exits. it does then not get restarted when network access comes back (of course, how should it). i'm not sure if this is a gentoo specific problem or an upstream bug or upstream feature. i can't reproduce 3. run "apcaccess". program hangs. apcupsd utilizes cpu by aprox 20% on our PE2650. for me apcupsd just exits when it looses the connection and thats it. apcaccess won't show anything after apcupsd exited ;)
There is nothing i can do about this bug as hte behaviour you are experiencing is handled by apcupsd itself. This is not related to the ebuild. Try to report this bug upstream.