Форум русскоязычного сообщества Ubuntu


Следите за новостями русскоязычного сообщества Ubuntu в Twitter-ленте @ubuntu_ru_loco

Автор Тема: UPS в UBUNTU.  (Прочитано 137113 раз)

0 Пользователей и 1 Гость просматривают эту тему.

qesx

  • Гость
Re: UPS в UBUNTU.
« Ответ #120 : 08 Февраля 2009, 20:40:08 »
кто-нибудь может скинуть деб пакет для ubuntu 8.04?
!!!важно чтоб версия нута была из ubuntu 8.04!!!

Оффлайн aleksubuntu

  • Активист
  • *
  • Сообщений: 254
    • Просмотр профиля
ASUS A8N-VM CSM, amd64 x2 4400, 2Gb, WD320Gb, GTX260GS, window7 x64 & kubuntu-12.10-desktop-amd64, s-1401, s2-3200ci, aspire 5745dg

qesx

  • Гость
Re: UPS в UBUNTU.
« Ответ #122 : 09 Февраля 2009, 14:22:16 »
спасибо
что-то сам я не догадался  :-[

Оффлайн aleksubuntu

  • Активист
  • *
  • Сообщений: 254
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #123 : 09 Февраля 2009, 16:56:54 »
Create at least one user and a group for running this software. You
    might call them "ups" and "nut".  The exact names aren't important as
    long as you are consistent.

For the purposes of this document, the user name and group name
    will be "ups" and "nut" respectively.

sam@sam-desktop:~$ sudo /usr/local/ups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.0-pre2
Network UPS Tools - Megatec protocol driver 1.6 (2.4.0-pre2)
Megatec protocol UPS detected.

sam@sam-desktop:~$ /usr/local/ups/bin/upsc myups@localhost
Error: Connection failure: Connection refused
sam@sam-desktop:~$ sudo /etc/init.d/nut start
sudo: /etc/init.d/nut: command not found
sam@sam-desktop:~$

подскажите как там дальше его запускать?

а через usb так и не хочет
sam@sam-desktop:~$ sudo /usr/local/ups/bin/upsdrvctl start
[sudo] password for sam:
Network UPS Tools - UPS driver controller 2.4.0-pre2
Network UPS Tools - Megatec protocol driver 1.6 (2.4.0-pre2)
Serial-over-USB transport layer 0.10
Megatec protocol UPS not detected.
Driver failed to start (exit status=1)
sam@sam-desktop:~$
« Последнее редактирование: 09 Февраля 2009, 17:15:43 от aleksubuntu »
ASUS A8N-VM CSM, amd64 x2 4400, 2Gb, WD320Gb, GTX260GS, window7 x64 & kubuntu-12.10-desktop-amd64, s-1401, s2-3200ci, aspire 5745dg

qesx

  • Гость
Re: UPS в UBUNTU.
« Ответ #124 : 22 Февраля 2009, 20:51:46 »
поставил 2.4.1 в листе драйверов заявлена поддержка usb
но получаю это:
 sudo /sbin/upsdrvctl start myups
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - Megatec protocol driver 1.6 (2.4.1)
Serial-over-USB transport layer 0.10
Can't claim USB device [06da:0003]: could not detach kernel driver from interface 0: Operation not permitted
Driver failed to start (exit status=1)

Оффлайн aleksubuntu

  • Активист
  • *
  • Сообщений: 254
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #125 : 04 Марта 2009, 18:12:39 »
sam@sam-desktop:~$ sudo /usr/local/ups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - Megatec protocol driver 1.6 (2.4.1)
Serial-over-USB transport layer 0.10
Megatec protocol UPS not detected.
Driver failed to start (exit status=1)
sam@sam-desktop:~$

почему не работает - уже никаких мыслей нет.
ASUS A8N-VM CSM, amd64 x2 4400, 2Gb, WD320Gb, GTX260GS, window7 x64 & kubuntu-12.10-desktop-amd64, s-1401, s2-3200ci, aspire 5745dg

KEIII

  • Гость
Re: UPS в UBUNTU.
« Ответ #126 : 08 Апреля 2009, 14:19:14 »
Здравствуйте! Имею Ippon Back Power Pro 400. Настраивал nut как написано в этом посте. В результате:
cash@cash-h3:~$ /etc/init.d/nut restart
 * Starting Network UPS Tools                                                 [ OK ]
cash@cash-h3:~$ sudo upsc myups@localhost
Error: Connection failure: Connection refused
В чем может быть проблема?

Yrii

  • Гость
Re: UPS в UBUNTU.
« Ответ #127 : 08 Апреля 2009, 15:44:39 »
UPS подключен через COM или usb?

KEIII

  • Гость
Re: UPS в UBUNTU.
« Ответ #128 : 08 Апреля 2009, 16:03:14 »
И через com подключал:
[myups]
driver = megatec
port = /dev/ttyS0
desc = "Local UPS"

и через usb:
[myups]
driver = megatec_usb
port = /dev/usb/hiddev0
desc = "Local UPS"

Оффлайн GreatKir

  • Новичок
  • *
  • Сообщений: 40
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #129 : 12 Июня 2009, 21:34:12 »
Подскажите, пожалуйста, как можно отлючить beeper (в ups.conf или как-то ещё). Драйвер megatec. ИБП - Mustek Powermust 600 USB.

Оффлайн aleksubuntu

  • Активист
  • *
  • Сообщений: 254
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #130 : 13 Июня 2009, 09:10:55 »
Здравствуйте! Имею Ippon Back Power Pro 400. Настраивал nut как написано в этом посте. В результате:
cash@cash-h3:~$ /etc/init.d/nut restart
 * Starting Network UPS Tools                                                 [ OK ]
cash@cash-h3:~$ sudo upsc myups@localhost
Error: Connection failure: Connection refused
В чем может быть проблема?
nut_2.4.1-2ubuntu4_amd64
/etc/nut/nut.conf
MODE=standalone

/etc/nut/ups.conf
[myups]
   driver = megatec
   port = /dev/ttyS0
   desc = "Local UPS"

/etc/nut/upsd.conf
LISTEN 127.0.0.1 3493

README.Debian
(3) device port permissions
    The nut user need to be able to access the device port both for reading and
    writing.

    For serial devices, there are two possibilities:

    a) You can add the nut user to the dialout group.
       The following command accomplishes this:
         addgroup nut dialout

       This is not done by default for security reason on Debian, but is applied
       on Ubuntu.

    b) Another solution, for system supporting udev, is to create a file
       (for example /etc/udev/rules.d/52_nut-serialups.rules), placed
       after 020_permissions.rules and to add something like:
         KERNEL=="ttyS1", GROUP="nut"

       where 'ttyS1' has to be replaced by the exact name of your serial port.

    For USB devices, permissions are automatically set by the
    52-nut-usbups.rules udev rules file.

и это ещё возможно надо

(4) /etc/nut/upsd.conf (see 'man 5 upsd.conf' for more information)
    the default /etc/nut/upsd.conf is fine for a "standalone" configuration.
    If you are in "netserver" MODE, you will have to modify the LISTEN option
    to something suitable.

    Ensure that the permissions of upsd.conf do not permit the world to
    read it.  It should already be thus, but the following command
    accomplishes this:
      chown root:nut /etc/nut/upsd.conf
      chmod 640 /etc/nut/upsd.conf
(5) /etc/nut/upsd.users (see 'man 5 upsd.users' for more information)
    Edit /etc/nut/upsd.users and add something like the following,
    without the comments, in order to define a user:
      [monmaster]
        password = blah
        upsmon master
    Please use *different* usernames and passwords than you use on your
    system; see the note regarding SECURITY CONSIDERATIONS at the end
    of this file.

    Ensure that the permissions of upsd.users do not permit the world to
    read it.  It should already be thus, but the following command
    accomplishes this:
      chown root:nut /etc/nut/upsd.users
      chmod 640 /etc/nut/upsd.users
« Последнее редактирование: 03 Ноября 2009, 21:30:28 от aleksubuntu »
ASUS A8N-VM CSM, amd64 x2 4400, 2Gb, WD320Gb, GTX260GS, window7 x64 & kubuntu-12.10-desktop-amd64, s-1401, s2-3200ci, aspire 5745dg

KEIII

  • Гость
Re: UPS в UBUNTU.
« Ответ #131 : 13 Июня 2009, 16:43:16 »
aleksubuntu
Благодарю, теперь работает.

Оффлайн Orbita

  • Новичок
  • *
  • Сообщений: 30
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #132 : 10 Августа 2009, 23:29:43 »
ubuntu-9.04+ippon smart power pro 2000 USB! ?

Доброй ночи.
так что так и не получилось подружить?
у меня то же что то похожее получается.
Код:
root@xxx-desktop:~# sudo /etc/init.d/nut restart
 * Restarting Network UPS Tools                                          [ OK ]
root@xxx-desktop:~# sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - Megatec protocol driver 1.6 (2.4.1)
Serial-over-USB transport layer 0.10
Can't claim USB device [0665:5161]: could not claim interface 0: Device or resource busy
Driver failed to start (exit status=1)
хотя здесь пишут что вроде работает или дрова старые нужны?
__http://vb-it.blogspot.com/2009/04/usb-ups-ippon-smart-power-pro-2000.html

Пользователь решил продолжить мысль 11 Августа 2009, 10:29:38:
попытался скомпилить старый драйвер
может кому понадобится.

« Последнее редактирование: 12 Августа 2009, 09:37:48 от Orbita »

Оффлайн Alegator

  • Новичок
  • *
  • Сообщений: 3
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #133 : 12 Августа 2009, 20:02:00 »
Как ни странно получилось.
Ubuntu 9.04  x64 alternate ядро 2.6.28.15  Gnome 2.26.1 UPS Ippon Smart Winner 1500

ставим пакет nut_2.2.1-2.1ubuntu7.1_amd64.deb на вопрос замены конфигов отвечаем y(раз 5 примерно)        
вылезает ошибка , забиваем на неё проверяем в апте - пакет стоит
заменяем конфиги:
/etc/default/nut
# start upsd
START_UPSD=yes

# set upsd specific options. use "man upsd" for more info
UPSD_OPTIONS=""

# start upsmon
START_UPSMON=yes

# set upsmon specific options. use "man upsmon" for more info
UPSMON_OPTIONS=""

# At the end of an emergency system halt, the upsmon master will signal the
# UPS to switch off. This may fail for any number of reasons, however, most
# notably if line power returns during the shutdown process. (See the
# section "Power races" in /usr/share/doc/nut/docs/shutdown.txt.gz)
#
# The system will wait this long for the UPS to cut power, and then reboot.
# It should be long enough to exhaust the batteries (in case line power
# continues to be unavailable), but not so long that the system remains
# offline for an unreasonable amount of time (if line power has returned).
#
# See the sleep(1) man page for compatible time syntax. If you specify the
# time in seconds, use the "s" suffix.
#
###########################################################################
################################# WARNING #################################
###########################################################################
# this workaround might be dangerous under some circumstances
# Please read http://bugs.debian.org/358696 for more details
#
#POWEROFF_WAIT=15m

!!! строки с # в начале вобщем не нужны,но привожу целиком ибо править лень да и если почитать
можно и пользу извлечь.

/etc/nut/ups.conf
[myups]
      driver = megatec_usb
      port = /dev/usb/hiddev0
      desc = "Local UPS"
      lowbatt = 40              
параметр lowbatt - процент зарядка аккума при котором nut начнёт выгрузку системы.

/etc/nut/upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32

ACCEPT localhost
REJECT all

/etc/nut/upsd.users
MONITOR myups@localhost 1 upsmaster 1234567890 master

/etc/nut/upsmon.conf
MONITOR myups@localhost 1 upsmon defupspasswd  master
        NOTIFYCMD /usr/local/sbin/callwall
        NOTIFYFLAG ONLINE  SYSLOG+EXEC
        NOTIFYFLAG ONBATT  SYSLOG+EXEC
        NOTIFYFLAG LOWBATT SYSLOG+EXEC
        MINSUPPLIES 1
        SHUTDOWNCMD "/sbin/shutdown -h +0"
        POLLFREQ 5
        POLLFREQALERT 2
        HOSTSYNC 15
        DEADTIME 15
        POWERDOWNFLAG /etc/killpower
        RBWARNTIME 43200
        NOCOMMWARNTIME 300
        FINALDELAY 5

далее :
aleg@kamputer:~$ sudo /etc/init.d/nut restart
[sudo] password for aleg:
 * Restarting Network UPS Tools                                          [ OK ]
aleg@kamputer:~$ upsc myups@localhost
battery.charge: 97.9
battery.voltage: 54.30
battery.voltage.nominal: 48.0
driver.name: megatec_usb
driver.parameter.lowbatt: 40
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/usb/hiddev0
driver.version: 2.2.1-
driver.version.internal: 1.5.13
input.frequency: 49.9
input.voltage: 222.0
input.voltage.fault: 222.0
input.voltage.maximum: 222.0
input.voltage.minimum: 218.9
output.voltage: 222.0
output.voltage.nominal: 220.0
ups.beeper.status: enabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 22.0
ups.mfr: unknown
ups.model: unknown
ups.serial: unknown
ups.status: OL
ups.temperature: 35.2
aleg@kamputer:~$

работает вроде-бы...
при отключении напруги (220 V):
aleg@kamputer:~$ upsc myups@localhost
battery.charge: 81.5
battery.voltage: 51.90
battery.voltage.nominal: 48.0
driver.name: megatec_usb
driver.parameter.lowbatt: 40
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/usb/hiddev0
driver.version: 2.2.1-
driver.version.internal: 1.5.13
input.frequency: 50.0
input.voltage: 0.0
input.voltage.fault: 201.3
input.voltage.maximum: 222.6
input.voltage.minimum: 218.9
output.voltage: 219.6
output.voltage.nominal: 220.0
ups.beeper.status: enabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 21.0
ups.mfr: unknown
ups.model: unknown
ups.serial: unknown
ups.status: OB
ups.temperature: 35.2
aleg@kamputer:~$

тобишь тоже работает,а бывало USB отваливался при отключении питания (на 8.04 или 8.10 точно не помню)

после всех манипуляций система была перезагружена(для чистоты эксперимента)
результат тот-же.
knutclient ещё не проверял.

Интересно то что при установке 9.04 этот вариан у меня почему-то НЕ РАБОТАЛ!!!(проверьте если есть желание)

да и ещё:
aleg@kamputer:~$ /sbin/upsdrvctl start myups
Network UPS Tools - UPS driver controller 2.2.1-
Network UPS Tools 2.2.1- - Megatec protocol driver 1.5.13 [megatec_usb]
Carlos Rodrigues (c) 2003-2007

Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) 2007

ser_send_pace: Device detached? (error -1: error sending control message: Device or resource busy)
Successfully reconnected
ser_send_pace: Device detached? (error -1: error sending control message: Device or resource busy)
Successfully reconnected
ser_send_pace: Device detached? (error -1: error sending control message: Device or resource busy)
Successfully reconnected
                                                                              
Широковещательное сообщение от nut@kamputer        
        (somewhere) at 23:49 ...                                              
                                                                              
Communications with UPS myups@localhost lost                                  
                                                                              
The UPS is supported, but the connection is too unreliable. Try checking the cable for defects.
Driver failed to start (exit status=1)
                                                                              
Широковещательное сообщение от nut@kamputer        
        (somewhere) at 23:50 ...                                              
                                                                              
Communications with UPS myups@localhost established                            
                                                                              
а так работает вроде бы.....

п.с. в апте на пакет nut наверное лучше поставить лок чтоб не обновлялся...

п.п.с.   при выдёргивании шнурка USB nut  просто выгружает систему почти моментально (секунд  через 10)
« Последнее редактирование: 12 Августа 2009, 20:16:18 от Alegator »

Оффлайн aleksubuntu

  • Активист
  • *
  • Сообщений: 254
    • Просмотр профиля
Re: UPS в UBUNTU.
« Ответ #134 : 15 Августа 2009, 09:19:58 »
      lowbatt = 40              
параметр lowbatt - процент зарядка аккума при котором nut начнёт выгрузку системы.
по моему этот параметр не работает. Кто нибудь проверял кроме меня?
С USB портом драйвером проблема более глубокая, так просто не решишь её без знания программирования.
« Последнее редактирование: 15 Августа 2009, 09:28:24 от aleksubuntu »
ASUS A8N-VM CSM, amd64 x2 4400, 2Gb, WD320Gb, GTX260GS, window7 x64 & kubuntu-12.10-desktop-amd64, s-1401, s2-3200ci, aspire 5745dg

 

Страница сгенерирована за 0.04 секунд. Запросов: 25.