Автор Тема: nut-monitor и nut-server не запускаются на p7  (Прочитано 23631 раз)

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #30 : 20.01.2015 23:10:09 »
Поставил.
Не пашет:
[root@host-242 ~]# service upsd start
[root@host-242 ~]# service upsd status
failed
[root@host-242 ~]#
[root@host-242 ~]# service upsd start
[root@host-242 ~]# service upsd status
failed
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# systemctl status nut-monitor
nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled)
   Active: failed (Result: exit-code) since Сб 2015-01-17 05:26:13 MSK; 3 days ago
 Main PID: 2387 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/nut-monitor.service

янв 17 05:26:14 host-242.localdomain upsmon[2387]: Using power down flag file /etc/killpower
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Network UPS Tools upsmon 2.6.5
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Fatal error: insufficient power configured!
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Sum of power values........: 0
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Minimum value (MINSUPPLIES): 1
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Edit your upsmon.conf and change the values.
[root@host-242 ~]#
Как дальше делать?

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #31 : 20.01.2015 23:20:23 »
Fatal error: insufficient power configured!
...
Edit your upsmon.conf and change the values.
....
Как дальше делать?

А приложите свой конфиг

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #32 : 21.01.2015 11:22:36 »
А приложите свой конфиг
[root@host-242 ~]# cat /etc/nut/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:
#
        [5]
#         driver = powercom
         driver = usbhid-ups
         port = /dev/usb/hiddev0
         desc = «Powercom BNT-600AP»
#        port = auto
#         offdelay = 60
#         pollonly
#         type = BNT-other
#
#       < 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 blazer_ser
# driver on /dev/ttyS0 is:
#
# [powerpal]
#       driver = blazer_ser
#       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.
[root@host-242 ~]#

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #33 : 21.01.2015 22:12:15 »
И нафига столько строчек?
$ cat nut.cfg | grep -v ^#
        [5]
         driver = usbhid-ups
         port = /dev/usb/hiddev0
         desc = «Powercom BNT-600AP»

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #34 : 21.01.2015 22:14:55 »
А если так:
[powerpal]
  driver = powercom
  port = auto
  desc = "Powercom BNT-600AP"

PS У вас и правда прописаны угловые кавычки (ёлочки)?
« Последнее редактирование: 21.01.2015 22:17:35 от ruslandh »

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #35 : 21.01.2015 22:20:45 »
Вроде ещё хуже:
[root@host-242 ~]# upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.5
   0.000000     Starting UPS: 5
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
Using subdriver: PowerCOM HID 0.3
Can't chdir to /var/lib/upsd: Permission denied
   0.429062     Driver failed to start (exit status=1)
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# systemctl status nut-monitor
nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled)
   Active: failed (Result: exit-code) since Сб 2015-01-17 05:26:13 MSK; 4 days ago
 Main PID: 2387 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/nut-monitor.service

янв 17 05:26:14 host-242.localdomain upsmon[2387]: Using power down flag file /etc/killpower
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Network UPS Tools upsmon 2.6.5
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Fatal error: insufficient power configured!
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Sum of power values........: 0
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Minimum value (MINSUPPLIES): 1
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Edit your upsmon.conf and change the values.
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.5
   0.000000     Starting UPS: 5
Network UPS Tools - Megatec/Q1 protocol serial driver 1.55 (2.6.5)

Unable to open auto: No such file or directory

Things to try:

 - Check 'port=' in ups.conf

 - Check owner/permissions of all parts of path

Fatal error: unusable configuration
   0.010207     Driver failed to start (exit status=1)
[root@host-242 ~]# systemctl status nut-monitor
nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled)
   Active: failed (Result: exit-code) since Сб 2015-01-17 05:26:13 MSK; 4 days ago
 Main PID: 2387 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/nut-monitor.service

янв 17 05:26:14 host-242.localdomain upsmon[2387]: Using power down flag file /etc/killpower
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Network UPS Tools upsmon 2.6.5
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Fatal error: insufficient power configured!
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Sum of power values........: 0
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Minimum value (MINSUPPLIES): 1
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Edit your upsmon.conf and change the values.
[root@host-242 ~]# cat /etc/nut/ups.conf | grep -v ^#
        [5]
         driver = blazer_ser
         desc = "Powercom BNT-600AP"
         port = auto
[root@host-242 ~]#

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #36 : 21.01.2015 22:33:13 »
Цитировать
Can't chdir to /var/lib/upsd: Permission denied

ls -l  /var/lib/upsd

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #37 : 21.01.2015 22:34:26 »
Я описался, а потом исправил в имени драйвера.
« Последнее редактирование: 21.01.2015 22:37:41 от ruslandh »

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #38 : 22.01.2015 15:42:57 »
Всо равно не пашет
[root@host-242 ~]# ls -l  /var/lib/upsd
lrwxrwxrwx 1 root root 16 янв 16 14:13 /var/lib/upsd -> nut/var/lib/upsd
[root@host-242 ~]# cat /etc/nut/ups.conf | grep -v ^#
        [5]
         driver = powercom
         desc = "Powercom BNT-600AP"
         port = auto
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.5
   0.000000     Starting UPS: 5
Network UPS Tools - PowerCom protocol UPS driver 0.13 (2.6.5)

Unable to open auto: No such file or directory

Things to try:

 - Check 'port=' in ups.conf

 - Check owner/permissions of all parts of path

Fatal error: unusable configuration
   0.005560     Driver failed to start (exit status=1)
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# systemctl status nut-monitor
nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled)
   Active: failed (Result: exit-code) since Сб 2015-01-17 05:26:13 MSK; 5 days ago
 Main PID: 2387 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/nut-monitor.service

янв 17 05:26:14 host-242.localdomain upsmon[2387]: Using power down flag file /etc/killpower
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Network UPS Tools upsmon 2.6.5
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Fatal error: insufficient power configured!
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Sum of power values........: 0
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Minimum value (MINSUPPLIES): 1
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Edit your upsmon.conf and change the values.
[root@host-242 ~]#
Куда дальше порыть?

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #39 : 22.01.2015 20:46:27 »
[nutdev1]
        driver = "blazer_usb"
        port = "auto"
        vendorid = "0665"
        productid = "5161"
        product = "USB to Serial"
        serial = "20100826"
        vendor = "INNO TECH"
#       bus = "001"
у меня вот так работает. Может вам ковычки прописать?

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #40 : 22.01.2015 22:23:10 »
Может вам ковычки прописать?
Кавычки не влияют
[root@host-242 ~]# upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.5
   0.000000     Starting UPS: 5
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
Using subdriver: PowerCOM HID 0.3
Can't chdir to /var/lib/upsd: Permission denied
   0.275088     Driver failed to start (exit status=1)
[root@host-242 ~]# systemctl enable nut-monitor
[root@host-242 ~]# systemctl status nut-monitor
nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled)
   Active: failed (Result: exit-code) since Сб 2015-01-17 05:26:13 MSK; 5 days ago
 Main PID: 2387 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/nut-monitor.service

янв 17 05:26:14 host-242.localdomain upsmon[2387]: Using power down flag file /etc/killpower
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Network UPS Tools upsmon 2.6.5
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Fatal error: insufficient power configured!
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Sum of power values........: 0
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Minimum value (MINSUPPLIES): 1
янв 17 05:26:14 host-242.localdomain upsmon[2387]: Edit your upsmon.conf and change the values.
[root@host-242 ~]# cat /etc/nut/ups.conf | grep -v ^#
        [5]
          driver = "usbhid-ups"
         desc = "Powercom BNT-600AP"
         port = "auto"
[root@host-242 ~]#

а с вендорами, даже не знаю стоит пробовать, там такая каша:
[root@host-242 ~]# lsusb -v | grep -A50 0d9f:00a6
Bus 001 Device 003: ID 0d9f:00a6 Powercom Co., Ltd Black Knight PRO Uninterruptible Power Supply (HID PDC)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0d9f Powercom Co., Ltd
  idProduct          0x00a6 Black Knight PRO Uninterruptible Power Supply (HID PDC)
  bcdDevice            0.01
  iManufacturer           3 POWERCOM Co.,Ltd
  iProduct                1   UPS  BNT--600AP FW4.A6
  iSerial                 2 4A6-0000-0001 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     726
          Report Descriptor: (length is 726)
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Local ): Usage, data= [ 0x04 ] 4
                            UPS
            Item(Main  ): Collection, data= [ 0x01 ] 1
[root@host-242 ~]#
Ни в одном мануле не видел чтоб их прописывали.

А вам, зачем понадобилось вендоры и сериалы прописывать? Без них совсем не работало? Или какую-то спецфичу реализовывали?

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 246
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #41 : 22.01.2015 22:41:22 »
/var/lib/upsd: Permission denied - так вы и не показали
ls -l /var/lib/upsd:

А вам, зачем понадобилось вендоры и сериалы прописывать? Без них совсем не работало? Или какую-то спецфичу реализовывали?

Я давно это настраивал, и насколько я помню, скриптом (который шёл с УПС), а не сам.

PS А попробуйте apcupsd - он практически не требует настройки.

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #42 : 22.01.2015 23:00:19 »
/var/lib/upsd: Permission denied - так вы и не показали
ls -l /var/lib/upsd:
[root@host-242 ~]# ls -l /var/lib/upsd
lrwxrwxrwx 1 root root 16 янв 16 14:13 /var/lib/upsd -> nut/var/lib/upsd
[root@host-242 ~]#

PS А попробуйте apcupsd - он практически не требует настройки.
вроде что-то заработало! Пикнуло спикером и матюкнулось в консоле ни с того ни с сего, что связь теряется.
[root@host-242 ~]#
Broadcast message from root@host-242.localdomain (2015-01-22 22:52:45):

Warning communications lost with UPS

[root@host-242 ~]#
Подскажите как с ним поупражнятся дальше? Чтоб работоспособность проверить? Я как понял nut-монитор не для него? Управлять только через конфиг?

P.S. свой адрес в конфиге я прописал /dev/usb/hiddev0
« Последнее редактирование: 22.01.2015 23:02:54 от МИНЗДРАВ »

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #43 : 22.01.2015 23:07:40 »
А, нашёл gapcmon его реально русским сделать? Не пойму заработал он.

Спасибо Сэнсэй!

Оффлайн МИНЗДРАВ

  • Странник_
  • *
  • Сообщений: 3 045
  • ALWK8 х64 Branch sysd & server-light_1.9.3sysV noX
    • http://yx-kak.ru/linux.htm
Re: nut-monitor и nut-server не запускаются на p7
« Ответ #44 : 22.01.2015 23:13:48 »
нет. не пахает
2015-01-22 23:03:14 +0300  apcupsd error shutdown completed
and that your cable specification on the UPSCABLE directive is correct.
Please make sure the port specified on the DEVICE directive is correct,
PANIC! Cannot communicate with UPS via serial port.
Что-то нужно подправить. Подскажите что?