[Nut-upsuser] nut package with Riello UPS support

Pavel Potcheptsov (EKTOS) ppo at ektos.net
Tue Jul 30 07:28:50 UTC 2013


another attempt:
# upsd
Network UPS Tools upsd 2.6.5
fopen /var/db/nut/upsd.pid: No such file or directory
listening on 127.0.0.1 port 3493
listening on ::1 port 3493
Can't connect to UPS [senpro] (riello_ser-senpro): No such file or directory
# ls -la
/var/db/nut/

total 12
drwx------   2 _ups  wheel  512 Jul 30 10:22 .
drwxr-xr-x  10 root  wheel  512 Jul 29 16:41 ..
-rw-r--r--   1 _ups  wheel    5 Jul 30 10:22 upsd.pid
# ls -la
/usr/local/bin/riello_ser

-rwxr-xr-x  1 root  bin  161978 Jul 30 09:46 /usr/local/bin/riello_ser

On Tue, Jul 30, 2013 at 10:21 AM, Pavel Potcheptsov (EKTOS)
<ppo at ektos.net>wrote:

> Here is what I did:
> # cd /root/nut/         # nut here it's checkouted
> repository
> # ./configure --with-user=_ups --with-group=_ups
> # cd drivers/
> # make riello_ser
> # chgrp bin riello_ser
> # cp riello_ser /usr/local/bin  # here I copied builder driver to folder
> where nut-package will store their files/drivers
> # pkg_add nut-2.6.5p1
> # ls -la /dev/tty00
> crw-rw----  1 _ups  _ups    8,   0 Jul 30 10:05 /dev/tty00
> # ls -la /usr/local/ups/etc/
> total 72
> drwxr-xr-x  2 root  wheel    512 Jul 30 10:02 .
> drwxr-xr-x  7 root  wheel    512 Jul 29 12:35 ..
> -rw-r--r--  1 _ups  wheel   1545 Jul 30 09:22 nut.conf
> -rw-------  1 _ups  wheel   3901 Jul 30 09:23 ups.conf
> -rw-------  1 _ups  wheel   2744 Jul 29 16:41 upsd.conf
> -rw-------  1 _ups  wheel   2130 Jul 30 09:48 upsd.users
> -rw-------  1 _ups  wheel  11904 Jul 30 09:49 upsmon.conf
> -rw-r--r--  1 _ups  wheel   3895 Jul 29 16:41 upssched.conf
> -rw-r--r--  1 _ups  wheel   1420 Jul 29 16:41 upsset.conf
> # grep -v '^#'
> nut.conf
>
> MODE=standalone
> # grep -v '^#'
> ups.conf
>
> [senpro]
>         driver = riello_ser
>         port = /dev/tty00
> # grep -v '^#' upsd.conf
> # grep -v '^#'
> upsd.users
>
>         [ups_]
>                 password  = password
>                 upsmon master
> # grep -v '^#'
> upsmon.conf
>
> MONITOR senpro at localhost 1 ups_ password master
> ..skipped..
> # upsdrvctl start
> Network UPS Tools - UPS driver controller 2.6.5
> Network UPS Tools - Riello serial driver 0.02 (2.6.5-183-ga074844)
> Warning: This is an experimental driver.
> Some features may not function correctly.
>
> Connected to UPS GPSER on /dev/tty00 with baudrate 1200
> # /etc/rc.d/upsd start
> upsd(ok)
> # /etc/rc.d/upsmon
> start
>
> upsmon(ok)
>
>
> Broadcast Message from root at gw.kh.ektos
>
>         ((not a tty)) at 9:58
> ...
>
>
> Communications with UPS senpro at localhostlost
>
>
>
>
> Broadcast Message from root at gw.kh.ektos
>
>         ((not a tty)) at 9:58
> ...
>
>
> UPS senpro at localhost is unavailable
> # ls -la /var/state/ups/
> total 12
> drwxr-xr-x  2 _ups  _ups  512 Jul 30 10:08 .
> drwxr-xr-x  3 _ups  _ups  512 Jul 30 09:53 ..
> srw-rw----  1 _ups  _ups    0 Jul 30 09:57 riello_ser-senpro
> -rw-r--r--  1 _ups  _ups    6 Jul 30 09:57 riello_ser-senpro.pid
> # upsc senpro at localhost
> Error: Driver not connected
> # ps -aux | grep ups
> _ups     15251  0.0  0.0   488   892 ??  Ss     9:57AM    0:00.83
> /usr/local/bin/riello_ser -a senpro
> _ups      5765  0.0  0.1   556  1160 ??  Ss     9:57AM    0:00.02
> /usr/local/sbin/upsd
> root     24549  0.0  0.1   632  1192 ??  Is     9:58AM    0:00.01
> /usr/local/sbin/upsmon
> _ups     21333  0.0  0.1   640  1256 ??  S      9:58AM    0:00.01
> /usr/local/sbin/upsmon
> #
> dmesg
>
> OpenBSD 5.3 (GENERIC.MP) #58: Tue Mar 12 18:43:53 MDT 2013
>     deraadt at i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> cpu0: Intel(R) Celeron(R) CPU P4500 @ 1.87GHz ("GenuineIntel" 686-class)
> 1.87 GHz
> cpu0:
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,POPCNT,LAHF,PERF,ITSC
> real mem  = 2003451904 (1910MB)
> avail mem = 1959714816 (1868MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 11/27/09, SMBIOS rev. 2.6 @ 0xeb0c0
> (24 entries)
> bios0: vendor American Megatrends Inc. version "4.6.3" date 01/06/2011
> bios0: ICP / iEi B186
> acpi0 at bios0: rev 3
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC SSDT MCFG HPET
> acpi0: wakeup devices P0P1(S3) PEGP(S4) P0P2(S3) P0P3(S3) P0P4(S3)
> P0P5(S3) PS2K(S3) PS2M(S3) BR20(S3) EUSB(S4) USB0(S3) USB1(S3) USB2(S3)
> USB3(S3) USBE(S4) USB4(S3) USB5(S3) USB6(S3) PEX0(S4) PEX1(S4) PEX2(S4)
> PEX3(S4) PEX4(S4) PEX5(S4) PEX6(S4) LAN2(S3) PEX7(S4) SLPB(S0) PWRB(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 133MHz
> cpu1 at mainbus0: apid 4 (application processor)
> cpu1: Intel(R) Celeron(R) CPU P4500 @ 1.87GHz ("GenuineIntel" 686-class)
> 1.87 GHz
> cpu1:
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,POPCNT,LAHF,PERF,ITSC
> ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins
> acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 4 (BR20)
> acpiprt2 at acpi0: bus 1 (PEX0)
> acpiprt3 at acpi0: bus -1 (PEX1)
> acpiprt4 at acpi0: bus -1 (PEX2)
> acpiprt5 at acpi0: bus -1 (PEX3)
> acpiprt6 at acpi0: bus 2 (PEX4)
> acpiprt7 at acpi0: bus 3 (PEX5)
> acpiprt8 at acpi0: bus -1 (PEX6)
> acpiprt9 at acpi0: bus -1 (PEX7)
> acpicpu0 at acpi0: C1, PSS
> acpicpu1 at acpi0: C1, PSS
> acpibtn0 at acpi0: SLPB
> acpibtn1 at acpi0: PWRB
> acpivideo0 at acpi0: GFX0
> acpivout0 at acpivideo0: DD02
> bios0: ROM list: 0xc0000/0xfa00! 0xd0000/0x1000 0xd1000/0x1000
> 0xd2000/0x1000
> ipmi at mainbus0 not configured
> cpu0: Enhanced SpeedStep 1867 MHz: speeds: 1862, 1729, 1596, 1463, 1330,
> 1197, 1064, 931 MHz
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel Core Host" rev 0x12
> vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x12
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> intagp0 at vga1
> agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
> inteldrm0 at vga1: apic 0 int 16
> drm0 at inteldrm0
> "Intel 3400 MEI" rev 0x06 at pci0 dev 22 function 0 not configured
> ehci0 at pci0 dev 26 function 0 "Intel 3400 USB" rev 0x06: apic 0 int 16
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> ppb0 at pci0 dev 28 function 0 "Intel 3400 PCIE" rev 0x06: apic 0 int 17
> pci1 at ppb0 bus 1
> ppb1 at pci0 dev 28 function 4 "Intel 3400 PCIE" rev 0x06: apic 0 int 17
> pci2 at ppb1 bus 2
> re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
> (0x2c00), apic 0 int 16, address 00:18:7d:2a:f1:1c
> rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 4
> ppb2 at pci0 dev 28 function 5 "Intel 3400 PCIE" rev 0x06: apic 0 int 16
> pci3 at ppb2 bus 3
> re1 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
> (0x2c00), apic 0 int 17, address 00:18:7d:2a:f1:1d
> rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 4
> ehci1 at pci0 dev 29 function 0 "Intel 3400 USB" rev 0x06: apic 0 int 23
> usb1 at ehci1: USB revision 2.0
> uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xa6
> pci4 at ppb3 bus 4
> pcib0 at pci0 dev 31 function 0 "Intel HM55 LPC" rev 0x06
> ahci0 at pci0 dev 31 function 2 "Intel 3400 AHCI" rev 0x06: msi, AHCI 1.3
> scsibus0 at ahci0: 32 targets
> cd0 at scsibus0 targ 4 lun 0: <Optiarc, DVD RW AD-7760H, 1.00> ATAPI
> 5/cdrom removable
> sd0 at scsibus0 targ 5 lun 0: <ATA, WDC WD800HLFS-75, 04.0> SCSI3 0/direct
> fixed naa.50014ee00231af66
> sd0: 76293MB, 512 bytes/sector, 156250000 sectors
> ichiic0 at pci0 dev 31 function 3 "Intel 3400 SMBus" rev 0x06: apic 0 int
> 18
> iic0 at ichiic0
> spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600 SO-DIMM
> isa0 at pcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: probed fifo depth: 15 bytes
> com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> com1: probed fifo depth: 15 bytes
> com2 at isa0 port 0x3e8/8 irq 5: ns16550a, 16 byte fifo
> com2: probed fifo depth: 15 bytes
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> mtrr: Pentium Pro MTRR support
> uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> rum0 at uhub2 port 3 "Ralink 802.11 bg WLAN" rev 2.00/0.01 addr 3
> rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:24:21:8b:7b:aa
> uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> vscsi0 at root
> scsibus1 at vscsi0: 256 targets
> softraid0 at root
> scsibus2 at softraid0: 256 targets
> root on sd0a (acd65066376089a0.a) swap on sd0b dump on sd0b
>
>
> On Mon, Jul 29, 2013 at 3:40 PM, Charles Lepple <clepple at gmail.com> wrote:
>
>> On Jul 29, 2013, at 8:16 AM, Pavel Potcheptsov (EKTOS) wrote:
>>
>> > I also could built the driver that I need
>> > # make riello_ser
>>
>> That should work, from the driver directory. It shouldn't depend on the
>> man pages. The master branch in Git and 2.6.5 are close enough that you
>> should be able to just copy the riello_ser driver into the directory where
>> the 2.6.5 drivers were installed.
>>
>> > but I don't know is there way to include it in 2.6.5.
>>
>> That is left as an exercise for the reader... you could collect all of
>> the patches for Riello support, and apply them to the 2.6.5 tree.
>>
>> As for asciidoc, you might need some additional dependencies. I think
>> it's actually the a2x script in the asciidoc package:
>> http://www.methods.co.nz/asciidoc/a2x.1.html#X1
>>
>> --
>> Charles Lepple
>> clepple at gmail
>>
>>
>>
>>
>
>
> --
>
> Best / С наилучшими пожеланиями
>
>
>  *Pavel Potcheptsov*
>
>    LLC EKTOS-Ukraine
>
> System administrator
>
>    1, Academika Proskury
>
> Mobile UA: +38 050 3642391
>
> Home UA: +380 572 931115
>
>    61070 Kharkiv
>
>    www.ektos.com.ua <http://www.ektos.net/>
>
> E-mail:
>
> ppo at ektos.net
>
>
>   Skype:      potcheptsov.pavel
>
>
>
> --
>
> Best / С наилучшими пожеланиями
>
>
>  *Pavel Potcheptsov*
>
>    LLC EKTOS-Ukraine
>
> System administrator
>
>    1, Academika Proskury
>
> Mobile UA: +38 050 3642391
>
> Home UA: +380 572 931115
>
>    61070 Kharkiv
>
>    www.ektos.com.ua <http://www.ektos.net/>
>
> E-mail:
>
> ppo at ektos.net
>
>
>   Skype:      potcheptsov.pavel
>



-- 

Best / С наилучшими пожеланиями


 *Pavel Potcheptsov*

   LLC EKTOS-Ukraine

System administrator

   1, Academika Proskury

Mobile UA: +38 050 3642391

Home UA: +380 572 931115

   61070 Kharkiv

   www.ektos.com.ua <http://www.ektos.net/>

E-mail:

ppo at ektos.net


  Skype:      potcheptsov.pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130730/af2a622a/attachment-0001.html>


More information about the Nut-upsuser mailing list