Portál AbcLinuxu, 10. května 2025 22:34
UPSTYPE net DEVICE IP_PC_s_UPS_cez_serial:3551potom po zadani apcuspd status by si mal vidiet:
MASTER : IP_PC_s_UPS_cez_serial:3551 STATUS : ONLINE SLAVEneblokovat port 3551 ...
/etc/apcupsd.conf
a nastavil jsem nisport na 3557
(puvodne 7000). Pak apcupsd restartuju a vypnu, abych mohl spustit apcaccess status
a vypise mi to tuhle chybu: APCACCESS FATAL ERROR in apcaccess.c at line 336 tcp_open: cannot connect to server localhost on port 7000. ERR=Connection refused. Jakto, jakoby to nebralo vubec v potaz ten config.
strace -e open apcaccess status
a uvidis skade to taha cislo portu.
open("/etc/ld.so.cache", O_RDONLY) = 3 open("/lib/libwrap.so.0", O_RDONLY) = 3 open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3 open("/lib/i686/cmov/libnsl.so.1", O_RDONLY) = 3 open("/etc/resolv.conf", O_RDONLY) = 3 open("/etc/nsswitch.conf", O_RDONLY) = 3 open("/etc/ld.so.cache", O_RDONLY) = 3 open("/lib/i686/cmov/libnss_files.so.2", O_RDONLY) = 3 open("/etc/host.conf", O_RDONLY) = 3 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
2011-10-25 13:02:33 apctest 3.8.6 (5 February 2003) redhat Checking configuration ... sharenet.type = DISABLE cable.type = APC_940_0024C (smart) You are using a SMART cable type, so I'm entering SMART test mode mode.type = SMART Setting up serial port ... Creating serial port lock file ... Hello, this is the apcupsd Cable Test program. This part of apctest is for testing Smart UPSes. Please select the function you want to perform. 1) Query the UPS for all known values 2) Perform a Battery Runtime Calibration 3) Abort Battery Calibration 4) Monitor Battery Calibration progress 5) Quitvybral jsem c: 1
Select function number: 1 I am going to run through the series of queries of the UPS that are used in initializing apcupsd. Simulating UPSlinkCheck ... Wrote: Y Got: SM Attempting to use smart_poll() ... Sent: Y Got: SM Good -- smart_poll() works!. Going to ask for valid commands... Protocol version is: 3 Alert characters are: !$%+?=#| Command characters are: ^A^N^Z')+-89>@ABCDEFGKLMNOPQRSUVWXYZabcefgjklmnopqrsuxyz^M Now running through apcupsd get_UPS capabilities(). NA indicates that the feature is Not Available UPS Status: 08 Line quality: FF Reason for last transfer to batteries: T Self-Test Status: NO Line Voltage: 237.6 Line Voltage Max: 237.6 Line Voltage Min: 237.6 Output Voltage: 237.6 Batt level percent: 100.0 Batt voltage: 54.81 UPS Load: 016.9 Line freq: 50.00 Runtime left: 0059 UPS Internal temp: 030.6 Dip switch settings: NA Register 1: 00 Register 2: 00 Register 3: 00 Sensitivity: H Wakeup delay: 000 Sleep delay: 180 Low transfer voltage: 208 High transfer voltage: 253 Batt charge for return: 15 Alarm status: N Low battery shutdown level: 02 UPS Name: UPS004 UPS Self test interval: 336 UPS manufacture date: 02/13/07 UPS serial number: JS0707002282 Date battery replaced: 02/13/07 Output voltage when on batteries: 230 Nominal battery voltage: 048 Percent humidity: NA Ambient temperature: NA Firmware revision: 665.6.I Number of external batteries installed: 000 Number of bad batteries installed: NA UPS model as defined by UPS: FWI UPS EPROM capabilities string: uD43127130133136uA43108110112114uI43253257261265uM43225229233237lD43106103100097lA43092090088086lI43208204200196lM43182178174170e47200153045607590oD13120oA13100oI33230240220oM13208s431HMLq4820205081114172023p483090180270360450540630000k4310TNr483000060120180240300360420E443336168ON OFF The EPROM string is 286 characters long! Hours since last self test: NAale tohle nefunguje:
apcaccess status APCACCESS FATAL ERROR in apcaccess.c at line 336 tcp_open: cannot connect to server localhost on port 7000.apcupsd je v tuto chvili vyply
No jak psal kolega výše: apcaccess komunikuje s apcupsd, takže je jasné že to napíše že se nemůže připojit.apcaccess status APCACCESS FATAL ERROR in apcaccess.c at line 336 tcp_open: cannot connect to server localhost on port 7000.apcupsd je v tuto chvili vyply
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.