apcaccess readings not up-to-date

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

apcaccess readings not up-to-date

Sandro Bordacchini
Hello everyone.

I have a problem on my small server room, i hope someone here can help me to figure out what's my problem.

I have a server rack powered by two SMT1500RMI2U, both upgraded to FW 09.3.
I purchased a bananapi platform and installed a debian stretch (armv7l arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
After enabling modbus protocol on the UPSes, I connected them to the bananapi platform with two usb cables.
I work out a systemd configuration to have two distinct apcupsd instances (with different nisport) running.
Then integrated that on a zabbix agent (i can give you more details on it) but basically i got apcaccess running once every minute for each apcupsd instance.

All was working smoothly, but I soon realized that the readings were good only for a short period (variable from tens of minutes to some hours), then they get constant.
I need to restart apcupsd to have again actual readings.

I thought this was due the two instances of apcupsd running on the same machine, so i removed one, disconnected one apcupsd, rebooted the device.
But the problem is still there. Maybe, but that could be only a coincidence, the period was longer than before.

This https://ibb.co/bxy2DQ is the zabbix graph, you can see that readings become constant just before 18:50.

And this is the apcaccess output:

root@banana:~# date && apcaccess -h localhost:3551
Fri Jun 23 10:33:49 CEST 2017
APC      : 001,039,0910
DATE     : 2017-06-22 18:48:54 +0200
HOSTNAME : banana
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : APCUPS
CABLE    : USB Cable
DRIVER   : MODBUS UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2017-06-22 14:06:35 +0200
MODEL    : Smart-UPS 1500
STATUS   : BOOST ONLINE
LINEV    : 205.9 Volts
LOADPCT  : 26.0 Percent
LOADAPNT : 23.4 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 51.0 Minutes
MBATTCHG : -1 Percent
MINTIMEL : -1 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 237.6 Volts
DWAKE    : 0 Seconds
DSHUTD   : 0 Seconds
ITEMP    : 27.4 C
BATTV    : 27.1 Volts
LINEFREQ : 50.0 Hz
OUTCURNT : 1.50 Amps
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : OK
STATFLAG : 0x0500000C
MANDATE  : 2013-01-10
SERIALNO : AS1302223920
BATTDATE : 2016-12-15
NOMOUTV  : 230 Volts
NOMPOWER : 1000 Watts
NOMAPNT  : 1500 VA
FIRMWARE : UPS 09.3 / 00.4
END APC  : 2017-06-23 10:33:49 +0200

You can see the DATE field is exactly the time where i stopped to have good readings.
Here https://pastebin.com/Xf6bLiZF you can read the apcupsd configuration file.

Can anyone help me with this?

Thanks a lot.
Sandro.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Trevor Roydhouse
Sandro Bordacchini wrote on 23/06/2017 19:31:
> I purchased a bananapi platform and installed a debian stretch (armv7l
> arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
> After enabling modbus protocol on the UPSes, I connected them to the
> bananapi platform with two usb cables.

A quick Google suggests that the BananaPI has significant USB issues
dating from 2014 through 2017. As noone else has reported this issue,
I'd suggest it's a BananaPI issue.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Ted Mittelstaedt-5
In reply to this post by Sandro Bordacchini
Your USB cables are probably poor quality.  These devices have problems with poor quality USB cables.


You also need to re-think this USB business.  The bannana pi has 2 serial ports (according to the docs, I

haven't used one myself) and you should use those to connect to the UPSes instead of USB.


Ted

On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
Hello everyone.

I have a problem on my small server room, i hope someone here can help me to figure out what's my problem.

I have a server rack powered by two SMT1500RMI2U, both upgraded to FW 09.3.
I purchased a bananapi platform and installed a debian stretch (armv7l arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
After enabling modbus protocol on the UPSes, I connected them to the bananapi platform with two usb cables.
I work out a systemd configuration to have two distinct apcupsd instances (with different nisport) running.
Then integrated that on a zabbix agent (i can give you more details on it) but basically i got apcaccess running once every minute for each apcupsd instance.

All was working smoothly, but I soon realized that the readings were good only for a short period (variable from tens of minutes to some hours), then they get constant.
I need to restart apcupsd to have again actual readings.

I thought this was due the two instances of apcupsd running on the same machine, so i removed one, disconnected one apcupsd, rebooted the device.
But the problem is still there. Maybe, but that could be only a coincidence, the period was longer than before.

This https://ibb.co/bxy2DQ is the zabbix graph, you can see that readings become constant just before 18:50.

And this is the apcaccess output:

root@banana:~# date && apcaccess -h localhost:3551
Fri Jun 23 10:33:49 CEST 2017
APC      : 001,039,0910
DATE     : 2017-06-22 18:48:54 +0200
HOSTNAME : banana
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : APCUPS
CABLE    : USB Cable
DRIVER   : MODBUS UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2017-06-22 14:06:35 +0200
MODEL    : Smart-UPS 1500
STATUS   : BOOST ONLINE
LINEV    : 205.9 Volts
LOADPCT  : 26.0 Percent
LOADAPNT : 23.4 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 51.0 Minutes
MBATTCHG : -1 Percent
MINTIMEL : -1 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 237.6 Volts
DWAKE    : 0 Seconds
DSHUTD   : 0 Seconds
ITEMP    : 27.4 C
BATTV    : 27.1 Volts
LINEFREQ : 50.0 Hz
OUTCURNT : 1.50 Amps
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : OK
STATFLAG : 0x0500000C
MANDATE  : 2013-01-10
SERIALNO : AS1302223920
BATTDATE : 2016-12-15
NOMOUTV  : 230 Volts
NOMPOWER : 1000 Watts
NOMAPNT  : 1500 VA
FIRMWARE : UPS 09.3 / 00.4
END APC  : 2017-06-23 10:33:49 +0200

You can see the DATE field is exactly the time where i stopped to have good readings.
Here https://pastebin.com/Xf6bLiZF you can read the apcupsd configuration file.

Can anyone help me with this?

Thanks a lot.
Sandro.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Sandro Bordacchini
In reply to this post by Sandro Bordacchini
Thanks Trevor and Ted.

I am using the USB cables supplied with the UPSes.

Anyway, do you suggest me to figure out how to setup two serial ports on the Banana (that's not a lot of documentation around) or invest some money to buy a Raspberry and stick with USB cables?

Any other hint would be appreciated.

Thanks.


2017-06-25 14:02 GMT+02:00 <[hidden email]>:
Send Apcupsd-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/apcupsd-users
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Apcupsd-users digest..."


Today's Topics:

   1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)


----------------------------------------------------------------------

Message: 1
Date: Sat, 24 Jun 2017 23:40:<a href="tel:02%20-0700" value="+39020700">02 -0700
From: Ted Mittelstaedt <[hidden email]>
To: [hidden email]
Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Your USB cables are probably poor quality.  These devices have problems
with poor quality USB cables.


You also need to re-think this USB business.  The bannana pi has 2
serial ports (according to the docs, I

haven't used one myself) and you should use those to connect to the
UPSes instead of USB.


Ted

On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
> Hello everyone.
>
> I have a problem on my small server room, i hope someone here can help
> me to figure out what's my problem.
>
> I have a server rack powered by two SMT1500RMI2U, both upgraded to FW
> 09.3.
> I purchased a bananapi platform and installed a debian stretch (armv7l
> arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
> After enabling modbus protocol on the UPSes, I connected them to the
> bananapi platform with two usb cables.
> I work out a systemd configuration to have two distinct apcupsd
> instances (with different nisport) running.
> Then integrated that on a zabbix agent (i can give you more details on
> it) but basically i got apcaccess running once every minute for each
> apcupsd instance.
>
> All was working smoothly, but I soon realized that the readings were
> good only for a short period (variable from tens of minutes to some
> hours), then they get constant.
> I need to restart apcupsd to have again actual readings.
>
> I thought this was due the two instances of apcupsd running on the
> same machine, so i removed one, disconnected one apcupsd, rebooted the
> device.
> But the problem is still there. Maybe, but that could be only a
> coincidence, the period was longer than before.
>
> This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
> readings become constant just before 18:50.
>
> And this is the apcaccess output:
>
> root@banana:~# date && apcaccess -h localhost:3551
> Fri Jun 23 10:33:49 CEST 2017
> APC      : 001,039,0910
> DATE     : 2017-06-22 18:48:54 +0200
> HOSTNAME : banana
> VERSION  : 3.14.14 (31 May 2016) debian
> UPSNAME  : APCUPS
> CABLE    : USB Cable
> DRIVER   : MODBUS UPS Driver
> UPSMODE  : Stand Alone
> STARTTIME: 2017-06-22 14:06:35 +0200
> MODEL    : Smart-UPS 1500
> STATUS   : BOOST ONLINE
> LINEV    : 205.9 Volts
> LOADPCT  : 26.0 Percent
> LOADAPNT : 23.4 Percent
> BCHARGE  : 100.0 Percent
> TIMELEFT : 51.0 Minutes
> MBATTCHG : -1 Percent
> MINTIMEL : -1 Minutes
> MAXTIME  : 0 Seconds
> OUTPUTV  : 237.6 Volts
> DWAKE    : 0 Seconds
> DSHUTD   : 0 Seconds
> ITEMP    : 27.4 C
> BATTV    : 27.1 Volts
> LINEFREQ : 50.0 Hz
> OUTCURNT : 1.50 Amps
> NUMXFERS : 0
> TONBATT  : 0 Seconds
> CUMONBATT: 0 Seconds
> XOFFBATT : N/A
> SELFTEST : OK
> STATFLAG : 0x0500000C
> MANDATE  : 2013-01-10
> SERIALNO : AS1302223920
> BATTDATE : 2016-12-15
> NOMOUTV  : 230 Volts
> NOMPOWER : 1000 Watts
> NOMAPNT  : 1500 VA
> FIRMWARE : UPS 09.3 / 00.4
> END APC  : 2017-06-23 10:33:49 +0200
>
> You can see the DATE field is exactly the time where i stopped to have
> good readings.
> Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
> configuration file.
>
> Can anyone help me with this?
>
> Thanks a lot.
> Sandro.
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------

Subject: Digest Footer

_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------

End of Apcupsd-users Digest, Vol 134, Issue 5
*********************************************


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

William P.N. Smith
Raspberry Pi works flawlessly with USB cables, I’ve got several of them talking to APC UPSen

On Jun 29, 2017, at 9:13 AM, Sandro Bordacchini <[hidden email]> wrote:

Thanks Trevor and Ted.

I am using the USB cables supplied with the UPSes.

Anyway, do you suggest me to figure out how to setup two serial ports on the Banana (that's not a lot of documentation around) or invest some money to buy a Raspberry and stick with USB cables?

Any other hint would be appreciated.

Thanks.


2017-06-25 14:02 GMT+02:00 <[hidden email]>:
Send Apcupsd-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/apcupsd-users
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Apcupsd-users digest..."


Today's Topics:

   1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)


----------------------------------------------------------------------

Message: 1
Date: Sat, 24 Jun 2017 23:40:<a href="tel:02%20-0700" value="+39020700" class="">02 -0700
From: Ted Mittelstaedt <[hidden email]>
To: [hidden email]
Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Your USB cables are probably poor quality.  These devices have problems
with poor quality USB cables.


You also need to re-think this USB business.  The bannana pi has 2
serial ports (according to the docs, I

haven't used one myself) and you should use those to connect to the
UPSes instead of USB.


Ted

On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
> Hello everyone.
>
> I have a problem on my small server room, i hope someone here can help
> me to figure out what's my problem.
>
> I have a server rack powered by two SMT1500RMI2U, both upgraded to FW
> 09.3.
> I purchased a bananapi platform and installed a debian stretch (armv7l
> arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
> After enabling modbus protocol on the UPSes, I connected them to the
> bananapi platform with two usb cables.
> I work out a systemd configuration to have two distinct apcupsd
> instances (with different nisport) running.
> Then integrated that on a zabbix agent (i can give you more details on
> it) but basically i got apcaccess running once every minute for each
> apcupsd instance.
>
> All was working smoothly, but I soon realized that the readings were
> good only for a short period (variable from tens of minutes to some
> hours), then they get constant.
> I need to restart apcupsd to have again actual readings.
>
> I thought this was due the two instances of apcupsd running on the
> same machine, so i removed one, disconnected one apcupsd, rebooted the
> device.
> But the problem is still there. Maybe, but that could be only a
> coincidence, the period was longer than before.
>
> This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
> readings become constant just before 18:50.
>
> And this is the apcaccess output:
>
> root@banana:~# date && apcaccess -h localhost:3551
> Fri Jun 23 10:33:49 CEST 2017
> APC      : 001,039,0910
> DATE     : 2017-06-22 18:48:54 +0200
> HOSTNAME : banana
> VERSION  : 3.14.14 (31 May 2016) debian
> UPSNAME  : APCUPS
> CABLE    : USB Cable
> DRIVER   : MODBUS UPS Driver
> UPSMODE  : Stand Alone
> STARTTIME: 2017-06-22 14:06:35 +0200
> MODEL    : Smart-UPS 1500
> STATUS   : BOOST ONLINE
> LINEV    : 205.9 Volts
> LOADPCT  : 26.0 Percent
> LOADAPNT : 23.4 Percent
> BCHARGE  : 100.0 Percent
> TIMELEFT : 51.0 Minutes
> MBATTCHG : -1 Percent
> MINTIMEL : -1 Minutes
> MAXTIME  : 0 Seconds
> OUTPUTV  : 237.6 Volts
> DWAKE    : 0 Seconds
> DSHUTD   : 0 Seconds
> ITEMP    : 27.4 C
> BATTV    : 27.1 Volts
> LINEFREQ : 50.0 Hz
> OUTCURNT : 1.50 Amps
> NUMXFERS : 0
> TONBATT  : 0 Seconds
> CUMONBATT: 0 Seconds
> XOFFBATT : N/A
> SELFTEST : OK
> STATFLAG : 0x0500000C
> MANDATE  : 2013-01-10
> SERIALNO : AS1302223920
> BATTDATE : 2016-12-15
> NOMOUTV  : 230 Volts
> NOMPOWER : 1000 Watts
> NOMAPNT  : 1500 VA
> FIRMWARE : UPS 09.3 / 00.4
> END APC  : 2017-06-23 10:33:49 +0200
>
> You can see the DATE field is exactly the time where i stopped to have
> good readings.
> Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
> configuration file.
>
> Can anyone help me with this?
>
> Thanks a lot.
> Sandro.
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------

Subject: Digest Footer

_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------

End of Apcupsd-users Digest, Vol 134, Issue 5
*********************************************

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Ted Mittelstaedt-5
In reply to this post by Sandro Bordacchini
From:

http://linux-sunxi.org/LeMaker_Banana_Pi

"...The Raspberry's "original" serial port on GPIO 14 and 15 (CON3, pins
8 and 10 - at MMIO 0x1c28c00) can usually be accessed as /dev/ttyS2 on
the Banana Pi. J12 also provides another serial port on pins 4 (RXD) and
6 (TXD) at MMIO 0x1c29c00, which should map to /dev/ttyS3.."

You haven't said WHY you are wanting to use either a rasbperry or
bananna pi, but in my world, people hand me used PCs for free that run
Linux just fine - so I have never felt the need to invest money on
hardware to run apcupsd...

Ted

On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:

> Thanks Trevor and Ted.
>
> I am using the USB cables supplied with the UPSes.
>
> Anyway, do you suggest me to figure out how to setup two serial ports on
> the Banana (that's not a lot of documentation around) or invest some
> money to buy a Raspberry and stick with USB cables?
>
> Any other hint would be appreciated.
>
> Thanks.
>
>
> 2017-06-25 14:02 GMT+02:00 <[hidden email]
> <mailto:[hidden email]>>:
>
>     Send Apcupsd-users mailing list submissions to
>     [hidden email]
>     <mailto:[hidden email]>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>     <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>     or, via email, send a message with subject or body 'help' to
>     [hidden email]
>     <mailto:[hidden email]>
>
>     You can reach the person managing the list at
>     [hidden email]
>     <mailto:[hidden email]>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of Apcupsd-users digest..."
>
>
>     Today's Topics:
>
>         1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Sat, 24 Jun 2017 23:40:02 -0700 <tel:02%20-0700>
>     From: Ted Mittelstaedt <[hidden email]
>     <mailto:[hidden email]>>
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
>     Message-ID: <[hidden email]
>     <mailto:[hidden email]>>
>     Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>     Your USB cables are probably poor quality.  These devices have problems
>     with poor quality USB cables.
>
>
>     You also need to re-think this USB business.  The bannana pi has 2
>     serial ports (according to the docs, I
>
>     haven't used one myself) and you should use those to connect to the
>     UPSes instead of USB.
>
>
>     Ted
>
>     On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
>      > Hello everyone.
>      >
>      > I have a problem on my small server room, i hope someone here can
>     help
>      > me to figure out what's my problem.
>      >
>      > I have a server rack powered by two SMT1500RMI2U, both upgraded to FW
>      > 09.3.
>      > I purchased a bananapi platform and installed a debian stretch
>     (armv7l
>      > arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
>      > After enabling modbus protocol on the UPSes, I connected them to the
>      > bananapi platform with two usb cables.
>      > I work out a systemd configuration to have two distinct apcupsd
>      > instances (with different nisport) running.
>      > Then integrated that on a zabbix agent (i can give you more
>     details on
>      > it) but basically i got apcaccess running once every minute for each
>      > apcupsd instance.
>      >
>      > All was working smoothly, but I soon realized that the readings were
>      > good only for a short period (variable from tens of minutes to some
>      > hours), then they get constant.
>      > I need to restart apcupsd to have again actual readings.
>      >
>      > I thought this was due the two instances of apcupsd running on the
>      > same machine, so i removed one, disconnected one apcupsd,
>     rebooted the
>      > device.
>      > But the problem is still there. Maybe, but that could be only a
>      > coincidence, the period was longer than before.
>      >
>      > This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
>      > readings become constant just before 18:50.
>      >
>      > And this is the apcaccess output:
>      >
>      > root@banana:~# date && apcaccess -h localhost:3551
>      > Fri Jun 23 10:33:49 CEST 2017
>      > APC      : 001,039,0910
>      > DATE     : 2017-06-22 18:48:54 +0200
>      > HOSTNAME : banana
>      > VERSION  : 3.14.14 (31 May 2016) debian
>      > UPSNAME  : APCUPS
>      > CABLE    : USB Cable
>      > DRIVER   : MODBUS UPS Driver
>      > UPSMODE  : Stand Alone
>      > STARTTIME: 2017-06-22 14:06:35 +0200
>      > MODEL    : Smart-UPS 1500
>      > STATUS   : BOOST ONLINE
>      > LINEV    : 205.9 Volts
>      > LOADPCT  : 26.0 Percent
>      > LOADAPNT : 23.4 Percent
>      > BCHARGE  : 100.0 Percent
>      > TIMELEFT : 51.0 Minutes
>      > MBATTCHG : -1 Percent
>      > MINTIMEL : -1 Minutes
>      > MAXTIME  : 0 Seconds
>      > OUTPUTV  : 237.6 Volts
>      > DWAKE    : 0 Seconds
>      > DSHUTD   : 0 Seconds
>      > ITEMP    : 27.4 C
>      > BATTV    : 27.1 Volts
>      > LINEFREQ : 50.0 Hz
>      > OUTCURNT : 1.50 Amps
>      > NUMXFERS : 0
>      > TONBATT  : 0 Seconds
>      > CUMONBATT: 0 Seconds
>      > XOFFBATT : N/A
>      > SELFTEST : OK
>      > STATFLAG : 0x0500000C
>      > MANDATE  : 2013-01-10
>      > SERIALNO : AS1302223920
>      > BATTDATE : 2016-12-15
>      > NOMOUTV  : 230 Volts
>      > NOMPOWER : 1000 Watts
>      > NOMAPNT  : 1500 VA
>      > FIRMWARE : UPS 09.3 / 00.4
>      > END APC  : 2017-06-23 10:33:49 +0200
>      >
>      > You can see the DATE field is exactly the time where i stopped to
>     have
>      > good readings.
>      > Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
>      > configuration file.
>      >
>      > Can anyone help me with this?
>      >
>      > Thanks a lot.
>      > Sandro.
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Check out the vibrant tech community on one of the world's most
>      > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>      >
>      >
>      > _______________________________________________
>      > Apcupsd-users mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      > https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>     <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>
>     ------------------------------
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>     ------------------------------
>
>     Subject: Digest Footer
>
>     _______________________________________________
>     Apcupsd-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>     <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>     ------------------------------
>
>     End of Apcupsd-users Digest, Vol 134, Issue 5
>     *********************************************
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Pavel Boček
It's maybe because this device consumes about 1/10 of the power draw of any idling ordinary PC you may get for free. Running a PC 24/7 doing nothing else than being a UPS management server is kinda…strange?

--
S uctivým pozdravem/best regards,

Pavel Boček
Jabber: [hidden email]
+420 739 190 151
http://www.hwworld.cz (kondenzátory, akumulátory, baterie aj./capacitors and more)
http://www.hardwareinsights.com (power supply reviews and more)


From:

http://linux-sunxi.org/LeMaker_Banana_Pi

"...The Raspberry's "original" serial port on GPIO 14 and 15 (CON3, pins
8 and 10 - at MMIO 0x1c28c00) can usually be accessed as /dev/ttyS2 on
the Banana Pi. J12 also provides another serial port on pins 4 (RXD) and
6 (TXD) at MMIO 0x1c29c00, which should map to /dev/ttyS3.."

You haven't said WHY you are wanting to use either a rasbperry or
bananna pi, but in my world, people hand me used PCs for free that run
Linux just fine - so I have never felt the need to invest money on
hardware to run apcupsd...

Ted

On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:

> Thanks Trevor and Ted.
>
> I am using the USB cables supplied with the UPSes.
>
> Anyway, do you suggest me to figure out how to setup two serial ports on
> the Banana (that's not a lot of documentation around) or invest some
> money to buy a Raspberry and stick with USB cables?
>
> Any other hint would be appreciated.
>
> Thanks.
>
>
> 2017-06-25 14:02 GMT+02:00 <[hidden email]
> <mailto:[hidden email]>>:
>
> Send Apcupsd-users mailing list submissions to
> [hidden email]
> <mailto:[hidden email]>
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
> or, via email, send a message with subject or body 'help' to
> [hidden email]
> <mailto:[hidden email]>
>
> You can reach the person managing the list at
> [hidden email]
> <mailto:[hidden email]>
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Apcupsd-users digest..."
>
>
> Today's Topics:
>
> 1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 24 Jun 2017 23:40:02 -0700 <tel:02%20-0700>
> From: Ted Mittelstaedt <[hidden email]
> <mailto:[hidden email]>>
> To: [hidden email]
> <mailto:[hidden email]>
> Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
> Message-ID: <[hidden email]
> <mailto:[hidden email]>>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Your USB cables are probably poor quality. These devices have problems
> with poor quality USB cables.
>
>
> You also need to re-think this USB business. The bannana pi has 2
> serial ports (according to the docs, I
>
> haven't used one myself) and you should use those to connect to the
> UPSes instead of USB.
>
>
> Ted
>
> On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
> > Hello everyone.
> >
> > I have a problem on my small server room, i hope someone here can
> help
> > me to figure out what's my problem.
> >
> > I have a server rack powered by two SMT1500RMI2U, both upgraded to FW
> > 09.3.
> > I purchased a bananapi platform and installed a debian stretch
> (armv7l
> > arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
> > After enabling modbus protocol on the UPSes, I connected them to the
> > bananapi platform with two usb cables.
> > I work out a systemd configuration to have two distinct apcupsd
> > instances (with different nisport) running.
> > Then integrated that on a zabbix agent (i can give you more
> details on
> > it) but basically i got apcaccess running once every minute for each
> > apcupsd instance.
> >
> > All was working smoothly, but I soon realized that the readings were
> > good only for a short period (variable from tens of minutes to some
> > hours), then they get constant.
> > I need to restart apcupsd to have again actual readings.
> >
> > I thought this was due the two instances of apcupsd running on the
> > same machine, so i removed one, disconnected one apcupsd,
> rebooted the
> > device.
> > But the problem is still there. Maybe, but that could be only a
> > coincidence, the period was longer than before.
> >
> > This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
> > readings become constant just before 18:50.
> >
> > And this is the apcaccess output:
> >
> > root@banana:~# date && apcaccess -h localhost:3551
> > Fri Jun 23 10:33:49 CEST 2017
> > APC : 001,039,0910
> > DATE : 2017-06-22 18:48:54 +0200
> > HOSTNAME : banana
> > VERSION : 3.14.14 (31 May 2016) debian
> > UPSNAME : APCUPS
> > CABLE : USB Cable
> > DRIVER : MODBUS UPS Driver
> > UPSMODE : Stand Alone
> > STARTTIME: 2017-06-22 14:06:35 +0200
> > MODEL : Smart-UPS 1500
> > STATUS : BOOST ONLINE
> > LINEV : 205.9 Volts
> > LOADPCT : 26.0 Percent
> > LOADAPNT : 23.4 Percent
> > BCHARGE : 100.0 Percent
> > TIMELEFT : 51.0 Minutes
> > MBATTCHG : -1 Percent
> > MINTIMEL : -1 Minutes
> > MAXTIME : 0 Seconds
> > OUTPUTV : 237.6 Volts
> > DWAKE : 0 Seconds
> > DSHUTD : 0 Seconds
> > ITEMP : 27.4 C
> > BATTV : 27.1 Volts
> > LINEFREQ : 50.0 Hz
> > OUTCURNT : 1.50 Amps
> > NUMXFERS : 0
> > TONBATT : 0 Seconds
> > CUMONBATT: 0 Seconds
> > XOFFBATT : N/A
> > SELFTEST : OK
> > STATFLAG : 0x0500000C
> > MANDATE : 2013-01-10
> > SERIALNO : AS1302223920
> > BATTDATE : 2016-12-15
> > NOMOUTV : 230 Volts
> > NOMPOWER : 1000 Watts
> > NOMAPNT : 1500 VA
> > FIRMWARE : UPS 09.3 / 00.4
> > END APC : 2017-06-23 10:33:49 +0200
> >
> > You can see the DATE field is exactly the time where i stopped to
> have
> > good readings.
> > Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
> > configuration file.
> >
> > Can anyone help me with this?
> >
> > Thanks a lot.
> > Sandro.
> >
> >
> >
> ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >
> >
> > _______________________________________________
> > Apcupsd-users mailing list
> > [hidden email]
> <mailto:[hidden email]>
> > https://lists.sourceforge.net/lists/listinfo/apcupsd-users
> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> <mailto:[hidden email]>
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
> ------------------------------
>
> End of Apcupsd-users Digest, Vol 134, Issue 5
> *********************************************
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

apcupsd-4
In reply to this post by Ted Mittelstaedt-5
I'm not speaking for Sandro, and I appreciate other people have other
priorities, but I'm replacing some old PCs with Banana Pis (though
running apcupsd) for two main reasons:

1. Space. With some of the highest rents in the world, and some
residential "flats" less than 100 sq ft, space matters!

2. Power. An old PC might take 50W, a banana pi 5W. If you're running
24x7x365, then you've saved the cost of the new hardware in a year.

Regards

Allan


On Thursday, July 06, 2017 04:10 PM, Ted Mittelstaedt wrote:

> From:
>
> http://linux-sunxi.org/LeMaker_Banana_Pi
>
> "...The Raspberry's "original" serial port on GPIO 14 and 15 (CON3,
> pins 8 and 10 - at MMIO 0x1c28c00) can usually be accessed as
> /dev/ttyS2 on the Banana Pi. J12 also provides another serial port on
> pins 4 (RXD) and 6 (TXD) at MMIO 0x1c29c00, which should map to
> /dev/ttyS3.."
>
> You haven't said WHY you are wanting to use either a rasbperry or
> bananna pi, but in my world, people hand me used PCs for free that run
> Linux just fine - so I have never felt the need to invest money on
> hardware to run apcupsd...
>
> Ted
>
> On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:
>> Thanks Trevor and Ted.
>>
>> I am using the USB cables supplied with the UPSes.
>>
>> Anyway, do you suggest me to figure out how to setup two serial ports
>> on the Banana (that's not a lot of documentation around) or invest
>> some money to buy a Raspberry and stick with USB cables?
>>
>> Any other hint would be appreciated.
>>
>> Thanks.
>>
>>
>> 2017-06-25 14:02 GMT+02:00
>> <[hidden email]
>> <mailto:[hidden email]>>:
>>
>>     Send Apcupsd-users mailing list submissions to
>>     [hidden email]
>>     <mailto:[hidden email]>
>>
>>     To subscribe or unsubscribe via the World Wide Web, visit
>>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>>     or, via email, send a message with subject or body 'help' to
>>     [hidden email]
>>     <mailto:[hidden email]>
>>
>>     You can reach the person managing the list at
>>     [hidden email]
>>     <mailto:[hidden email]>
>>
>>     When replying, please edit your Subject line so it is more specific
>>     than "Re: Contents of Apcupsd-users digest..."
>>
>>
>>     Today's Topics:
>>
>>         1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)
>>
>>
>> ----------------------------------------------------------------------
>>
>>     Message: 1
>>     Date: Sat, 24 Jun 2017 23:40:02 -0700 <tel:02%20-0700>
>>     From: Ted Mittelstaedt <[hidden email]
>>     <mailto:[hidden email]>>
>>     To: [hidden email]
>>     <mailto:[hidden email]>
>>     Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
>>     Message-ID: <[hidden email]
>> <mailto:[hidden email]>>
>>     Content-Type: text/plain; charset="utf-8"; Format="flowed"
>>
>>     Your USB cables are probably poor quality.  These devices have
>> problems
>>     with poor quality USB cables.
>>
>>
>>     You also need to re-think this USB business.  The bannana pi has 2
>>     serial ports (according to the docs, I
>>
>>     haven't used one myself) and you should use those to connect to the
>>     UPSes instead of USB.
>>
>>
>>     Ted
>>
>>     On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
>>      > Hello everyone.
>>      >
>>      > I have a problem on my small server room, i hope someone here can
>>     help
>>      > me to figure out what's my problem.
>>      >
>>      > I have a server rack powered by two SMT1500RMI2U, both
>> upgraded to FW
>>      > 09.3.
>>      > I purchased a bananapi platform and installed a debian stretch
>>     (armv7l
>>      > arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
>>      > After enabling modbus protocol on the UPSes, I connected them
>> to the
>>      > bananapi platform with two usb cables.
>>      > I work out a systemd configuration to have two distinct apcupsd
>>      > instances (with different nisport) running.
>>      > Then integrated that on a zabbix agent (i can give you more
>>     details on
>>      > it) but basically i got apcaccess running once every minute
>> for each
>>      > apcupsd instance.
>>      >
>>      > All was working smoothly, but I soon realized that the
>> readings were
>>      > good only for a short period (variable from tens of minutes to
>> some
>>      > hours), then they get constant.
>>      > I need to restart apcupsd to have again actual readings.
>>      >
>>      > I thought this was due the two instances of apcupsd running on
>> the
>>      > same machine, so i removed one, disconnected one apcupsd,
>>     rebooted the
>>      > device.
>>      > But the problem is still there. Maybe, but that could be only a
>>      > coincidence, the period was longer than before.
>>      >
>>      > This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
>>      > readings become constant just before 18:50.
>>      >
>>      > And this is the apcaccess output:
>>      >
>>      > root@banana:~# date && apcaccess -h localhost:3551
>>      > Fri Jun 23 10:33:49 CEST 2017
>>      > APC      : 001,039,0910
>>      > DATE     : 2017-06-22 18:48:54 +0200
>>      > HOSTNAME : banana
>>      > VERSION  : 3.14.14 (31 May 2016) debian
>>      > UPSNAME  : APCUPS
>>      > CABLE    : USB Cable
>>      > DRIVER   : MODBUS UPS Driver
>>      > UPSMODE  : Stand Alone
>>      > STARTTIME: 2017-06-22 14:06:35 +0200
>>      > MODEL    : Smart-UPS 1500
>>      > STATUS   : BOOST ONLINE
>>      > LINEV    : 205.9 Volts
>>      > LOADPCT  : 26.0 Percent
>>      > LOADAPNT : 23.4 Percent
>>      > BCHARGE  : 100.0 Percent
>>      > TIMELEFT : 51.0 Minutes
>>      > MBATTCHG : -1 Percent
>>      > MINTIMEL : -1 Minutes
>>      > MAXTIME  : 0 Seconds
>>      > OUTPUTV  : 237.6 Volts
>>      > DWAKE    : 0 Seconds
>>      > DSHUTD   : 0 Seconds
>>      > ITEMP    : 27.4 C
>>      > BATTV    : 27.1 Volts
>>      > LINEFREQ : 50.0 Hz
>>      > OUTCURNT : 1.50 Amps
>>      > NUMXFERS : 0
>>      > TONBATT  : 0 Seconds
>>      > CUMONBATT: 0 Seconds
>>      > XOFFBATT : N/A
>>      > SELFTEST : OK
>>      > STATFLAG : 0x0500000C
>>      > MANDATE  : 2013-01-10
>>      > SERIALNO : AS1302223920
>>      > BATTDATE : 2016-12-15
>>      > NOMOUTV  : 230 Volts
>>      > NOMPOWER : 1000 Watts
>>      > NOMAPNT  : 1500 VA
>>      > FIRMWARE : UPS 09.3 / 00.4
>>      > END APC  : 2017-06-23 10:33:49 +0200
>>      >
>>      > You can see the DATE field is exactly the time where i stopped to
>>     have
>>      > good readings.
>>      > Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
>>      > configuration file.
>>      >
>>      > Can anyone help me with this?
>>      >
>>      > Thanks a lot.
>>      > Sandro.
>>      >
>>      >
>>      >
>> ------------------------------------------------------------------------------
>>      > Check out the vibrant tech community on one of the world's most
>>      > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>      >
>>      >
>>      > _______________________________________________
>>      > Apcupsd-users mailing list
>>      > [hidden email]
>>     <mailto:[hidden email]>
>>      > https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>>
>>     -------------- next part --------------
>>     An HTML attachment was scrubbed...
>>
>>     ------------------------------
>>
>> ------------------------------------------------------------------------------
>>     Check out the vibrant tech community on one of the world's most
>>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>     ------------------------------
>>
>>     Subject: Digest Footer
>>
>>     _______________________________________________
>>     Apcupsd-users mailing list
>>     [hidden email]
>>     <mailto:[hidden email]>
>>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>> <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>>
>>
>>     ------------------------------
>>
>>     End of Apcupsd-users Digest, Vol 134, Issue 5
>>     *********************************************
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> Apcupsd-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>>
>
> ------------------------------------------------------------------------------
>
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Sandro Bordacchini
Hi everyone.

Sorry for my late reply, guys.
Yes, I actually agree with Pavel and Allan, power and space are issues in my current server room implementation :-)

So I got a Raspberry Pi 3, installed raspbian, downloaded apcupsd 3.14.14 source code and configured with:

./configure --enable-modbus-usb --enable-modbus --enable-usb

Then i setup things to let two different instances run at the same time.
All is looking fine and working smoothly for 12 hours now.

Just one thing, if someone is reading this post try to obtain the same result... at first i obtained a lot of dis/re connections and with this log entry:

raspberrypi kernel: [ 1293.604752] usb 1-1.4: reset full-speed USB device number 4 using dwc_otg

I fixed it disabling USB2.0 and downgrading to USB1.1 adding dwc_otg.speed=1 to /boot/cmdline.txt

Thanks to everyone.


2017-07-06 13:10 GMT+02:00 Allan Dyer <[hidden email]>:
I'm not speaking for Sandro, and I appreciate other people have other priorities, but I'm replacing some old PCs with Banana Pis (though running apcupsd) for two main reasons:

1. Space. With some of the highest rents in the world, and some residential "flats" less than 100 sq ft, space matters!

2. Power. An old PC might take 50W, a banana pi 5W. If you're running 24x7x365, then you've saved the cost of the new hardware in a year.

Regards

Allan



On Thursday, July 06, 2017 04:10 PM, Ted Mittelstaedt wrote:
From:

http://linux-sunxi.org/LeMaker_Banana_Pi

"...The Raspberry's "original" serial port on GPIO 14 and 15 (CON3, pins 8 and 10 - at MMIO 0x1c28c00) can usually be accessed as /dev/ttyS2 on the Banana Pi. J12 also provides another serial port on pins 4 (RXD) and 6 (TXD) at MMIO 0x1c29c00, which should map to /dev/ttyS3.."

You haven't said WHY you are wanting to use either a rasbperry or bananna pi, but in my world, people hand me used PCs for free that run
Linux just fine - so I have never felt the need to invest money on
hardware to run apcupsd...

Ted

On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:
Thanks Trevor and Ted.

I am using the USB cables supplied with the UPSes.

Anyway, do you suggest me to figure out how to setup two serial ports on the Banana (that's not a lot of documentation around) or invest some money to buy a Raspberry and stick with USB cables?

Any other hint would be appreciated.

Thanks.


2017-06-25 14:02 GMT+02:00 <[hidden email] <mailto:[hidden email]>>:

    Send Apcupsd-users mailing list submissions to
    [hidden email]
    <mailto:[hidden email]>

    To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.sourceforge.net/lists/listinfo/apcupsd-users
<https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
    or, via email, send a message with subject or body 'help' to
    [hidden email]
    <mailto:[hidden email]>

    You can reach the person managing the list at
    [hidden email]
    <mailto:[hidden email]>

    When replying, please edit your Subject line so it is more specific
    than "Re: Contents of Apcupsd-users digest..."


    Today's Topics:

        1. Re: apcaccess readings not up-to-date (Ted Mittelstaedt)


----------------------------------------------------------------------

    Message: 1
    Date: Sat, 24 Jun 2017 23:40:<a href="tel:02%20-0700" value="+39020700" target="_blank">02 -0700 <tel:02%20-0700>
    From: Ted Mittelstaedt <[hidden email]
    <mailto:[hidden email]>>
    To: [hidden email]
    <mailto:[hidden email]>
    Subject: Re: [Apcupsd-users] apcaccess readings not up-to-date
    Message-ID: <[hidden email]
<mailto:[hidden email]>>
    Content-Type: text/plain; charset="utf-8"; Format="flowed"

    Your USB cables are probably poor quality.  These devices have problems
    with poor quality USB cables.


    You also need to re-think this USB business.  The bannana pi has 2
    serial ports (according to the docs, I

    haven't used one myself) and you should use those to connect to the
    UPSes instead of USB.


    Ted

    On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
     > Hello everyone.
     >
     > I have a problem on my small server room, i hope someone here can
    help
     > me to figure out what's my problem.
     >
     > I have a server rack powered by two SMT1500RMI2U, both upgraded to FW
     > 09.3.
     > I purchased a bananapi platform and installed a debian stretch
    (armv7l
     > arch) to use the packaged apcupsd v.3.14.14 (31 May 2016).
     > After enabling modbus protocol on the UPSes, I connected them to the
     > bananapi platform with two usb cables.
     > I work out a systemd configuration to have two distinct apcupsd
     > instances (with different nisport) running.
     > Then integrated that on a zabbix agent (i can give you more
    details on
     > it) but basically i got apcaccess running once every minute for each
     > apcupsd instance.
     >
     > All was working smoothly, but I soon realized that the readings were
     > good only for a short period (variable from tens of minutes to some
     > hours), then they get constant.
     > I need to restart apcupsd to have again actual readings.
     >
     > I thought this was due the two instances of apcupsd running on the
     > same machine, so i removed one, disconnected one apcupsd,
    rebooted the
     > device.
     > But the problem is still there. Maybe, but that could be only a
     > coincidence, the period was longer than before.
     >
     > This https://ibb.co/bxy2DQ is the zabbix graph, you can see that
     > readings become constant just before 18:50.
     >
     > And this is the apcaccess output:
     >
     > root@banana:~# date && apcaccess -h localhost:3551
     > Fri Jun 23 10:33:49 CEST 2017
     > APC      : 001,039,0910
     > DATE     : 2017-06-22 18:48:54 +0200
     > HOSTNAME : banana
     > VERSION  : 3.14.14 (31 May 2016) debian
     > UPSNAME  : APCUPS
     > CABLE    : USB Cable
     > DRIVER   : MODBUS UPS Driver
     > UPSMODE  : Stand Alone
     > STARTTIME: 2017-06-22 14:06:35 +0200
     > MODEL    : Smart-UPS 1500
     > STATUS   : BOOST ONLINE
     > LINEV    : 205.9 Volts
     > LOADPCT  : 26.0 Percent
     > LOADAPNT : 23.4 Percent
     > BCHARGE  : 100.0 Percent
     > TIMELEFT : 51.0 Minutes
     > MBATTCHG : -1 Percent
     > MINTIMEL : -1 Minutes
     > MAXTIME  : 0 Seconds
     > OUTPUTV  : 237.6 Volts
     > DWAKE    : 0 Seconds
     > DSHUTD   : 0 Seconds
     > ITEMP    : 27.4 C
     > BATTV    : 27.1 Volts
     > LINEFREQ : 50.0 Hz
     > OUTCURNT : 1.50 Amps
     > NUMXFERS : 0
     > TONBATT  : 0 Seconds
     > CUMONBATT: 0 Seconds
     > XOFFBATT : N/A
     > SELFTEST : OK
     > STATFLAG : 0x0500000C
     > MANDATE  : 2013-01-10
     > SERIALNO : AS1302223920
     > BATTDATE : 2016-12-15
     > NOMOUTV  : 230 Volts
     > NOMPOWER : 1000 Watts
     > NOMAPNT  : 1500 VA
     > FIRMWARE : UPS 09.3 / 00.4
     > END APC  : 2017-06-23 10:33:49 +0200
     >
     > You can see the DATE field is exactly the time where i stopped to
    have
     > good readings.
     > Here https://pastebin.com/Xf6bLiZF you can read the apcupsd
     > configuration file.
     >
     > Can anyone help me with this?
     >
     > Thanks a lot.
     > Sandro.
     >
     >
     >
------------------------------------------------------------------------------
     > Check out the vibrant tech community on one of the world's most
     > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
     >
     >
     > _______________________________________________
     > Apcupsd-users mailing list
     > [hidden email]
    <mailto:[hidden email]>
     > https://lists.sourceforge.net/lists/listinfo/apcupsd-users
<https://lists.sourceforge.net/lists/listinfo/apcupsd-users>

    -------------- next part --------------
    An HTML attachment was scrubbed...

    ------------------------------

------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org! http://sdm.link/slashdot

    ------------------------------

    Subject: Digest Footer

    _______________________________________________
    Apcupsd-users mailing list
    [hidden email]
    <mailto:[hidden email]>
    https://lists.sourceforge.net/lists/listinfo/apcupsd-users
<https://lists.sourceforge.net/lists/listinfo/apcupsd-users>


    ------------------------------

    End of Apcupsd-users Digest, Vol 134, Issue 5
    *********************************************




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Stefanos Papadakis
Hi Sandro,

I am also experiencing the same problem with a Raspberry Pi 3, but with
some interesting details.
I had the exact same UPS & USB cable working flawlessly with a RPi 2 and
the 3.14.13 version for over a year. I recently updated the Raspberry Pi
and decided to compile the 3.14.14 version. Since then I observe two
different problems:
1. The exact same problem as yours with the "outdated" results from the
apcaccess
2. The TCP connections CLOSE_WAIT problem.

The first problem goes away at the moment I remove and reattach the USB
cable. Interestingly the apcaccess "senses" the commlost event! This
implies that although there is communication with the USB bus, the
results that it returns are not "refreshed".

The second problem appears randomly as the first one, and the service
stops working properly. By checking the network connections with the
command:
sudo lsof -p pid#
all the TCP connections hung at the CLOSE_WAIT state.
It does not seem to be related to the first problem. The log file has
entries like this one
apcserver: accept error. ERR=Too many open files
The service needs to be restarted in order to function again properly.
Of course the parameters regarding the open files are maximized, so
there is another issue that is responsible.

I am considering of installing the previous version (3.14.13) just to
make sure that is software (apcupsd) and not hardware (RPi 3) or OS
related problem.

The only thing that may stress the apcupsd is the frequent polling from
my PCs - every 10s, but they are only 2 or 3 active at the same time. In
any way, in the same setup RPi 2 with 3.14.13 had no issue.

Stefanos



On 10/07/2017 12:38, Sandro Bordacchini wrote:

> Hi everyone.
>
> Sorry for my late reply, guys.
> Yes, I actually agree with Pavel and Allan, power and space are issues
> in my current server room implementation :-)
>
> So I got a Raspberry Pi 3, installed raspbian, downloaded apcupsd
> 3.14.14 source code and configured with:
>
> ./configure --enable-modbus-usb --enable-modbus --enable-usb
>
> Then i setup things to let two different instances run at the same time.
> All is looking fine and working smoothly for 12 hours now.
>
> Just one thing, if someone is reading this post try to obtain the same
> result... at first i obtained a lot of dis/re connections and with
> this log entry:
>
> raspberrypi kernel: [ 1293.604752] usb 1-1.4: reset full-speed USB
> device number 4 using dwc_otg
>
> I fixed it disabling USB2.0 and downgrading to USB1.1
> adding dwc_otg.speed=1 to /boot/cmdline.txt
>
> Thanks to everyone.
>
>
> 2017-07-06 13:10 GMT+02:00 Allan Dyer <[hidden email]
> <mailto:[hidden email]>>:
>
>     I'm not speaking for Sandro, and I appreciate other people have
>     other priorities, but I'm replacing some old PCs with Banana Pis
>     (though running apcupsd) for two main reasons:
>
>     1. Space. With some of the highest rents in the world, and some
>     residential "flats" less than 100 sq ft, space matters!
>
>     2. Power. An old PC might take 50W, a banana pi 5W. If you're
>     running 24x7x365, then you've saved the cost of the new hardware
>     in a year.
>
>     Regards
>
>     Allan
>
>
>
>     On Thursday, July 06, 2017 04:10 PM, Ted Mittelstaedt wrote:
>
>         From:
>
>         http://linux-sunxi.org/LeMaker_Banana_Pi
>         <http://linux-sunxi.org/LeMaker_Banana_Pi>
>
>         "...The Raspberry's "original" serial port on GPIO 14 and 15
>         (CON3, pins 8 and 10 - at MMIO 0x1c28c00) can usually be
>         accessed as /dev/ttyS2 on the Banana Pi. J12 also provides
>         another serial port on pins 4 (RXD) and 6 (TXD) at MMIO
>         0x1c29c00, which should map to /dev/ttyS3.."
>
>         You haven't said WHY you are wanting to use either a rasbperry
>         or bananna pi, but in my world, people hand me used PCs for
>         free that run
>         Linux just fine - so I have never felt the need to invest money on
>         hardware to run apcupsd...
>
>         Ted
>
>         On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:
>
>             Thanks Trevor and Ted.
>
>             I am using the USB cables supplied with the UPSes.
>
>             Anyway, do you suggest me to figure out how to setup two
>             serial ports on the Banana (that's not a lot of
>             documentation around) or invest some money to buy a
>             Raspberry and stick with USB cables?
>
>             Any other hint would be appreciated.
>
>             Thanks.
>
>
>             2017-06-25 14:02 GMT+02:00
>             <[hidden email]
>             <mailto:[hidden email]>
>             <mailto:[hidden email]
>             <mailto:[hidden email]>>>:
>
>                 Send Apcupsd-users mailing list submissions to
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 To subscribe or unsubscribe via the World Wide Web, visit
>                
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>                 or, via email, send a message with subject or body
>             'help' to
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 You can reach the person managing the list at
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 When replying, please edit your Subject line so it is
>             more specific
>                 than "Re: Contents of Apcupsd-users digest..."
>
>
>                 Today's Topics:
>
>                     1. Re: apcaccess readings not up-to-date (Ted
>             Mittelstaedt)
>
>
>             ----------------------------------------------------------------------
>
>                 Message: 1
>                 Date: Sat, 24 Jun 2017 23:40:02 -0700 <tel:02%20-0700>
>             <tel:02%20-0700>
>                 From: Ted Mittelstaedt <[hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>>
>                 To: [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>                 Subject: Re: [Apcupsd-users] apcaccess readings not
>             up-to-date
>                 Message-ID:
>             <[hidden email]
>             <mailto:[hidden email]>
>             <mailto:[hidden email]
>             <mailto:[hidden email]>>>
>                 Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>                 Your USB cables are probably poor quality.  These
>             devices have problems
>                 with poor quality USB cables.
>
>
>                 You also need to re-think this USB business.  The
>             bannana pi has 2
>                 serial ports (according to the docs, I
>
>                 haven't used one myself) and you should use those to
>             connect to the
>                 UPSes instead of USB.
>
>
>                 Ted
>
>                 On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
>                  > Hello everyone.
>                  >
>                  > I have a problem on my small server room, i hope
>             someone here can
>                 help
>                  > me to figure out what's my problem.
>                  >
>                  > I have a server rack powered by two SMT1500RMI2U,
>             both upgraded to FW
>                  > 09.3.
>                  > I purchased a bananapi platform and installed a
>             debian stretch
>                 (armv7l
>                  > arch) to use the packaged apcupsd v.3.14.14 (31 May
>             2016).
>                  > After enabling modbus protocol on the UPSes, I
>             connected them to the
>                  > bananapi platform with two usb cables.
>                  > I work out a systemd configuration to have two
>             distinct apcupsd
>                  > instances (with different nisport) running.
>                  > Then integrated that on a zabbix agent (i can give
>             you more
>                 details on
>                  > it) but basically i got apcaccess running once
>             every minute for each
>                  > apcupsd instance.
>                  >
>                  > All was working smoothly, but I soon realized that
>             the readings were
>                  > good only for a short period (variable from tens of
>             minutes to some
>                  > hours), then they get constant.
>                  > I need to restart apcupsd to have again actual
>             readings.
>                  >
>                  > I thought this was due the two instances of apcupsd
>             running on the
>                  > same machine, so i removed one, disconnected one
>             apcupsd,
>                 rebooted the
>                  > device.
>                  > But the problem is still there. Maybe, but that
>             could be only a
>                  > coincidence, the period was longer than before.
>                  >
>                  > This https://ibb.co/bxy2DQ is the zabbix graph, you
>             can see that
>                  > readings become constant just before 18:50.
>                  >
>                  > And this is the apcaccess output:
>                  >
>                  > root@banana:~# date && apcaccess -h localhost:3551
>                  > Fri Jun 23 10:33:49 CEST 2017
>                  > APC      : 001,039,0910
>                  > DATE     : 2017-06-22 18:48:54 +0200
>                  > HOSTNAME : banana
>                  > VERSION  : 3.14.14 (31 May 2016) debian
>                  > UPSNAME  : APCUPS
>                  > CABLE    : USB Cable
>                  > DRIVER   : MODBUS UPS Driver
>                  > UPSMODE  : Stand Alone
>                  > STARTTIME: 2017-06-22 14:06:35 +0200
>                  > MODEL    : Smart-UPS 1500
>                  > STATUS   : BOOST ONLINE
>                  > LINEV    : 205.9 Volts
>                  > LOADPCT  : 26.0 Percent
>                  > LOADAPNT : 23.4 Percent
>                  > BCHARGE  : 100.0 Percent
>                  > TIMELEFT : 51.0 Minutes
>                  > MBATTCHG : -1 Percent
>                  > MINTIMEL : -1 Minutes
>                  > MAXTIME  : 0 Seconds
>                  > OUTPUTV  : 237.6 Volts
>                  > DWAKE    : 0 Seconds
>                  > DSHUTD   : 0 Seconds
>                  > ITEMP    : 27.4 C
>                  > BATTV    : 27.1 Volts
>                  > LINEFREQ : 50.0 Hz
>                  > OUTCURNT : 1.50 Amps
>                  > NUMXFERS : 0
>                  > TONBATT  : 0 Seconds
>                  > CUMONBATT: 0 Seconds
>                  > XOFFBATT : N/A
>                  > SELFTEST : OK
>                  > STATFLAG : 0x0500000C
>                  > MANDATE  : 2013-01-10
>                  > SERIALNO : AS1302223920
>                  > BATTDATE : 2016-12-15
>                  > NOMOUTV  : 230 Volts
>                  > NOMPOWER : 1000 Watts
>                  > NOMAPNT  : 1500 VA
>                  > FIRMWARE : UPS 09.3 / 00.4
>                  > END APC  : 2017-06-23 10:33:49 +0200
>                  >
>                  > You can see the DATE field is exactly the time
>             where i stopped to
>                 have
>                  > good readings.
>                  > Here https://pastebin.com/Xf6bLiZF you can read the
>             apcupsd
>                  > configuration file.
>                  >
>                  > Can anyone help me with this?
>                  >
>                  > Thanks a lot.
>                  > Sandro.
>                  >
>                  >
>                  >
>             ------------------------------------------------------------------------------
>                  > Check out the vibrant tech community on one of the
>             world's most
>                  > engaging tech sites, Slashdot.org!
>             http://sdm.link/slashdot
>                  >
>                  >
>                  > _______________________________________________
>                  > Apcupsd-users mailing list
>                  > [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>                  >
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>
>                 -------------- next part --------------
>                 An HTML attachment was scrubbed...
>
>                 ------------------------------
>
>             ------------------------------------------------------------------------------
>                 Check out the vibrant tech community on one of the
>             world's most
>                 engaging tech sites, Slashdot.org!
>             http://sdm.link/slashdot
>
>                 ------------------------------
>
>                 Subject: Digest Footer
>
>                 _______________________________________________
>                 Apcupsd-users mailing list
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>                
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>
>
>                 ------------------------------
>
>                 End of Apcupsd-users Digest, Vol 134, Issue 5
>                 *********************************************
>
>
>
>
>             ------------------------------------------------------------------------------
>
>             Check out the vibrant tech community on one of the world's
>             most
>             engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
>             _______________________________________________
>             Apcupsd-users mailing list
>             [hidden email]
>             <mailto:[hidden email]>
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>         ------------------------------------------------------------------------------
>
>         Check out the vibrant tech community on one of the world's most
>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>         _______________________________________________
>         Apcupsd-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>         <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Apcupsd-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>     <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcaccess readings not up-to-date

Sandro Bordacchini
Hi Stefanos.

Thanks for your post, it's very interesting, even if I never experienced the 2nd problem so far.

About the 1st one, i saw it once, and that's a major improvement from what experienced on the banana.
Unfortunately the problem seems to be still there.
I wonder if i could have obtained same results disabling usb 2.0.

I am still studying the situation, and see if the 1st problem will happen again so i can dig in a little bit more.

My polling times are more relaxed: POLLTIME is 60 on both daemons, and my monitoring agent launches apcaccess every 60secs for each instance.

Looking forward to read your findings.

S.



2017-07-12 9:58 GMT+02:00 Stefanos Papadakis <[hidden email]>:
Hi Sandro,

I am also experiencing the same problem with a Raspberry Pi 3, but with
some interesting details.
I had the exact same UPS & USB cable working flawlessly with a RPi 2 and
the 3.14.13 version for over a year. I recently updated the Raspberry Pi
and decided to compile the 3.14.14 version. Since then I observe two
different problems:
1. The exact same problem as yours with the "outdated" results from the
apcaccess
2. The TCP connections CLOSE_WAIT problem.

The first problem goes away at the moment I remove and reattach the USB
cable. Interestingly the apcaccess "senses" the commlost event! This
implies that although there is communication with the USB bus, the
results that it returns are not "refreshed".

The second problem appears randomly as the first one, and the service
stops working properly. By checking the network connections with the
command:
sudo lsof -p pid#
all the TCP connections hung at the CLOSE_WAIT state.
It does not seem to be related to the first problem. The log file has
entries like this one
apcserver: accept error. ERR=Too many open files
The service needs to be restarted in order to function again properly.
Of course the parameters regarding the open files are maximized, so
there is another issue that is responsible.

I am considering of installing the previous version (3.14.13) just to
make sure that is software (apcupsd) and not hardware (RPi 3) or OS
related problem.

The only thing that may stress the apcupsd is the frequent polling from
my PCs - every 10s, but they are only 2 or 3 active at the same time. In
any way, in the same setup RPi 2 with 3.14.13 had no issue.

Stefanos



On 10/07/2017 12:38, Sandro Bordacchini wrote:
> Hi everyone.
>
> Sorry for my late reply, guys.
> Yes, I actually agree with Pavel and Allan, power and space are issues
> in my current server room implementation :-)
>
> So I got a Raspberry Pi 3, installed raspbian, downloaded apcupsd
> 3.14.14 source code and configured with:
>
> ./configure --enable-modbus-usb --enable-modbus --enable-usb
>
> Then i setup things to let two different instances run at the same time.
> All is looking fine and working smoothly for 12 hours now.
>
> Just one thing, if someone is reading this post try to obtain the same
> result... at first i obtained a lot of dis/re connections and with
> this log entry:
>
> raspberrypi kernel: [ 1293.604752] usb 1-1.4: reset full-speed USB
> device number 4 using dwc_otg
>
> I fixed it disabling USB2.0 and downgrading to USB1.1
> adding dwc_otg.speed=1 to /boot/cmdline.txt
>
> Thanks to everyone.
>
>
> 2017-07-06 13:10 GMT+02:00 Allan Dyer <[hidden email]
> <mailto:[hidden email]>>:
>
>     I'm not speaking for Sandro, and I appreciate other people have
>     other priorities, but I'm replacing some old PCs with Banana Pis
>     (though running apcupsd) for two main reasons:
>
>     1. Space. With some of the highest rents in the world, and some
>     residential "flats" less than 100 sq ft, space matters!
>
>     2. Power. An old PC might take 50W, a banana pi 5W. If you're
>     running 24x7x365, then you've saved the cost of the new hardware
>     in a year.
>
>     Regards
>
>     Allan
>
>
>
>     On Thursday, July 06, 2017 04:10 PM, Ted Mittelstaedt wrote:
>
>         From:
>
>         http://linux-sunxi.org/LeMaker_Banana_Pi
>         <http://linux-sunxi.org/LeMaker_Banana_Pi>
>
>         "...The Raspberry's "original" serial port on GPIO 14 and 15
>         (CON3, pins 8 and 10 - at MMIO 0x1c28c00) can usually be
>         accessed as /dev/ttyS2 on the Banana Pi. J12 also provides
>         another serial port on pins 4 (RXD) and 6 (TXD) at MMIO
>         0x1c29c00, which should map to /dev/ttyS3.."
>
>         You haven't said WHY you are wanting to use either a rasbperry
>         or bananna pi, but in my world, people hand me used PCs for
>         free that run
>         Linux just fine - so I have never felt the need to invest money on
>         hardware to run apcupsd...
>
>         Ted
>
>         On 6/29/2017 6:13 AM, Sandro Bordacchini wrote:
>
>             Thanks Trevor and Ted.
>
>             I am using the USB cables supplied with the UPSes.
>
>             Anyway, do you suggest me to figure out how to setup two
>             serial ports on the Banana (that's not a lot of
>             documentation around) or invest some money to buy a
>             Raspberry and stick with USB cables?
>
>             Any other hint would be appreciated.
>
>             Thanks.
>
>
>             2017-06-25 14:02 GMT+02:00
>             <[hidden email]
>             <mailto:[hidden email]>
>             <mailto:[hidden email]
>             <mailto:[hidden email]>>>:
>
>                 Send Apcupsd-users mailing list submissions to
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 To subscribe or unsubscribe via the World Wide Web, visit
>
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>                 or, via email, send a message with subject or body
>             'help' to
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 You can reach the person managing the list at
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>                 When replying, please edit your Subject line so it is
>             more specific
>                 than "Re: Contents of Apcupsd-users digest..."
>
>
>                 Today's Topics:
>
>                     1. Re: apcaccess readings not up-to-date (Ted
>             Mittelstaedt)
>
>
>             ----------------------------------------------------------------------
>
>                 Message: 1
>                 Date: Sat, 24 Jun 2017 23:40:<a href="tel:02%20-0700" value="+39020700">02 -0700 <tel:02%20-0700>
>             <tel:02%20-0700>
>                 From: Ted Mittelstaedt <[hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>>
>                 To: [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>                 Subject: Re: [Apcupsd-users] apcaccess readings not
>             up-to-date
>                 Message-ID:
>             <[hidden email]
>             <mailto:[hidden email]>
>             <mailto:[hidden email]
>             <mailto:[hidden email]>>>
>                 Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>                 Your USB cables are probably poor quality.  These
>             devices have problems
>                 with poor quality USB cables.
>
>
>                 You also need to re-think this USB business.  The
>             bannana pi has 2
>                 serial ports (according to the docs, I
>
>                 haven't used one myself) and you should use those to
>             connect to the
>                 UPSes instead of USB.
>
>
>                 Ted
>
>                 On 6/23/2017 2:31 AM, Sandro Bordacchini wrote:
>                  > Hello everyone.
>                  >
>                  > I have a problem on my small server room, i hope
>             someone here can
>                 help
>                  > me to figure out what's my problem.
>                  >
>                  > I have a server rack powered by two SMT1500RMI2U,
>             both upgraded to FW
>                  > 09.3.
>                  > I purchased a bananapi platform and installed a
>             debian stretch
>                 (armv7l
>                  > arch) to use the packaged apcupsd v.3.14.14 (31 May
>             2016).
>                  > After enabling modbus protocol on the UPSes, I
>             connected them to the
>                  > bananapi platform with two usb cables.
>                  > I work out a systemd configuration to have two
>             distinct apcupsd
>                  > instances (with different nisport) running.
>                  > Then integrated that on a zabbix agent (i can give
>             you more
>                 details on
>                  > it) but basically i got apcaccess running once
>             every minute for each
>                  > apcupsd instance.
>                  >
>                  > All was working smoothly, but I soon realized that
>             the readings were
>                  > good only for a short period (variable from tens of
>             minutes to some
>                  > hours), then they get constant.
>                  > I need to restart apcupsd to have again actual
>             readings.
>                  >
>                  > I thought this was due the two instances of apcupsd
>             running on the
>                  > same machine, so i removed one, disconnected one
>             apcupsd,
>                 rebooted the
>                  > device.
>                  > But the problem is still there. Maybe, but that
>             could be only a
>                  > coincidence, the period was longer than before.
>                  >
>                  > This https://ibb.co/bxy2DQ is the zabbix graph, you
>             can see that
>                  > readings become constant just before 18:50.
>                  >
>                  > And this is the apcaccess output:
>                  >
>                  > root@banana:~# date && apcaccess -h localhost:3551
>                  > Fri Jun 23 10:33:49 CEST 2017
>                  > APC      : 001,039,0910
>                  > DATE     : 2017-06-22 18:48:54 +0200
>                  > HOSTNAME : banana
>                  > VERSION  : 3.14.14 (31 May 2016) debian
>                  > UPSNAME  : APCUPS
>                  > CABLE    : USB Cable
>                  > DRIVER   : MODBUS UPS Driver
>                  > UPSMODE  : Stand Alone
>                  > STARTTIME: 2017-06-22 14:06:35 +0200
>                  > MODEL    : Smart-UPS 1500
>                  > STATUS   : BOOST ONLINE
>                  > LINEV    : 205.9 Volts
>                  > LOADPCT  : 26.0 Percent
>                  > LOADAPNT : 23.4 Percent
>                  > BCHARGE  : 100.0 Percent
>                  > TIMELEFT : 51.0 Minutes
>                  > MBATTCHG : -1 Percent
>                  > MINTIMEL : -1 Minutes
>                  > MAXTIME  : 0 Seconds
>                  > OUTPUTV  : 237.6 Volts
>                  > DWAKE    : 0 Seconds
>                  > DSHUTD   : 0 Seconds
>                  > ITEMP    : 27.4 C
>                  > BATTV    : 27.1 Volts
>                  > LINEFREQ : 50.0 Hz
>                  > OUTCURNT : 1.50 Amps
>                  > NUMXFERS : 0
>                  > TONBATT  : 0 Seconds
>                  > CUMONBATT: 0 Seconds
>                  > XOFFBATT : N/A
>                  > SELFTEST : OK
>                  > STATFLAG : 0x0500000C
>                  > MANDATE  : 2013-01-10
>                  > SERIALNO : AS1302223920
>                  > BATTDATE : 2016-12-15
>                  > NOMOUTV  : 230 Volts
>                  > NOMPOWER : 1000 Watts
>                  > NOMAPNT  : 1500 VA
>                  > FIRMWARE : UPS 09.3 / 00.4
>                  > END APC  : 2017-06-23 10:33:49 +0200
>                  >
>                  > You can see the DATE field is exactly the time
>             where i stopped to
>                 have
>                  > good readings.
>                  > Here https://pastebin.com/Xf6bLiZF you can read the
>             apcupsd
>                  > configuration file.
>                  >
>                  > Can anyone help me with this?
>                  >
>                  > Thanks a lot.
>                  > Sandro.
>                  >
>                  >
>                  >
>             ------------------------------------------------------------------------------
>                  > Check out the vibrant tech community on one of the
>             world's most
>                  > engaging tech sites, Slashdot.org!
>             http://sdm.link/slashdot
>                  >
>                  >
>                  > _______________________________________________
>                  > Apcupsd-users mailing list
>                  > [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>                  >
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>
>                 -------------- next part --------------
>                 An HTML attachment was scrubbed...
>
>                 ------------------------------
>
>             ------------------------------------------------------------------------------
>                 Check out the vibrant tech community on one of the
>             world's most
>                 engaging tech sites, Slashdot.org!
>             http://sdm.link/slashdot
>
>                 ------------------------------
>
>                 Subject: Digest Footer
>
>                 _______________________________________________
>                 Apcupsd-users mailing list
>                 [hidden email]
>             <mailto:[hidden email]>
>                 <mailto:[hidden email]
>             <mailto:[hidden email]>>
>
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>>
>
>
>                 ------------------------------
>
>                 End of Apcupsd-users Digest, Vol 134, Issue 5
>                 *********************************************
>
>
>
>
>             ------------------------------------------------------------------------------
>
>             Check out the vibrant tech community on one of the world's
>             most
>             engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
>             _______________________________________________
>             Apcupsd-users mailing list
>             [hidden email]
>             <mailto:[hidden email]>
>             https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>             <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>         ------------------------------------------------------------------------------
>
>         Check out the vibrant tech community on one of the world's most
>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>         _______________________________________________
>         Apcupsd-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>         <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Apcupsd-users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>     <https://lists.sourceforge.net/lists/listinfo/apcupsd-users>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Loading...