[главная] | [каталоги]

создан: 2020-04-10 22:07:07
пользователь: cloud раздел: технологии
[просмотров|325]
ИБП IPPON Back Basic 650 Euro + Linux NUT
подключаем ибп к компьютеру

apt-get install nut

service udev restart
upsdrvctl start

1. Настройка

cd /etc/nut

nut.conf
MODE=standalone

ups.conf
[ippon]
driver = blazer_usb
port = auto
desc = "IPPON BACK Basic 650VA"
default.battery.voltage.high = 13.60
default.battery.voltage.low = 10.60
ignorelb
override.battery.charge.low = 40
override.battery.charge.warning = 45

upsd.conf
LISTEN 127.0.0.1 3493

upsd.users
[upsmon]
password = 12345
actions = SET FSD
instcmds = ALL
upsmon master

upsmon.conf
MONITOR ippon@localhost 1 upsmon 12345 master

upssched.conf
CMDSCRIPT /bin/upssched-cmd

2. перезагрузим nut и компьютер

service nut-server restart
service nut-client restart

reboot

3. пишем скрипт upscmd.sh который будет отключать звук после включения компьютера, добавить желательно скрипт в /etc/rc.local

#!/bin/bash

check_ups_beeper () {
BEEPER_E=`upsc ippon@localhost ups.beeper.status 2>&1 | grep enabled`
}
var=0
while check_ups_beeper
do
var=$((var + 1))
echo "$var. [$BEEPER_E] [$BEEPER_D]"
sleep 10
if [[ "$BEEPER_E" -ge 'enabled' ]]; then
echo "BEEPER_E enabled"
upscmd -u upsmon -p 12345 ippon@localhost beeper.toggle
sleep 5
elif [[ "$BEEPER_E" -ge '' ]]; then
echo "BEEPER_E disabled"
sleep 3
break
fi

done

4. проверка ИБП

upsc ippon@localhost

battery.charge: 100
battery.charge.low: 40
battery.charge.warning: 45
battery.voltage: 13.70
battery.voltage.high: 13.60
battery.voltage.low: 10.60
battery.voltage.nominal: 12.0
device.type: ups
driver.flag.ignorelb: enabled
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.internal: 0.12
input.current.nominal: 2.0
input.frequency: 50.1
input.frequency.nominal: 50
input.voltage: 225.4
input.voltage.fault: 225.4
input.voltage.nominal: 220
output.voltage: 225.4
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 15
ups.productid: 5161
ups.status: OL
ups.temperature: 25.0
ups.type: offline / line interactive
ups.vendorid: 0665


fizord.ru © 2020
Андрей Исаков