Софт для ups Ippon Smart Power Pro 1400

Софт под Linux, разные программы, но только связанные с Linux

Модератор: /dev/random

QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

Очень бы хотелось найти на Линуксе софтину, позволяющую:
1. Выводить (желательно постоянно, в каком-нибудь гаджете, вызываемым например из значка в "трее" и/или из командной строки) информацию о состоянии батареи, входных выходных напряжениях, токах. Крайне желательно, на основе ориентировки на информацию о моделе т.к. мне говорили, что такие тесты ибп, как "тестовый разряд батареи" (с целью составить модель ее поведения) могут для батареи быть вредны.
2. Автоматически выключать компьютер в соответствии с указанным временем после пропадания входного сетевого питания/за n-ое время до n-го напряжения батареи/заряда батареи

Не обязательно, но ОЧЕНЬ желательно:
3. Работать с последовательным портом.

Заранее, большое спасибо за Ваши советы!
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

на вскидку: nut, apcusd.
это то, что «в глубине». ну а «на поверхности» — уж точно несть числа полку их.

p.s. насколько помню, ippon славится тем, что не выдумывает собственные стандарты. соответственно, с gnu/linux их оборудование прекрасно взаимодействует.
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

sash-kan писал(а):
13.04.2010 17:17
на вскидку: nut, apcusd.
это то, что «в глубине». ну а «на поверхности» — уж точно несть числа полку их.

p.s. насколько помню, ippon славится тем, что не выдумывает собственные стандарты. соответственно, с gnu/linux их оборудование прекрасно взаимодействует.

Имеете ввиду консольные программы под "в глубине"? )
А можете тогда назвать несколько хороших "на поверхности"?

*********
Кстати, на оф. сайте иппона есть версия их софтины под Линукс ввиде файла с расширением exe...Я правильно понимаю, что никакая это не Линукс версия? ))

Можете подсказать, какой из пакетов лучше выбирать отсюда ?

*********
Вообщем полазила по гуглу - часть написанного не поняла, часть попробовала установить - в результате ничего не вышло, одна муть какая-то...Одни пакеты не устанавливаются, пишется, что их нельзя поставить (хотя качаю именно под Мандриву т.е. мой дист. Линукса), другие устанавливаются, но проку никакого т.к. теми командами, которые указываются - их не вызовешь, нигде никаких значков на них не появляется...
Есть вот такая программа+графический интерфейс к ней, чтоб в несколько кликов можно было их хотя-бы скачать/установить без всяких технических заморочек с конфигурацией скриптов и т.п...??
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF писал(а):
13.04.2010 18:25
Имеете ввиду консольные программы под "в глубине"?
демонов имею в виду. ещё припомнил просто upsd.

QWERTYASDF писал(а):
13.04.2010 18:25
А можете тогда назвать несколько хороших "на поверхности"?
начиная с апплетов, conky и т.п. и заканчивая просто поиском по репозиторию на предмет «ups», «power» и т.д. конкретнее ничего сказать не могу: не пользуюсь.

QWERTYASDF писал(а):
13.04.2010 18:25
на оф. сайте иппона есть версия их софтины под Линукс ввиде файла с суффиксом exe
нормально-нормально. у них там много чего есть:
http://www.ippon.ru/ups/smartpro.php
QUOTE писал(а):Программное обеспечение имеется для Windows 95/98/ME/NT/2000 (Windows XP для некоторых языков), Linux 7.0.


QWERTYASDF писал(а):
13.04.2010 18:25
Одни пакеты не устанавливаются
в репозитории смотрите в первую очередь, в официальном репозитории.
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

nut, судя по менеджеру загрузки с репозиториев стоит (напротив него установлен флажок), но его не знаю, как запускать.
apcusd из репозиториев поставила - незнаю, как запустить, на имя такое консоль не реагирует, в гуи нигде значок для запуска не появился
bpowerd - тоже самое.
Может кто-нибудь "провести" меня через все этапы (ведь они по сути не такие долгие должны быть?) поиска-установки конкретной софтины, которая будет работать? Есть вообще такие на Линуксе *скептически*, или даже для этого нужны знания как минимум матерого Линуксойда, чтоб потом чего-то компилировать перекомпилировать отлаживать налаживать и т.п.?... :bad:
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF писал(а):
13.04.2010 22:14
nt… не знаю, как запускать
QWERTYASDF писал(а):
13.04.2010 22:14
apcusd из репозиториев поставила - незнаю, как запустить
QWERTYASDF писал(а):
13.04.2010 22:14
bpowerd - тоже самое

это демоны. их (возможно) потребуется настроить. запускаются они сами: см. вывод ps aux.
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

sash-kan писал(а):
13.04.2010 23:30
QWERTYASDF писал(а):
13.04.2010 22:14
nt… не знаю, как запускать
QWERTYASDF писал(а):
13.04.2010 22:14
apcusd из репозиториев поставила - незнаю, как запустить
QWERTYASDF писал(а):
13.04.2010 22:14
bpowerd - тоже самое

это демоны. их (возможно) потребуется настроить. запускаются они сами: см. вывод ps aux.

Вывод мне ни о чем не говорит, их имен я там не нашла...Так что пока ясно только то, что ничего не ясно :unsure:
Как мне запускать установленные мною пакеты??
Собственно
Может кто-нибудь "провести" меня через все этапы (ведь они по сути не такие долгие должны быть?) поиска-установки конкретной софтины, которая будет работать? Есть вообще такие на Линуксе *скептически*, или даже для этого нужны знания как минимум матерого Линуксойда, чтоб потом чего-то компилировать перекомпилировать отлаживать налаживать и т.п.?...
Спасибо сказали:
Аватара пользователя
megabaks
Сообщения: 697
ОС: Gentoo ~x86

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение megabaks »

вот как-то так настраивал, правда в генте
и да у nut есть морда,но мне проще в конфигах
и он работает через последовательный порт
работал с иппоном каким-то там повер-что-то
ups.conf

Код: Выделить всё

[myups]
driver = megatec
port = /dev/ttyS0
desc = ”Local UPS”

upsd.conf

Код: Выделить всё

MAXAGE 15
LISTEN 127.0.0.1 3493
MAXCONN 1024

upsmon.conf

Код: Выделить всё

MONITOR myups@localhost 1 upsmon пасс_юзера имя_юзера    (or slave)
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

megabaks писал(а):
14.04.2010 01:56
вот как-то так настраивал, правда в генте
и да у nut есть морда,но мне проще в конфигах
и он работает через последовательный порт
работал с иппоном каким-то там повер-что-то
ups.conf

Код: Выделить всё

[myups]
driver = megatec
port = /dev/ttyS0
desc = ”Local UPS”

upsd.conf

Код: Выделить всё

MAXAGE 15
LISTEN 127.0.0.1 3493
MAXCONN 1024

upsmon.conf

Код: Выделить всё

MONITOR myups@localhost 1 upsmon пасс_юзера имя_юзера    (or slave)
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Начала делать все по инструкции по ссылке с п.2 т.е. "настройке уже установленного пакета nut". Каталог /etc/ups/ существует, соответствующие файлы в нем тоже. Все сделала, как пишется (за исключением того, что не удалось проверить
Основная настройка окончена, но зайдите в файл upsd.users и в конце файла в [upsmaster] посмотрите пароль (по умолчанию он 8f15aa1c7a)
т.к. вот его конфиг:

Код: Выделить всё

# Network UPS Tools: Example upsd.users
#
# This file sets the permissions for upsd - the UPS network daemon.
# Users are defined here, are given passwords, and their privileges are
# controlled here too.  Since this file will contain passwords, keep it
# secure, with only enough permissions for upsd to read it.

# --------------------------------------------------------------------------

# Each user gets a section.  To start a section, put the username in
# brackets on a line by itself.  To set something for that user, specify
# it under that section heading.  The username is case-sensitive, so
# admin and AdMiN are two different users.
#
# Possible settings:
#
# password: The user's password.  This is case-sensitive.
#
# --------------------------------------------------------------------------
#
# actions: Let the user do certain things with upsd.
#
# Valid actions are:
#
# SET    - change the value of certain variables in the UPS
# FSD   - set the "forced shutdown" flag in the UPS
#
# --------------------------------------------------------------------------
#
# instcmds: Let the user initiate specific instant commands.  Use "ALL"
# to grant all commands automatically.  There are many possible
# commands, so use 'upscmd -l' to see what your hardware supports.  Here
# are a few examples:
#
# test.panel.start    - Start a front panel test
# test.battery.start    - Start battery test
# test.battery.stop    - Stop battery test
# calibrate.start    - Start calibration
# calibrate.stop    - Stop calibration
#
# --------------------------------------------------------------------------
#
# Example:
#
#    [admin]
#        password = mypass
#        actions = SET
#        instcmds = ALL
#

#
# --- Configuring for upsmon
#
# To add a user for your upsmon, use this example:
#
#    [upsmon]
#        password  = pass
#        upsmon master
# or
#        upsmon slave
#
# The matching MONITOR line in your upsmon.conf would look like this:
#
# MONITOR myups@localhost 1 upsmon pass master    (or slave)
Одни коменты т.е.
Далее, выполнить
Всё. Пробуем запустить сервер и клиент. Для этого в рут-консоли даём команду “rcupsd start“, результатом выполнения которой во всех строках должно появиться слово “done”
не удалось т.к. консоль отвечает, что команда не найдена.
Что делать? )
Спасибо сказали:
Аватара пользователя
megabaks
Сообщения: 697
ОС: Gentoo ~x86

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение megabaks »

эх...дистр какой?
в генте

Код: Выделить всё

 /etc/init.d/upsd start &&  /etc/init.d/upsmon start &&  /etc/init.d/upsdrv start

З.Ы. мандра значит - значит что-то типа

Код: Выделить всё

/etc/rc.d/init.d/upsd start &&  /etc/rc.d/init.d/upsmon start && /etc/rc.d/init.d/upsdrv start
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

megabaks писал(а):
14.04.2010 04:09
эх...дистр какой?
в генте

Код: Выделить всё

 /etc/init.d/upsd start &&  /etc/init.d/upsmon start &&  /etc/init.d/upsdrv start

З.Ы. мандра значит - значит что-то типа

Код: Выделить всё

/etc/rc.d/init.d/upsd start &&  /etc/rc.d/init.d/upsmon start && /etc/rc.d/init.d/upsdrv start

Мандрива 2010
:kissing: Спасибо, получилось - инфа об упс-е в консоли выдается )
Теперь бы еще с гуи-мордой разобраться...
Судя по менеджеру загрузок с репозиториев, knutclient у меня уже установлен...Но как его вызвать? На такое имя консоль не реагирует, значка нигде нету...(
Спасибо сказали:
BIgAndy
Сообщения: 1923

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение BIgAndy »

QWERTYASDF писал(а):
14.04.2010 04:33
Судя по менеджеру загрузок с репозиториев, knutclient у меня уже установлен...Но как его вызвать? На такое имя консоль не реагирует, значка нигде нету...(

whereis knutclient
locate knutclient
find / -name "knut*"
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

BIgAndy, спасибо!
Все заработало, гуи отображает параметры ибп )
Но все-таки возникают два серьезных вопроса:
1. Как мне настроить это дело на автоматический старт при загрузке ОС? Ибо из этого
Теперь нужно сделать так, чтобы upsd вместе со своими настройками и драйверами загружался при старте системы. Для этого в openSUSE запускаем “Yast2“, переходим на страницу “Система” и выбираем модуль “Системные службы (runlevel)“. В открывшемся окне модуля ищем строку “upsd“, выбираем её, нажимаем на кнопку “Включить” (появится сообщение об успешном изменении типа запуска службы), а затем “Завершить” для сохранения изменений в системе.
я не поняла, что такое Yast2, где он находится (если вообще находится) в Мандриве?...
2. Как мне настроить автоматические действия на различные события, связанные напрямую с ибп, вроде пропадания связи с ним, входного сетевого напряжения, разряда батареи до н-го уровня, и т.п...?? Ибо главный смысл наличия программы мониторинга именно в том, чтоб комп сам корректно выключился при достаточно низком уровне заряда батареи и/или после истечения установленного мною времени работы от батареи.
Спасибо сказали:
Аватара пользователя
megabaks
Сообщения: 697
ОС: Gentoo ~x86

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение megabaks »

в мандре в настройке компа ( тот что рута просит - *drake*) есть про управление службами/демонами - вот там и надо поставить галочки напротив upsd upsdrv upsmon
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

Уф, вроде получилось. А никак не сделать так, чтоб гуи не требовал при загрузке рут-пароль...ну типа мб вбить ему этот пароль куда-нибудь, что он его помнил? Или это очень не есть хорошо с позиции безопасности?

А насчет второго вопроса о автоматическом завершении работы ОС? Это для меня самое важное...
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF писал(а):
15.04.2010 00:42
А никак не сделать так, чтоб гуи не требовал при загрузке рут-пароль
какой бинарник вы запускаете?

допустим, бинарник называется nut.
тогда приведите вывод следующих команд:
$ ls -l /etc/pam.d/nut
$ cat /etc/pam.d/nut
$ grep -r 'auth.*permit' /etc/pam.d
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

sash-kan писал(а):
15.04.2010 02:11
QWERTYASDF писал(а):
15.04.2010 00:42
А никак не сделать так, чтоб гуи не требовал при загрузке рут-пароль
какой бинарник вы запускаете?

допустим, бинарник называется nut.
тогда приведите вывод следующих команд:
$ ls -l /etc/pam.d/nut
$ cat /etc/pam.d/nut
$ grep -r 'auth.*permit' /etc/pam.d

Код: Выделить всё

[root@localhost QWERTYASDF]# ls -l /etc/pam.d/nut
ls: невозможно получить доступ к /etc/pam.d/nut: Нет такого файла или каталога
[root@localhost QWERTYASDF]# cat /etc/pam.d/nut
cat: /etc/pam.d/nut: Нет такого файла или каталога
[root@localhost QWERTYASDF]# grep -r 'auth.*permit' /etc/pam.d
/etc/pam.d/kde-np:auth       required pam_permit.so
Спасибо сказали:
Аватара пользователя
megabaks
Сообщения: 697
ОС: Gentoo ~x86

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение megabaks »

ну если мой конфиг, то при разряженной батарее upsmon скажет "/sbin/shutdown -h +0" где +0 лучше наверно заменить на now
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

megabaks писал(а):
15.04.2010 02:48
ну если мой конфиг, то при разряженной батарее upsmon скажет "/sbin/shutdown -h +0" где +0 лучше наверно заменить на now

А нельзя задать произвольное время до завершения работы после пропадания на упс-е входного сетевого напряжения, и в то-же время чтоб была возможность "переключить" программу на завершение работы ОС именно при разр. батарее? Ну т.е., чтоб комп выключился скажем по истечении минут 10-ти, а не 40-50-ти, когда батарея совсем сядет?
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF
я же написал:
sash-kan писал(а):
15.04.2010 02:11
допустим, бинарник называется nut.
тогда

если бинарник называется по-другому, подставьте нужное имя.
если он всё-таки называется nut, то покажите вывод:
$ ls -l /usr/bin/nut
$ ls -l /usr/sbin/nut
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

sash-kan писал(а):
15.04.2010 02:58
QWERTYASDF
я же написал:
sash-kan писал(а):
15.04.2010 02:11
допустим, бинарник называется nut.
тогда

если бинарник называется по-другому, подставьте нужное имя.
если он всё-таки называется nut, то покажите вывод:
$ ls -l /usr/bin/nut
$ ls -l /usr/sbin/nut

Простите, сплю...Посмотрю уже завтра. Но предчувствуя провал этой попытки, позволю задать вопрос: "Как определить этот бинарник?"...В /etc/init.d одни шелл-скрипты...А пароль у меня вообще спрашивается в окошке с заголовком "Кнат-клиент"
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF писал(а):
15.04.2010 03:18
Как определить этот бинарник?
вариант 1. запустите, введите пароль, а после этого ищите его в выводе
$ ps aux
процесс должен «светиться» как за запущенный root-ом (первая колонка).

вариант 2. посмотрите в свойствах ярлыка, с помощью которого запускаете.

вариант 3. поищите подходящее имя в /etc/pam.d/. по идее, это должен быть symlink.
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

Сам nut то вроде у меня при загрузке запускается автоматом, мне нужно, чтоб гуи (/usr/bin/knutclient) так-же запускался

Код: Выделить всё

[QWERTYASDF@localhost ~]$ whereis knutclient
knutclient: /usr/bin/knutclient
[QWERTYASDF@localhost ~]$ ls -l /etc/pam.d/knutclient
ls: невозможно получить доступ к /etc/pam.d/knutclient: Нет такого файла или каталога
[QWERTYASDF@localhost ~]$ ls -l /etc/pam.d/usr/bin/knutclient
ls: невозможно получить доступ к /etc/pam.d/usr/bin/knutclient: Нет такого файла или каталога
[QWERTYASDF@localhost ~]$ cat /etc/pam.d/knutclient
cat: /etc/pam.d/knutclient: Нет такого файла или каталога
[QWERTYASDF@localhost ~]$ cat /etc/pam.d//usr/bin/knutclient
cat: /etc/pam.d//usr/bin/knutclient: Нет такого файла или каталога
[QWERTYASDF@localhost ~]$ su
Password:
[root@localhost [QWERTYASDF]# grep -r 'auth.*permit' /etc/pam.d
/etc/pam.d/kde-np:auth       required pam_permit.so
[root@localhost [QWERTYASDF]#
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

QWERTYASDF
продолжим.
$ ls -l /usr/bin/knutclient /usr/sbin/knutclient
?
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

sash-kan писал(а):
15.04.2010 19:56
QWERTYASDF
продолжим.
$ ls -l /usr/bin/knutclient /usr/sbin/knutclient
?

ну вот сейчас все запущено, все пашет
Вот результат выполнения данной команды:

Код: Выделить всё

[QWERTYASDF@localhost ~]$ ls -l /usr/bin/knutclient /usr/sbin/knutclient
ls: невозможно получить доступ к /usr/sbin/knutclient: Нет такого файла или каталога
-rwxr-xr-x 1 root root 383668 2009-04-14 22:46 /usr/bin/knutclient*

зы: бинарный (исполняемый) файл Кнат-клиента у меня видимо так и называется knutclient , поэтому не бросайтесь помидорами, если что )
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

и запуск
$ /usr/bin/knutclient
приводит к запросу пароля root? тогда, боюсь, мы будем ещё очень долго разбираться, как от этого избавиться.
(suid-бит я бы ни в коем случае не рекомендовал).
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »


sash-kan писал(а):
15.04.2010 22:09
и запуск
$ /usr/bin/knutclient
приводит к запросу пароля root? тогда, боюсь, мы будем ещё очень долго разбираться, как от этого избавиться.
(suid-бит я бы ни в коем случае не рекомендовал).

сейчас например, когда я его выключила (щелчок по значку в трее - "выход"), а потом запустила из консоли снова - он запустился без пароля, но и ибп не видит, пишет соед. не установлено )) А когда из под рута - все ок...
Ладно, Бог с ним, с запросом пароля...Можно сделать так, чтоб knutclient автоматом запускался при загрузке? )
********
Так, вроде пока отбой...Незнаю, сейчас комп перезагрузила...автоматом все запустилось. А с паролем - действительно пофиг, уж не до жира...(
********
И еще, Вы не обижайтесь пожалуйста, но нельзя ли Вас (и вообще всех знатоков) попросить проверить мои конфигурационные файлы?... :blush: :blush: :blush: Просто в разных инструкциях бывает написано немного по разному...И часть одной инструкции совпадает с одной частью расположения сист. каталогов и конф. файлов, часть другой - с другой частью...Вот я и боюсь, как бы ненароком не испортить чего или банально под конец не запутаться...(((
Конкретно от конфига мне нужно, чтобы: 1. Как можно более точно определялись показатели состояния ибп, в частности процентные показатели нагрузки и заряда батареи. Для этого судя по инструкции надо вводить модель ибп, но там у меня либо блока такого в конфиг. файле нет, либо файл по другому называется, что смущает...2. Вне зависимости от состояния графической оболочки (малоли...) чтобы компьютер корректно выключился при н-ом/низком заряде батареи. А совсем супер будет, если добавится возможность самой указывать время работы от батареи.
Вот мои конфиги в /etc/ups:
ups.conf

Код: Выделить всё

# Network UPS Tools: example ups.conf
#
# --- SECURITY NOTE ---
#
# If you use snmp-ups and set a community string in here, you
# will have to secure this file to keep other users from obtaining
# that string.  It needs to be readable by upsdrvctl and any drivers,
# and by upsd.
#
# ---
#
# This is where you configure all the UPSes that this system will be
# monitoring directly.  These are usually attached to serial ports, but
# USB devices and SNMP devices are also supported.
#
# This file is used by upsdrvctl to start and stop your driver(s), and
# is also used by upsd to determine which drivers to monitor.  The
# drivers themselves also read this file for configuration directives.
#
# The general form is:
#
# [upsname]
#       driver = <drivername>
#         port = <portname>
#    < any other directives here >
#
# The section header ([upsname]) can be just about anything as long as
# it is a single word inside brackets.  upsd uses this to uniquely
# identify a UPS on this system.
#
# If you have a UPS called snoopy, your section header would be "[snoopy]".
# On a system called "doghouse", the line in your upsmon.conf to monitor
# it would look something like this:
#
#     MONITOR snoopy@doghouse 1 upsmonuser mypassword master
#
# It might look like this if monitoring in slave mode:
#
#     MONITOR snoopy@doghouse 1 upsmonuser mypassword slave
#
# Configuration directives
# ------------------------
#
# These directives are common to all drivers that support ups.conf:
#
#  driver: REQUIRED.  Specify the program to run to talk to this UPS.
#          apcsmart, bestups, and sec are some examples.
#
#    port: REQUIRED.  The serial port where your UPS is connected.
#          /dev/ttyS0 is usually the first port on Linux boxes, for example.
#
# sdorder: optional.  When you have multiple UPSes on your system, you
#          usually need to turn them off in a certain order.  upsdrvctl
#          shuts down all the 0s, then the 1s, 2s, and so on.  To exclude
#          a UPS from the shutdown sequence, set this to -1.
#
#          The default value for this parameter is 0.
#
#  nolock: optional, and not recommended for use in this file.
#
#          If you put nolock in here, the driver will not lock the
#          serial port every time it starts.  This may allow other
#          processes to seize the port if you start more than one by
#          mistake.
#
#          This is only intended to be used on systems where locking
#          absolutely must be disabled for the software to work.
#
# maxstartdelay: optional.  This can be set as a global variable
#                above your first UPS definition and it can also be
#                set in a UPS section.  This value controls how long
#                upsdrvctl will wait for the driver to finish starting.
#                This keeps your system from getting stuck due to a
#                broken driver or UPS.
#
#                The default is 45 seconds.
#
#
# Anything else is passed through to the hardware-specific part of
# the driver.
#
# Examples
# --------
#
# A simple example for a UPS called "powerpal" that uses the megatec
# driver on /dev/ttyS0 is:
#
# [powerpal]
#    driver = megatec
#    port = /dev/ttyS0
#    desc = "Web server"
#
# If your UPS driver requires additional settings, you can specify them
# here.  For example, if it supports a setting of "1234" for the
# variable "cable", it would look like this:
#
# [myups]
#     driver = mydriver
#    port = /dev/ttyS1
#    cable = 1234
#    desc = "Something descriptive"
#
# To find out if your driver supports any extra settings, start it with
# the -h option and/or read the driver's documentation.
[myups]
    driver = megatec
    port = /dev/ttyS0
    desc = “Local UPS”

upsd.conf

Код: Выделить всё

# Network UPS Tools: example upsd configuration file
#
# This file contains access control data, you should keep it secure.
#
# It should only be readable by the user that upsd becomes.  See the FAQ.

# =======================================================================
# MAXAGE <seconds>
# MAXAGE 15
#
# This defaults to 15 seconds.  After a UPS driver has stopped updating
# the data for this many seconds, upsd marks it stale and stops making
# that information available to clients.  After all, the only thing worse
# than no data is bad data.
#
# You should only use this if your driver has difficulties keeping
# the data fresh within the normal 15 second interval.  Watch the syslog
# for notifications from upsd about staleness.

# =======================================================================
# LISTEN <address> [<port>]
# LISTEN 127.0.0.1 3493
#
# This defaults to the global IPv4 listening address and port 3493. You
# may specify each interface you want upsd to listen on for connections,
# optionally with a port number.
#
# You may need this if you have multiple interfaces on your machine and
# you don't want upsd to listen to all interfaces (for instance on a
# firewall, you may not want to listen to the external interface).
#
# This will only be read at startup of upsd.  If you make changes here,
# you'll need to restart upsd, reload will have no effect.

# =======================================================================
# MAXCONN <connections>
# MAXCONN 1024
#
# This defaults to 1024 connections. Each UPS, each LISTEN address and each
# client count as one connection. If the server runs out of connections, it
# will no longer accept new incoming client connections.

ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32ACCEPT localhost
REJECT all

upsd.users

Код: Выделить всё

# Network UPS Tools: Example upsd.users
#
# This file sets the permissions for upsd - the UPS network daemon.
# Users are defined here, are given passwords, and their privileges are
# controlled here too.  Since this file will contain passwords, keep it
# secure, with only enough permissions for upsd to read it.

# --------------------------------------------------------------------------

# Each user gets a section.  To start a section, put the username in
# brackets on a line by itself.  To set something for that user, specify
# it under that section heading.  The username is case-sensitive, so
# admin and AdMiN are two different users.
#
# Possible settings:
#
# password: The user's password.  This is case-sensitive.
#
# --------------------------------------------------------------------------
#
# actions: Let the user do certain things with upsd.
#
# Valid actions are:
#
# SET    - change the value of certain variables in the UPS
# FSD   - set the "forced shutdown" flag in the UPS
#
# --------------------------------------------------------------------------
#
# instcmds: Let the user initiate specific instant commands.  Use "ALL"
# to grant all commands automatically.  There are many possible
# commands, so use 'upscmd -l' to see what your hardware supports.  Here
# are a few examples:
#
# test.panel.start    - Start a front panel test
# test.battery.start    - Start battery test
# test.battery.stop    - Stop battery test
# calibrate.start    - Start calibration
# calibrate.stop    - Stop calibration
#
# --------------------------------------------------------------------------
#
# Example:
#
#    [admin]
#        password = mypass
#        actions = SET
#        instcmds = ALL
#

#
# --- Configuring for upsmon
#
# To add a user for your upsmon, use this example:
#
#    [upsmon]
#        password  = pass
#        upsmon master
# or
#        upsmon slave
#
# The matching MONITOR line in your upsmon.conf would look like this:
#
# MONITOR myups@localhost 1 upsmon pass master    (or slave)

upsmon.conf.sample

Код: Выделить всё

# Network UPS Tools: example upsmon configuration
#
# This file contains passwords, so keep it secure.

# --------------------------------------------------------------------------
# RUN_AS_USER <userid>
#
# By default, upsmon splits into two processes.  One stays as root and
# waits to run the SHUTDOWNCMD.  The other one switches to another userid
# and does everything else.
#
# The default nonprivileged user is set at compile-time with
#     'configure --with-user=...'.
#
# You can override it with '-u <user>' when starting upsmon, or just
# define it here for convenience.
#
# Note: if you plan to use the reload feature, this file (upsmon.conf)
# must be readable by this user!  Since it contains passwords, DO NOT
# make it world-readable.  Also, do not make it writable by the upsmon
# user, since it creates an opportunity for an attack by changing the
# SHUTDOWNCMD to something malicious.
#
# For best results, you should create a new normal user like "nutmon",
# and make it a member of a "nut" group or similar.  Then specify it
# here and grant read access to the upsmon.conf for that group.
#
# This user should not have write access to upsmon.conf.
#
RUN_AS_USER ups

# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
#
# List systems you want to monitor.  Not all of these may supply power
# to the system running upsmon, but if you want to watch it, it has to
# be in this section.
#
# You must have at least one of these declared.
#
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
# like ups@localhost, su700@mybox, etc.
#
# Examples:
#
#  - "su700@mybox" means a UPS called "su700" on a system called "mybox"
#
#  - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
#    "bigbox" which runs upsd on port "5678".
#
# The UPS names like "su700" and "fenton" are set in your ups.conf
# in [brackets] which identify a section for a particular driver.
#
# If the ups.conf on host "doghouse" has a section called "snoopy", the
# identifier for it would be "snoopy@doghouse".
#
# <powervalue> is an integer - the number of power supplies that this UPS
# feeds on this system.  Most computers only have one power supply, so this
# is normally set to 1.  You need a pretty big or special box to have any
# other value here.
#
# You can also set this to 0 for a system that doesn't supply any power,
# but you still want to monitor.  Use this when you want to hear about
# changes for a given UPS without shutting down when it goes critical,
# unless <powervalue> is 0.
#
# <username> and <password> must match an entry in that system's
# upsd.users.  If your username is "monmaster" and your password is
# "blah", the upsd.users would look like this:
#
#    [monmaster]
#        password  = blah
#        allowfrom =     (whatever applies to this host)
#        upsmon master     (or slave)
#
# "master" means this system will shutdown last, allowing the slaves
# time to shutdown first.
#
# "slave" means this system shuts down immediately when power goes critical.
#
# Examples:
#
# MONITOR myups@bigserver 1 monmaster blah master
# MONITOR su700@server.example.com 1 upsmon secretpass slave
# MONITOR myups@localhost 1 upsmon pass master    (or slave)

# --------------------------------------------------------------------------
# MINSUPPLIES <num>
#
# Give the number of power supplies that must be receiving power to keep
# this system running.  Most systems have one power supply, so you would
# put "1" in this field.
#
# Large/expensive server type systems usually have more, and can run with
# a few missing.  The HP NetServer LH4 can run with 2 out of 4, for example,
# so you'd set that to 2.  The idea is to keep the box running as long
# as possible, right?
#
# Obviously you have to put the redundant supplies on different UPS circuits
# for this to make sense!  See big-servers.txt in the docs subdirectory
# for more information and ideas on how to use this feature.

MINSUPPLIES 1

# --------------------------------------------------------------------------
# SHUTDOWNCMD "<command>"
#
# upsmon runs this command when the system needs to be brought down.
#
# This should work just about everywhere ... if it doesn't, well, change it.

SHUTDOWNCMD "/sbin/shutdown -h +0"

# --------------------------------------------------------------------------
# NOTIFYCMD <command>
#
# upsmon calls this to send messages when things happen
#
# This command is called with the full text of the message as one argument.
# The environment string NOTIFYTYPE will contain the type string of
# whatever caused this event to happen.
#
# Note that this is only called for NOTIFY events that have EXEC set with
# NOTIFYFLAG.  See NOTIFYFLAG below for more details.
#
# Making this some sort of shell script might not be a bad idea.  For more
# information and ideas, see pager.txt in the docs directory.
#
# Example:
# NOTIFYCMD /usr/local/ups/bin/notifyme
#NOTIFYCMD /usr/sbin/upssched

# --------------------------------------------------------------------------
# POLLFREQ <n>
#
# Polling frequency for normal activities, measured in seconds.
#
# Adjust this to keep upsmon from flooding your network, but don't make
# it too high or it may miss certain short-lived power events.

POLLFREQ 5

# --------------------------------------------------------------------------
# POLLFREQALERT <n>
#
# Polling frequency in seconds while UPS on battery.
#
# You can make this number lower than POLLFREQ, which will make updates
# faster when any UPS is running on battery.  This is a good way to tune
# network load if you have a lot of these things running.
#
# The default is 5 seconds for both this and POLLFREQ.

POLLFREQALERT 5

# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
#
# The master upsmon process uses this number when waiting for slaves to
# disconnect once it has set the forced shutdown (FSD) flag.  If they
# don't disconnect after this many seconds, it goes on without them.
#
# Similarly, upsmon slave processes wait up to this interval for the
# master upsmon to set FSD when a UPS they are monitoring goes critical -
# that is, on battery and low battery.  If the master doesn't do its job,
# the slaves will shut down anyway to avoid damage to the file systems.
#
# This "wait for FSD" is done to avoid races where the status changes
# to critical and back between polls by the master.

HOSTSYNC 15

# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated.  If the status
# fetch fails, the UPS is marked stale.  If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition.  This may force a shutdown if it is providing
# a critical amount of power to your system.
#
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling
# them quickly enough.  Rule of thumb: take the larger of the two
# POLLFREQ values, and multiply by 3.

DEADTIME 15

# --------------------------------------------------------------------------
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system
#
# upsmon will create a file with this name in master mode when it's time
# to shut down the load.  You should check for this file's existence in
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists.
#
# See the shutdown.txt file in the docs subdirectory for more information.

POWERDOWNFLAG /etc/killpower

# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
#
# You can change the default messages to something else if you like.
#
# NOTIFYMSG <notify type> "message"
#
# NOTIFYMSG ONLINE    "UPS %s on line power"
# NOTIFYMSG ONBATT    "UPS %s on battery"
# NOTIFYMSG LOWBATT    "UPS %s battery is low"
# NOTIFYMSG FSD        "UPS %s: forced shutdown in progress"
# NOTIFYMSG COMMOK    "Communications with UPS %s established"
# NOTIFYMSG COMMBAD    "Communications with UPS %s lost"
# NOTIFYMSG SHUTDOWN    "Auto logout and shutdown proceeding"
# NOTIFYMSG REPLBATT    "UPS %s battery needs to be replaced"
# NOTIFYMSG NOCOMM    "UPS %s is unavailable"
# NOTIFYMSG NOPARENT    "upsmon parent process died - shutdown impossible"
#
# Note that %s is replaced with the identifier of the UPS in question.
#
# Possible values for <notify type>:
#
# ONLINE   : UPS is back online
# ONBATT   : UPS is on battery
# LOWBATT  : UPS has a low battery (if also on battery, it's "critical")
# FSD      : UPS is being shutdown by the master (FSD = "Forced Shutdown")
# COMMOK   : Communications established with the UPS
# COMMBAD  : Communications lost to the UPS
# SHUTDOWN : The system is being shutdown
# REPLBATT : The UPS battery is bad and needs to be replaced
# NOCOMM   : A UPS is unavailable (can't be contacted for monitoring)
# NOPARENT : The process that shuts down the system has died (shutdown impossible)

# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
#
# By default, upsmon sends walls (global messages to all logged in users)
# and writes to the syslog when things happen.  You can change this.
#
# NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
#
# NOTIFYFLAG ONLINE    SYSLOG+WALL
# NOTIFYFLAG ONBATT    SYSLOG+WALL
# NOTIFYFLAG LOWBATT    SYSLOG+WALL
# NOTIFYFLAG FSD    SYSLOG+WALL
# NOTIFYFLAG COMMOK    SYSLOG+WALL
# NOTIFYFLAG COMMBAD    SYSLOG+WALL
# NOTIFYFLAG SHUTDOWN    SYSLOG+WALL
# NOTIFYFLAG REPLBATT    SYSLOG+WALL
# NOTIFYFLAG NOCOMM    SYSLOG+WALL
# NOTIFYFLAG NOPARENT    SYSLOG+WALL
#
# Possible values for the flags:
#
# SYSLOG - Write the message in the syslog
# WALL   - Write the message to all users on the system
# EXEC   - Execute NOTIFYCMD (see above) with the message
# IGNORE - Don't do anything
#
# If you use IGNORE, don't use any other flags on the same line.

#NOTIFYFLAG ONLINE SYSLOG+EXEC
#NOTIFYFLAG ONBATT EXEC+SYSLOG
#NOTIFYFLAG LOWBATT SYSLOG+EXEC
#NOTIFYFLAG FSD SYSLOG+EXEC
#NOTIFYFLAG SHUTDOWN SYSLOG+EXEC

# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
#
# upsmon will normally warn you about a battery that needs to be replaced
# every 43200 seconds, which is 12 hours.  It does this by triggering a
# NOTIFY_REPLBATT which is then handled by the usual notify structure
# you've defined above.
#
# If this number is not to your liking, override it here.

RBWARNTIME 43200

# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
#
# upsmon will let you know through the usual notify system if it can't
# talk to any of the UPS entries that are defined in this file.  It will
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
# change the interval with this directive.

NOCOMMWARNTIME 300

# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
#
# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
# before executing your SHUTDOWNCMD.  If you need to do something in between
# those events, increase this number.  Remember, at this point your UPS is
# almost depleted, so don't make this too high.
#
# Alternatively, you can set this very low so you don't wait around when
# it's time to shut down.  Some UPSes don't give much warning for low
# battery and will require a value of 0 here for a safe shutdown.
#
# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
# the master will give up waiting for the slave to disconnect.

FINALDELAY 5

Очень Вас прошу...я уже запуталась...Не очень срочно, но если будет время - посмотрите плиз, чтоб уж все нормально работало :(
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение sash-kan »

свежий репортаж про ippon: http://blog.antage.name/posts/%D0%BD%D0%B0...kcomfo-pro.html
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
QWERTYASDF
Сообщения: 989
Статус: Чайник со свистком
ОС: GNU/Linux

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение QWERTYASDF »

Помогите пожалуйста, у меня с этой вещью возникли довольно неприятные проблемы.
Самое главное - зараза не выключает компьютер при разряженной батарее (при работе от нее). Наблюдала через кнатклиент - мигает сигнал "батарея разряжена" (одновременно с этим моргает соответствующий индикатор на лицевой панели ибп)...мигает мигает и нифига...
В upsmon.conf.sample

Код: Выделить всё

SHUTDOWNCMD "/sbin/shutdown -h now"
прописано.
Самое главное то, чтоб комп сам вырубился...Какой прок тогда от такого ПО... :glare:
Спасибо сказали:
BIgAndy
Сообщения: 1923

Re: Софт для ups Ippon Smart Power Pro 1400

Сообщение BIgAndy »

QWERTYASDF писал(а):
01.05.2010 07:01
Самое главное то, чтоб комп сам вырубился...Какой прок тогда от такого ПО... :glare:

Что в логах ?
shutdown точно находится в /sbin ?
Хватает ли прав на исполнние shutdown у демона?
Спасибо сказали: