Configurazione di un UPS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 157: | Line 157: | ||
Mon May 23 15:23:36 CEST 2005 Mains returned. No longer on UPS batteries. | Mon May 23 15:23:36 CEST 2005 Mains returned. No longer on UPS batteries. | ||
Mon May 23 15:23:36 CEST 2005 Power is back. UPS running on mains. | Mon May 23 15:23:36 CEST 2005 Power is back. UPS running on mains. | ||
</pre> | |||
== Verifica funzionalità Demone == | |||
Con il comando: | |||
apcaccess | |||
Si possono verificare i parametri letti direttamente dall'UPS. | |||
<pre> | |||
APC : 001,052,1278 | |||
DATE : Mon May 23 15:38:01 CEST 2005 | |||
HOSTNAME : lemserver | |||
RELEASE : 3.10.16 | |||
VERSION : 3.10.16 (04 November 2004) debian | |||
UPSNAME : UPS_IDEN | |||
CABLE : Custom Cable Smart | |||
MODEL : Smart-UPS 1000 | |||
UPSMODE : Stand Alone | |||
STARTTIME: Mon May 23 15:21:43 CEST 2005 | |||
STATUS : ONLINE | |||
LINEV : 221.7 Volts | |||
LOADPCT : 12.3 Percent Load Capacity | |||
BCHARGE : 100.0 Percent | |||
TIMELEFT : 104.0 Minutes | |||
MBATTCHG : 5 Percent | |||
MINTIMEL : 3 Minutes | |||
MAXTIME : 0 Seconds | |||
MAXLINEV : 224.6 Volts | |||
MINLINEV : 221.7 Volts | |||
OUTPUTV : 221.7 Volts | |||
SENSE : High | |||
DWAKE : 000 Seconds | |||
DSHUTD : 090 Seconds | |||
DLOWBATT : 02 Minutes | |||
LOTRANS : 208.0 Volts | |||
HITRANS : 253.0 Volts | |||
RETPCT : 000.0 Percent | |||
ITEMP : 29.7 C Internal | |||
ALARMDEL : 5 seconds | |||
BATTV : 27.5 Volts | |||
LINEFREQ : 50.0 Hz | |||
LASTXFER : Line voltage notch or spike | |||
NUMXFERS : 1 | |||
XONBATT : Mon May 23 15:23:03 CEST 2005 | |||
TONBATT : 0 seconds | |||
CUMONBATT: 33 seconds | |||
XOFFBATT : Mon May 23 15:23:36 CEST 2005 | |||
SELFTEST : NO | |||
STESTI : 336 | |||
STATFLAG : 0x02000008 Status Flag | |||
REG1 : 0x00 Register 1 | |||
REG2 : 0x00 Register 2 | |||
REG3 : 0x00 Register 3 | |||
MANDATE : 02/02/05 | |||
SERIALNO : AS0506111930 | |||
BATTDATE : 02/02/05 | |||
NOMOUTV : 230 | |||
NOMBATTV : 24.0 | |||
EXTBATTS : 0 | |||
FIRMWARE : 600.3.I | |||
APCMODEL : FWI | |||
END APC : Mon May 23 15:38:30 CEST 2005 | |||
</pre> | </pre> | ||
Revision as of 13:42, 23 May 2005
Collegare l'ups seriale su COM1 (/dev/ttyS0)
Installare il software di gestione
apt-get install apcupsd
Verificare la porta a cui si è collegato l'UPS
L'elenco delle porte seriali lo si può ottenere con:
dmesg | grep ttyS
Si ricorda che:
COM1=ttyS0 COM2=ttyS1
Nel caso si correga nel file /etc/apcupsd/apcupsd.conf:
DEVICE /dev/ttyS0
Testare la comunicazione con l'ups:
apctest
Attendere anche sino ad 1 minuto:
2005-05-23 15:08:38 apctest 3.10.16 (04 November 2004) debian Checking configuration ... Attached to driver: apcsmart sharenet.type = DISABLE cable.type = CUSTOM_SMART You are using a SMART cable type, so I'm entering SMART test mode mode.type = SMART Setting up the port ... Creating the device 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) Program EEPROM 6) Enter TTY mode communicating with UPS 7) Quit Select function number: 1
Inserire 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: 223.2 Line Voltage Max: 224.6 Line Voltage Min: 223.2 Output Voltage: 223.2 Batt level percent: 100.0 Batt voltage: 27.54 UPS Load: 012.3 Line freq: 50.00 Runtime left: 0104 UPS Internal temp: 029.2 Dip switch settings: NA Register 1: 00 Register 2: 00 Register 3: 00 Sensitivity: H Wakeup delay: 000 Sleep delay: 090 Low transfer voltage: 208 High transfer voltage: 253 Batt charge for return: 00 Alarm status: 0 Low battery shutdown level: 02 UPS Name: UPS_IDEN UPS Self test interval: 336 UPS manufacture date: 02/02/05 UPS serial number: AS0506111930 Date battery replaced: 02/02/05 Output voltage when on batteries: 230 Nominal battery voltage: 024 Percent humidity: NA Ambient temperature: NA Firmware revision: 600.3.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: NA That is all for now. 1) Query the UPS for all known values 2) Perform a Battery Runtime Calibration 3) Abort Battery Calibration 4) Monitor Battery Calibration progress 5) Program EEPROM 6) Enter TTY mode communicating with UPS 7) Quit Select function number: 7 2005-05-23 15:14:32 End apctest.
Abilitazione del Demone
vi /etc/default/apcupsd ... ISCONFIGURED=YES ...
Avviare il demone:
/etc/init.d/apcupsd start
Verifica del rilevamento caduta di tensione:
tail -f /var/log/apcupsd.events
Mon May 23 15:22:31 CEST 2005 apcupsd 3.10.16 (04 November 2004) debian startup succeeded Mon May 23 15:23:09 CEST 2005 Power failure. Mon May 23 15:23:11 CEST 2005 Running on UPS batteries. Mon May 23 15:23:36 CEST 2005 Mains returned. No longer on UPS batteries. Mon May 23 15:23:36 CEST 2005 Power is back. UPS running on mains.
Verifica funzionalità Demone
Con il comando:
apcaccess
Si possono verificare i parametri letti direttamente dall'UPS.
APC : 001,052,1278 DATE : Mon May 23 15:38:01 CEST 2005 HOSTNAME : lemserver RELEASE : 3.10.16 VERSION : 3.10.16 (04 November 2004) debian UPSNAME : UPS_IDEN CABLE : Custom Cable Smart MODEL : Smart-UPS 1000 UPSMODE : Stand Alone STARTTIME: Mon May 23 15:21:43 CEST 2005 STATUS : ONLINE LINEV : 221.7 Volts LOADPCT : 12.3 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 104.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds MAXLINEV : 224.6 Volts MINLINEV : 221.7 Volts OUTPUTV : 221.7 Volts SENSE : High DWAKE : 000 Seconds DSHUTD : 090 Seconds DLOWBATT : 02 Minutes LOTRANS : 208.0 Volts HITRANS : 253.0 Volts RETPCT : 000.0 Percent ITEMP : 29.7 C Internal ALARMDEL : 5 seconds BATTV : 27.5 Volts LINEFREQ : 50.0 Hz LASTXFER : Line voltage notch or spike NUMXFERS : 1 XONBATT : Mon May 23 15:23:03 CEST 2005 TONBATT : 0 seconds CUMONBATT: 33 seconds XOFFBATT : Mon May 23 15:23:36 CEST 2005 SELFTEST : NO STESTI : 336 STATFLAG : 0x02000008 Status Flag REG1 : 0x00 Register 1 REG2 : 0x00 Register 2 REG3 : 0x00 Register 3 MANDATE : 02/02/05 SERIALNO : AS0506111930 BATTDATE : 02/02/05 NOMOUTV : 230 NOMBATTV : 24.0 EXTBATTS : 0 FIRMWARE : 600.3.I APCMODEL : FWI END APC : Mon May 23 15:38:30 CEST 2005