[Nut-upsuser] (no subject)

Martin Ivanov tramni at abv.bg
Fri Aug 18 09:16:34 UTC 2006


Dear Mr Claesson,
prepare for quite a long letter from me. I hope you will have time to read it. I bestowed a whole morning on trying to identify the correct upstype. Here are the results:

root at marto:/home/marto# /usr/local/ups/bin/powercom -DD -u root -a Inform -x type=KP625AP
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'KP625AP'
 number of bytes from UPS: '16'
 method of flow control  : 'dtr0rts1'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{1,0},y}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: '{6.134300,-0.380800,4.311000,0.181100}'
 battery percentage calculation coefficients: '{5.000000,0.326800,-825.000000,4.563900,-835.820007}'
 voltage calculation coefficients: '{0.954500,0.000000}'
DTR => 0, RTS => 1
input.frequency: 49.10
output.frequency: 49.10
ups.load: 0.2
battery.charge: (null)
input.voltage: 232.4
output.voltage: 232.4
STATUS: OL
dstate_init: sock /var/state/ups/powercom-ttyS0 open on fd 5
data receiving error (-1 instead of 16 bytes)
data receiving error (-1 instead of 16 bytes)
data receiving error (-1 instead of 16 bytes)
data receiving error (-1 instead of 16 bytes)
data receiving error (-1 instead of 16 bytes)

And when I disconnect the UPS from the mains, the result is:

root at marto:/home/marto# /usr/local/ups/bin/powercom -DD -u root -a Inform -x type=KP625AP
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'KP625AP'
 number of bytes from UPS: '16'
 method of flow control  : 'dtr0rts1'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{1,0},y}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: '{6.134300,-0.380800,4.311000,0.181100}'
 battery percentage calculation coefficients: '{5.000000,0.326800,-825.000000,4.563900,-835.820007}'
 voltage calculation coefficients: '{0.954500,0.000000}'
DTR => 0, RTS => 1
data receiving error (-1 instead of 16 bytes)
dstate_init: sock /var/state/ups/powercom-ttyS0 open on fd 5
data receiving error (-1 instead of 16 bytes)

Obviously there is some error. The result with Trust and  KIN2200 was the same, so I discarded them from further testing.

root at marto:/home/marto# /usr/local/ups/bin/powercom -DD -u root -a Inform -x type=Egys
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'Egys'
 number of bytes from UPS: '16'
 method of flow control  : 'no_flow_control'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{1,0},y}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: '{6.134300,-0.380800,1.333300,0.666700}'
 battery percentage calculation coefficients: '{5.000000,0.326800,-825.000000,2.210500,-355.369995}'
 voltage calculation coefficients: '{0.954500,0.000000}'
Flow control disable
input.frequency: 49.10
output.frequency: 49.10
ups.load: 0.7
battery.charge: (null)
input.voltage: 232.4
output.voltage: 232.4
STATUS: OL
dstate_init: sock /var/state/ups/powercom-ttyS0 open on fd 5
input.frequency: 49.10
output.frequency: 49.10
ups.load: 0.7
battery.charge: (null)
input.voltage: 232.4
output.voltage: 232.4

After disconnecting the UPS from the mains:
input.frequency: 0.00
output.frequency: 49.10
ups.load: 5.8
battery.charge: (null)
input.voltage: -0.1
output.voltage: 57.6
STATUS: OB

upsc with UPS connected to the mains:
Network UPS Tools upsd 2.0.4
Connected to UPS [Inform]: powercom-ttyS0
Synchronizing...done
root at marto:/home/marto# upsc Inform at localhost
battery.charge: 108.8
driver.name: powercom
driver.parameter.linevoltage: 220
driver.parameter.port: /dev/ttyS0
driver.parameter.shutdownArguments: {{1,0},y}
driver.parameter.type: Egys
driver.version: 2.0.4
driver.version.internal: $ Revision: 0.5 $
input.frequency: 49.10
input.voltage: 234.3
input.voltage.nominal: 220
output.frequency: 49.10
output.voltage: 234.3
ups.load: 0.7
ups.mfr: PowerCom
ups.model: Unknown
ups.model.type: Egys
ups.serial: Unknown
ups.status: OL

After disconnecting:
battery.charge: 196.9
driver.name: powercom
driver.parameter.linevoltage: 220
driver.parameter.port: /dev/ttyS0
driver.parameter.shutdownArguments: {{1,0},y}
driver.parameter.type: Egys
driver.version: 2.0.4
driver.version.internal: $ Revision: 0.5 $
input.frequency: 0.00
input.voltage: -0.1
input.voltage.nominal: 220
output.frequency: 49.10
output.voltage: 55.6
ups.load: 5.8
ups.mfr: PowerCom
ups.model: Unknown
ups.model.type: Egys
ups.serial: Unknown
ups.status: OB

root at marto:/home/marto# /usr/local/ups/bin/powercom -DD -u root -a Inform -x type=KIN525AP
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'KIN525AP'
 number of bytes from UPS: '16'
 method of flow control  : 'dtr1'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{1,0},y}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: '{6.134300,-0.380800,4.311000,0.181100}'
 battery percentage calculation coefficients: '{5.000000,0.326800,-825.000000,4.563900,-835.820007}'
 voltage calculation coefficients: '{0.954500,0.000000}'
DTR => 1
input.frequency: 49.10
output.frequency: 48.60
ups.load: 0.2
battery.charge: (null)
input.voltage: 232.4
output.voltage: 232.4
STATUS: OL

After disconnecting from the mains:
input.frequency: 0.00
output.frequency: 49.10
ups.load: 5.8
battery.charge: (null)
input.voltage: -0.1
output.voltage: 57.6
STATUS: OB

upsc Inform at localhost:
battery.charge: 122.6
driver.name: powercom
driver.parameter.linevoltage: 220
driver.parameter.port: /dev/ttyS0
driver.parameter.shutdownArguments: {{1,0},y}
driver.parameter.type: KIN525AP
driver.version: 2.0.4
driver.version.internal: $ Revision: 0.5 $
input.frequency: 49.10
input.voltage: 236.3
input.voltage.nominal: 220
output.frequency: 49.10
output.voltage: 236.3
ups.load: 0.2
ups.mfr: PowerCom
ups.model: Unknown
ups.model.type: KIN525AP
ups.serial: Unknown
ups.status: OL

After disconnecting, upsc:
battery.charge: 196.9
driver.name: powercom
driver.parameter.linevoltage: 220
driver.parameter.port: /dev/ttyS0
driver.parameter.shutdownArguments: {{1,0},y}
driver.parameter.type: KIN525AP
driver.version: 2.0.4
driver.version.internal: $ Revision: 0.5 $
input.frequency: 0.00
input.voltage: -0.1
input.voltage.nominal: 220
output.frequency: 49.10
output.voltage: 57.6
ups.load: 5.8
ups.mfr: PowerCom
ups.model: Unknown
ups.model.type: KIN525AP
ups.serial: Unknown
ups.status: OB


root at marto:/home/marto# /usr/local/ups/bin/powercom -DD -u root -a Inform -x type=KIN1500AP
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'KIN1500AP'
 number of bytes from UPS: '16'
 method of flow control  : 'no_flow_control'
 validation sequence: '{{7,0},{8,0},{8,0}}'
 shutdown arguments: '{{1,0},y}'
 frequency calculation coefficients: '{0.000210,0.000000}'
 load percentage calculation coefficients: '{6.134300,-0.380800,1.075000,0.181100}'
 battery percentage calculation coefficients: '{5.000000,0.326800,-825.000000,0.465110,0.000000}'
 voltage calculation coefficients: '{0.828570,0.000000}'
Flow control disable
input.frequency: 49.10
output.frequency: 49.10
ups.load: 0.2
battery.charge: (null)
input.voltage: 230.5
output.voltage: 232.4
STATUS: OL

After disconnecting the UPS from the mains:
input.frequency: 0.00
output.frequency: 49.61
ups.load: 5.8
battery.charge: (null)
input.voltage: -0.1
output.voltage: 57.6
STATUS: OB

upsc Inform at localhost with UPS disconnected from the mains:

battery.charge: 196.9
driver.name: powercom
driver.parameter.linevoltage: 220
driver.parameter.port: /dev/ttyS0
driver.parameter.shutdownArguments: {{1,0},y}
driver.parameter.type: KIN1500AP
driver.version: 2.0.4
driver.version.internal: $ Revision: 0.5 $
input.frequency: 0.00
input.voltage: -0.1
input.voltage.nominal: 220
output.frequency: 49.61
output.voltage: 55.6
ups.load: 5.8
ups.mfr: PowerCom
ups.model: Unknown
ups.model.type: KIN1500AP
ups.serial: Unknown
ups.status: OB

I hope you had time to read all that and thank you for your attention. I see that the erroneous message of upsc "battery charge 196.9" when the UPS is disconnected from the mains is still present. Probably powercom is not the correct driver, what do you think?

And something else, I also carried out some experimentation with my current upstype, KIN1500AP. At first I issued "upsdrvctl shutdown" to make sure that the UPS recgnizes the software instruction to shut itself down. It really shutdown itself. Then I added the text you suggested:

# shutdown the UPS
if (test -f /etc/killpower)
then
echo "Killing the power, bye!"
/usr/local/ups/bin/upsdrvctl shutdown
sleep 120
fi
#end of shutdown the UPS

to my shutdown script. It is the script /etc/rc.d/rc.6. I am running Slackware 10.2 and there is no halt.sh script. At first I put it in the script before the killing of all processes and before unmounting the file systems. Them I disconnected the UPS and after 30 sec the system called the rc.6 script. It started executing, but when it came to the UPS shutdown section, it just waited 120 sec and then powered the UPS off. The rest of the script, involving unmounting the filesystems was not executed. So when I rebooted the system, fsck said the filesystem was not clean. Of course with reiserfs that is not a problem, for at the next reboot everything was ok.
Then I experimented adding the script you suggested to me after the unmounting of the filesystems. And the result was as I had anticipated-the rc.6 script could not find the filesystem with the "upsdrvctl" command. So the problem is where in the shutdown script shall I put the script for the UPS shutdown, and what times shall I set, so that right after the PC shuts down normally, the UPS goes down?
I am sending my shutdown script to you as an attachment. If you cannot receive it, and you think you might be able to help me, tell me to send it in another letter. 

Thank you very much for your attention. I beg your pardon for wasting your time.

Regards,
Martin



-----------------------------------------------------------------
http://ide.li/ - портал за българите по света. Статии, новини, форуми, снимки, информация.



More information about the Nut-upsuser mailing list