Re: [Nut-upsuser] List of connected slaves

2018-04-13 Thread Charles Lepple
On Apr 13, 2018, at 8:21 AM, Larry Fahnoe  wrote:
> 
> 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

2018-04-13 Thread Larry Fahnoe
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 Lepple  wrote:

> 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

2018-04-13 Thread Charles Lepple
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


Re: [Nut-upsuser] List of connected slaves

2018-04-13 Thread Jon Bendtsen

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

2018-04-13 Thread zefanjas
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