[Nut-upsdev] A patch to add a command to get client information

Arnaud Quette aquette.dev at gmail.com
Wed Feb 1 14:58:11 UTC 2012


2012/1/25 Rene Martín Rodríguez <rmrodri at ull.edu.es>:
> Hello!!

¡Hola René Martin ;-)

> I'm a sysadmin at La Laguna University in Spain. We are using NUT to manage
> our UPS with great success, but we miss a feature and we would like to send
> this patch to you.
>
> If you apply this patch running upsd -c info you'll get information about
> client connections in syslog. This is very simple and helpfull if you have
> hundreds of servers connected to the same upsd.

indeed, it's an interesting feature.

after thinking a bit, here is a potentially more useful approach, that
would complement "GET NUMLOGINS":
Add a new "LIST CLIENT" command to the network protocol [1]

Form:

    LIST CLIENT [device_name]

Response:

    BEGIN LIST CLIENT
    CLIENT <client IP address> <device name>
    ...
    END LIST CLIENT

    BEGIN LIST CLIENT
    CLIENT ::1 ups1
    CLIENT ::1 ups2
    CLIENT 166.99.250.2 ups2
    END LIST CLIENT

This would be completed by a new upsc option ("-c" for example) to get
this list.

Note that this is more an RFC, since it's just a base idea (I've not
checked all details).
So feedback and comments welcome...
Would the above suits your needs René Martin?

> Thank you for your nice work!!

thanks for your contribution.

cheers,
Arnaud
--
[1] http://www.networkupstools.org/docs/developer-guide.chunked/ar01s09.html
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list