Orion Poplawski
2023-Apr-07 01:31 UTC
[Nut-upsuser] nut server without nut-client/monitor?
On 4/6/23 18:12, Greg Troxel wrote:> Orion Poplawski via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> > writes: > >> Would it be at all useful to have just the nut "server" components installed >> and running on a machine without a nut-monitor service running? > > It really depends on your goals and your overall plan. > > Generally, upsd and drivers just accumulate state and provide it to > clients, so they don't tend to be truly useful by themselves. > > You could run a custom client that logs and reports state against upsd. > > You could run upsmon across the network. However, the shutdown process > assumes upsmon is local. > > However, there's a normal plan, and if what you are doing is even sort of > normal, it's likely best to do the normal thing, unless you can > articulate why you want something different. > > So: > > 0) Read some stuff on the web: > https://xyproblem.info/ > https://dontasktoask.com/ (not quite on point) > > 1) Tell us your situation and what you want to accomplish. > > 2) Tell us why, after having read the docs, you are heading towards a > non-standard setup.To explain the motivation behind my question - I'm looking at tweaking the Fedora RPMs and noticed that currently the "nut" server package requires the "nut-client" package to also be installed (though not the reverse obviously). With some effort we can split things up so one could install just the "nut" package. But I'm thinking this really isn't particularly useful or interesting. But I figured I would ask. -- Orion Poplawski he/him/his - surely the least important thing about me IT Systems Manager 720-772-5637 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane orion at nwra.com Boulder, CO 80301 https://www.nwra.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3847 bytes Desc: S/MIME Cryptographic Signature URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230406/9e781098/attachment-0001.bin>
Isn't "nut" package there an umbrella/meta-package (in terms of other distros) to pull together the likely suspects in one command? Not at a computer now, but I think Debian and OpenIndiana packages were grouped this way. Likely all packages with daemons would depend on a "nut-common" package then, to consistently deliver user accounts, systemd-tmpfiles and other similar shared bits. Otherwise, taking the question at face value, a standalone NUT server without a client can make sense on a system connected to an UPS to monitor and manage it, but not powered by it - so it does not have to shut itself down. Even then however, verifying the setup without an `upsc` or managing it without `upsrw`/`upscmd`/... would be cumbersome (though possible with telnet or other clients), and a "primary"/"master" mode upsmon watching the UPS as powering 0 PSUs of that box is recommended to send out FSD commands etc. Not sure if we have example setups to power off such an UPS (as we would normally when the primary system is also fed by it and goes down last with special handling). Jim On Fri, Apr 7, 2023, 03:47 Orion Poplawski via Nut-upsuser < nut-upsuser at alioth-lists.debian.net> wrote:> On 4/6/23 18:12, Greg Troxel wrote: > > Orion Poplawski via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> > > writes: > > > >> Would it be at all useful to have just the nut "server" components > installed > >> and running on a machine without a nut-monitor service running? > > > > It really depends on your goals and your overall plan. > > > > Generally, upsd and drivers just accumulate state and provide it to > > clients, so they don't tend to be truly useful by themselves. > > > > You could run a custom client that logs and reports state against upsd. > > > > You could run upsmon across the network. However, the shutdown process > > assumes upsmon is local. > > > > However, there's a normal plan, and if what you are doing is even sort of > > normal, it's likely best to do the normal thing, unless you can > > articulate why you want something different. > > > > So: > > > > 0) Read some stuff on the web: > > https://xyproblem.info/ > > https://dontasktoask.com/ (not quite on point) > > > > 1) Tell us your situation and what you want to accomplish. > > > > 2) Tell us why, after having read the docs, you are heading towards a > > non-standard setup. > > To explain the motivation behind my question - I'm looking at tweaking > the Fedora RPMs and noticed that currently the "nut" server package > requires the "nut-client" package to also be installed (though not the > reverse obviously). With some effort we can split things up so one > could install just the "nut" package. But I'm thinking this really > isn't particularly useful or interesting. But I figured I would ask. > > > -- > Orion Poplawski > he/him/his - surely the least important thing about me > IT Systems Manager 720-772-5637 > NWRA, Boulder/CoRA Office FAX: 303-415-9702 > 3380 Mitchell Lane orion at nwra.com > Boulder, CO 80301 https://www.nwra.com/ > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230407/2f39d5b6/attachment.htm>
Orion Poplawski via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> writes:> To explain the motivation behind my question - I'm looking at tweaking > the Fedora RPMs and noticed that currently the "nut" server package > requires the "nut-client" package to also be installed (though not the > reverse obviously). With some effort we can split things up so one > could install just the "nut" package. But I'm thinking this really > isn't particularly useful or interesting. But I figured I would ask.That question makes a lot more sense! I maintain the nut package in pkgsrc, and we have one for server and clients, but without usb, and then one with usb. The basic one is only 10 MB. But pkgsrc tends to split less than many GNU/Linux distributions. I can't imagine wanting to have the server without "upsc" in any even slightly normal system. Running upsc tells you the status, and even if you don't really care about most of that, confirms that the server is working. It would really be an extreme embedded case to want to save that space, and then it would be far more important to remove all drivers that are not for your hardware, SNMP and USB support if not used, etc. Put another way, it's like ntpd without ntpq. You might want to split out nut-scanner. But it's not really that big, and I'm not sure how the maintenance effort trades off with space savings. All in all I find it sensible for the package with ${prefix}/sbin/upsd and ${prefix}/libexec/[drivers] to depend on nut-client. It's hard to think of an actual user that would be bothered by this, that wouldn't also want to hand-pick everything else about their system, because say they are fitting in 4 MB of flash on an embedded box that does only limited things.