Pavel Potcheptsov (EKTOS)
2013-Jul-30 14:39 UTC
[Nut-upsuser] nut package with Riello UPS support
# reboot Connection to 192.168.5.81 closed by remote host. Connection to 192.168.5.81 closed. ppo at admin:/tmp$ ssh root at 192.168.5.81 root at 192.168.5.81's password: Last login: Tue Jul 30 14:10:49 2013 from pc-ppo.kh.ektos OpenBSD 5.3 (GENERIC.MP) #58: Tue Mar 12 18:43:53 MDT 2013 # ps -aux | grep ups root 2254 0.0 0.0 324 700 p0 S+ 5:29PM 0:00.00 grep ups # ps -aux | grep ups | grep -v grep # ps -aux | grep riel | grep -v grep # /usr/local/bin/ups upsc upscmd upscode2 upsdrvctl upslog upsrw upssched-cmd # /usr/local/bin/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 # ps -aux | grep riel | grep -v grep _ups 15188 0.0 0.0 548 860 ?? Ss 5:30PM 0:00.69 /usr/local/bin/riello_ser -a senpro # ls -la /var/state/ups/ total 12 drwxr-xr-x 2 _ups _ups 512 Jul 30 17:32 . drwxr-xr-x 3 _ups _ups 512 Jul 30 09:53 .. srw-rw---- 1 _ups _ups 0 Jul 30 17:30 riello_ser-senpro -rw-r--r-- 1 _ups _ups 6 Jul 30 17:30 riello_ser-senpro.pid # /usr/local/sbin/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 Can't connect to UPS [senpro] (riello_ser-senpro): No such file or directory Is this a trouble? Driver use path /var/state/ups/ but upsd use path /var/db/nut/upsd.pid On Tue, Jul 30, 2013 at 4:37 PM, Charles Lepple <clepple at gmail.com> wrote:> On Jul 30, 2013, at 3:28 AM, Pavel Potcheptsov (EKTOS) wrote: > > > 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 > > We need to determine whether upsd and the driver are using the same path > for the socket. > > Is the driver still running when you get the "no such file or directory" > message? The socket should be in /var/state/ups. > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130730/3f2612de/attachment.html>
Pavel Potcheptsov (EKTOS)
2013-Jul-30 14:53 UTC
[Nut-upsuser] nut package with Riello UPS support
# ls -la ../../state/ups/ total 12 drwxr-xr-x 2 _ups _ups 512 Jul 30 17:32 . drwxr-xr-x 3 _ups _ups 512 Jul 30 09:53 .. srw-rw---- 1 _ups _ups 0 Jul 30 17:30 riello_ser-senpro -rw-r--r-- 1 _ups _ups 6 Jul 30 17:30 riello_ser-senpro.pid # /usr/local/bin/upsdrvctl stop Network UPS Tools - UPS driver controller 2.6.5 Can't open /var/db/nut/riello_ser-tty00.pid: No such file or directory # pwd /var/db/nut # ln -s /var/state/ups/riello_ser-senpro.pid riello_ser-tty00.pid # /usr/local/bin/upsdrvctl stop Network UPS Tools - UPS driver controller 2.6.5 # ls -la ../../state/ups/ total 8 drwxr-xr-x 2 _ups _ups 512 Jul 30 17:45 . drwxr-xr-x 3 _ups _ups 512 Jul 30 09:53 .. # /usr/local/bin/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 # ls -la ../../state/ups/ total 12 drwxr-xr-x 2 _ups _ups 512 Jul 30 17:46 . drwxr-xr-x 3 _ups _ups 512 Jul 30 09:53 .. srw-rw---- 1 _ups _ups 0 Jul 30 17:46 riello_ser-senpro -rw-r--r-- 1 _ups _ups 6 Jul 30 17:46 riello_ser-senpro.pid # ls riello_ser-tty00.pid # /usr/local/sbin/upsd -D -u _ups -4 Network UPS Tools upsd 2.6.5 0.000000 fopen /var/db/nut/upsd.pid: No such file or directory 0.000634 listening on 127.0.0.1 port 3493 0.001259 Can't connect to UPS [senpro] (riello_ser-senpro): No such file or directory ^C 33.877079 mainloop: Interrupted system call 33.877125 Signal 2: exiting I believe that some little thing is wrong, but which? On Tue, Jul 30, 2013 at 5:39 PM, Pavel Potcheptsov (EKTOS) <ppo at ektos.net>wrote:> # reboot > Connection to 192.168.5.81 closed by remote host. > Connection to 192.168.5.81 closed. > ppo at admin:/tmp$ ssh root at 192.168.5.81 > root at 192.168.5.81's password: > Last login: Tue Jul 30 14:10:49 2013 from pc-ppo.kh.ektos > > OpenBSD 5.3 (GENERIC.MP) #58: Tue Mar 12 18:43:53 MDT 2013 > > # ps -aux | grep > ups > > root 2254 0.0 0.0 324 700 p0 S+ 5:29PM 0:00.00 grep ups > # ps -aux | grep ups | grep -v grep > # ps -aux | grep riel | grep -v grep > # /usr/local/bin/ups > upsc upscmd upscode2 upsdrvctl upslog > upsrw upssched-cmd > # /usr/local/bin/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 > # ps -aux | grep riel | grep -v grep > _ups 15188 0.0 0.0 548 860 ?? Ss 5:30PM 0:00.69 > /usr/local/bin/riello_ser -a senpro > > # ls -la > /var/state/ups/ > > total 12 > drwxr-xr-x 2 _ups _ups 512 Jul 30 17:32 . > > drwxr-xr-x 3 _ups _ups 512 Jul 30 09:53 .. > srw-rw---- 1 _ups _ups 0 Jul 30 17:30 riello_ser-senpro > -rw-r--r-- 1 _ups _ups 6 Jul 30 17:30 riello_ser-senpro.pid > # /usr/local/sbin/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 > Can't connect to UPS [senpro] (riello_ser-senpro): No such file or > directory > > Is this a trouble? Driver use path /var/state/ups/ but upsd use path > /var/db/nut/upsd.pid > > > > On Tue, Jul 30, 2013 at 4:37 PM, Charles Lepple <clepple at gmail.com> wrote: > >> On Jul 30, 2013, at 3:28 AM, Pavel Potcheptsov (EKTOS) wrote: >> >> > 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 >> >> We need to determine whether upsd and the driver are using the same path >> for the socket. >> >> Is the driver still running when you get the "no such file or directory" >> message? The socket should be in /var/state/ups. >> >> -- >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130730/927f91ef/attachment-0001.html>
On Jul 30, 2013, at 10:39 AM, Pavel Potcheptsov (EKTOS) wrote:> Is this a trouble? Driver use path /var/state/ups/ but upsd use path /var/db/nut/upsd.pidYes, the driver and upsd need to agree on the path to the socket. From the FreeBSD ports tree: /usr/ports/sysutils/nut/Makefile: STATEDIR?= /var/db/nut [...] CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ --program-transform-name="" \ --localstatedir=${STATEDIR} \ --datadir=${PREFIX}/etc/nut \ --with-drvpath=${PREFIX}/libexec/nut \ --with-statepath=${STATEDIR} \ --with-altpidpath=${STATEDIR} \ --with-pidpath=${STATEDIR} \ --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig \ --with-user=${NUT_USER} \ --with-group=${NUT_GROUP} \ --with-dev I think you need to re-run ./configure in the source tree with the driver, using the arguments above. Then 'cd drivers; make clean; make riello_ser' and install the new copy of the driver. -- Charles Lepple clepple at gmail
Pavel Potcheptsov (EKTOS)
2013-Jul-31 07:36 UTC
[Nut-upsuser] nut package with Riello UPS support
Thank you very much!! I have tried configure downloaded source with # ./configure --with-user=_ups --with-group=_ups --with-statepath=/var/db/nut/ and then build driver and copy again. but this doesn't help (driver pid still in the /var/state/ups). Maybe I must add more arguments to change driver's pid location, but I did next, I changed this argument in openbsd ports: # pkg_delete nut # cd /usr/ports/sysutils/nut/ edit Makefile and change line --with-statepath=/var/db/nut to --with-statepath=/var/state/ups # make install # /etc/rc.d/upsd start upsd(ok) # /etc/rc.d/upsmon start upsmon(ok) # upsc senpro at localhost battery.capacity: 75 battery.charge: 100 battery.runtime: 26280 battery.voltage: 40.8 battery.voltage.nominal: 36 device.mfr: RPS S.p.a. device.model: UOD1-XL device.serial: device.type: ups driver.name: riello_ser driver.parameter.pollinterval: 2 driver.parameter.port: /dev/tty00 driver.version: 2.6.5-183-ga074844 driver.version.internal: 0.02 input.bypass.frequency: 50.00 input.bypass.voltage: 216 input.frequency: 50.00 input.voltage: 216 output.frequency: 50.00 output.frequency.nominal: 50.0 output.power.percent: 28 output.voltage: 231 output.voltage.nominal: 230 ups.firmware: SWM035-01-07 ups.load: 28 ups.mfr: RPS S.p.a. ups.model: UOD1-XL ups.power.nominal: 1000 ups.realpower.nominal: 800 ups.serial: ups.status: OL CHRG ups.temperature: 34 # tail /var/log/daemon Jul 31 09:31:48 gw upsd[7687]: mainloop: Interrupted system call Jul 31 09:31:48 gw upsd[7687]: Signal 15: exiting Jul 31 09:31:57 gw riello_ser[148]: Signal 15: exiting Jul 31 10:16:02 gw riello_ser[12770]: Startup successful Jul 31 10:16:02 gw upsd[31799]: listening on 127.0.0.1 port 3493 Jul 31 10:16:02 gw upsd[31799]: /var/state/ups is world readable Jul 31 10:16:02 gw upsd[31799]: Connected to UPS [senpro]: riello_ser-senpro Jul 31 10:16:02 gw upsd[1994]: Startup successful Jul 31 10:16:39 gw upsmon[32204]: Startup successful Jul 31 10:16:39 gw upsd[1994]: User ups_ at 127.0.0.1 logged into UPS [senpro] Does it looks good? Another question what does riello experimental driver warning mean? Does it affect shutdown procedure? Should I install riello driver on Slave computers, which powered from same UPS or just setup their as usual slave (just upsmon.conf)? On Tue, Jul 30, 2013 at 6:03 PM, Charles Lepple <clepple at gmail.com> wrote:> On Jul 30, 2013, at 10:39 AM, Pavel Potcheptsov (EKTOS) wrote: > > > Is this a trouble? Driver use path /var/state/ups/ but upsd use path > /var/db/nut/upsd.pid > > Yes, the driver and upsd need to agree on the path to the socket. > > From the FreeBSD ports tree: > > /usr/ports/sysutils/nut/Makefile: > > STATEDIR?= /var/db/nut > [...] > CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ > --program-transform-name="" \ > --localstatedir=${STATEDIR} \ > --datadir=${PREFIX}/etc/nut \ > --with-drvpath=${PREFIX}/libexec/nut \ > --with-statepath=${STATEDIR} \ > --with-altpidpath=${STATEDIR} \ > --with-pidpath=${STATEDIR} \ > --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig \ > --with-user=${NUT_USER} \ > --with-group=${NUT_GROUP} \ > --with-dev > > I think you need to re-run ./configure in the source tree with the driver, > using the arguments above. Then 'cd drivers; make clean; make riello_ser' > and install the new copy of the driver. > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130731/82e2b9ac/attachment-0001.html>