[Nut-upsdev] [nut-commits] svn commit r1376 - in trunk: . server

Arjen de Korte nut+devel at de-korte.org
Thu Mar 27 08:53:57 UTC 2008


> proof reading of NEWS and UPGRADING are welcome.

One thing that popped up, is how to test the shutdown of the usbhid-ups
driver. Calling 'usbhid-ups -k' (as listed now) won't work, since the
driver will need to know which device to shutdown (the -a option is not
optional). In order not to accidentally shutdown a UPS that is powering a
live system, I would recommend to use 'upsmon -c fsd' here. This not only
makes sure that the system is shutdown properly before telling the UPS to
switch off, but also verifies that this late in the halt sequence we're
still able to talk to the UPS. If memory serves, there were some issues in
that area (reported by Peter Selinger) a while ago. On some systems, you
may need to run 'upsdrvctl shutdown' as root, since hotplug/udev support
may not be available anymore at that time (I know it is available on my
openSUSE system though).

[...]

> Do you still hold some changes?

Only one that I would like to see in nut-2.2.2. If no pollinterval is
specified, the netxml-ups driver should default to something like 5-10
seconds, to prevent people from shooting themselves in the foot (the older
NMC's might not like to be polled with 2 seconds intervals).

The recent server updates should *not* be in nut-2.2.2 until we're more
sure about the portability of the poll() function. It is in POSIX, but
marked as an X/Open System Interfaces Extension, so I have no idea if this
is portable to all the platforms/systems we support. I think it is best to
keep it in the trunk for a while (directing people there that need > 1024
clients monitoring a single server) to see if we get any complaints in
that area (might be something to include in nut-2.4).

I'm planning an update to the 'net_read()' function in the upsclient
library to allow it to read more data than it needs and return the
remainder in subsequent calls for that connection. For example, it would
read

	WHATEVER\nIS IN THE\nBUF

from the server, return "WHATEVER" in the first call and "IS IN THE" on
the second call (without reading from the server) and prepend "BUF" to the
next read from the server (while repeating the process). We'll be fine
without this in nut-2.2.2, so we shouldn't wait with releasing it until I
had the time to code this.

Best regards, Arjen




More information about the Nut-upsdev mailing list