Re: [Nut-upsuser] List of connected slaves
On Apr 13, 2018, at 8:21 AM, Larry Fahnoewrote: > > Umm, the ups -c option "Lists each client connected on ups, one name per > line." according to the man page and it has worked for me for a long time. > You're right, and I have no idea how I missed that the first time. The dangers of replying before sufficient coffee? ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] List of connected slaves
Umm, the ups -c option "Lists each client connected on ups, one name per line." according to the man page and it has worked for me for a long time. --Larry On Fri, Apr 13, 2018 at 7:01 AM, Charles Lepplewrote: > On Apr 13, 2018, at 3:55 AM, Jon Bendtsen wrote: > > > > On 13/04/2018 07.56, zefanjas wrote: > >> Hi, > >> is there a command to get a list of connected slaves you can run on the > >> nutserver? I want to monitor the slaves and if their are actually > >> connected to server. > > > > if there is no such command in NUT, then on my Debian Stretch using the > lsof -p command on the upsd proccess on my NUT server reveals TCP > connections to the clients. > > > > I see 2 connections pr. client, probably because each client monitors 2 > UPS's, one for each powersupply. > > To be pedantic for a moment, the TCP connections to port 3493 are a > superset of the slaves connected - the difference being tools that are > monitoring but not logged in as a slave. > > You can get a list of slaves with the following: > > echo 'LIST CLIENT ups' | nc nut-server-host 3493 > > I thought there was an option to "upsc" for this, but I guess not. There > is also a bug in the Python module: https://github.com/ > networkupstools/nut/issues/549 > ___ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser > -- Larry Fahnoe, Fahnoe Technology Consulting, fah...@fahnoetech.com Minneapolis, Minnesota www.FahnoeTech.com ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] List of connected slaves
On Apr 13, 2018, at 3:55 AM, Jon Bendtsenwrote: > > On 13/04/2018 07.56, zefanjas wrote: >> Hi, >> is there a command to get a list of connected slaves you can run on the >> nutserver? I want to monitor the slaves and if their are actually >> connected to server. > > if there is no such command in NUT, then on my Debian Stretch using the lsof > -p command on the upsd proccess on my NUT server reveals TCP connections to > the clients. > > I see 2 connections pr. client, probably because each client monitors 2 > UPS's, one for each powersupply. To be pedantic for a moment, the TCP connections to port 3493 are a superset of the slaves connected - the difference being tools that are monitoring but not logged in as a slave. You can get a list of slaves with the following: echo 'LIST CLIENT ups' | nc nut-server-host 3493 I thought there was an option to "upsc" for this, but I guess not. There is also a bug in the Python module: https://github.com/networkupstools/nut/issues/549 ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] List of connected slaves
On 13/04/2018 07.56, zefanjas wrote: Hi, is there a command to get a list of connected slaves you can run on the nutserver? I want to monitor the slaves and if their are actually connected to server. if there is no such command in NUT, then on my Debian Stretch using the lsof -p command on the upsd proccess on my NUT server reveals TCP connections to the clients. I see 2 connections pr. client, probably because each client monitors 2 UPS's, one for each powersupply. JonB ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
[Nut-upsuser] List of connected slaves
Hi, is there a command to get a list of connected slaves you can run on the nutserver? I want to monitor the slaves and if their are actually connected to server. Regards ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser