Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: SHM and/or FUSE to access nut-client information #2591

Open
jimklimov opened this issue Aug 13, 2024 · 0 comments
Open

RFE: SHM and/or FUSE to access nut-client information #2591

jimklimov opened this issue Aug 13, 2024 · 0 comments
Labels
enhancement portability We want NUT to build and run everywhere possible
Milestone

Comments

@jimklimov
Copy link
Member

jimklimov commented Aug 13, 2024

In the 42ITy project there was a component to represent NUT and other readings as a virtual file system akin to /dev/shm for easier uniform access from other programs (and using entity names mapped to conform to tat project's standards).

This issue is about embracing a similar idea for NUT itself, to either have upsd represent an shm view for the local system (may require several OS-dependent implementations), and/or to make use of FUSE as an arguably more portable solution to wrap the abilities of libnutclient as a pure userland application (a mix of upsc, upsrw, upscmd) that might be able to use upsmon.conf (or a similar file) for privileged access to remote devices.

This is loosely related to ideas about adding REST API to nut-cgi family out of the box, e.g. #2524, or extending upsc with a JSON/YAML printer - but note there are several third-party projects already implementing something of the sort (with a downside of often requiring a further execution environment like NodeJS or Python, while a NUT-specific solution could be a standalone binary, friendlier to embedded use-cases). Maybe a single daemon could handle queries for both file-system access and CGI/RESTAPI given the path-based similarities?..

Sounds like a fun project, design and PRs would be welcome.

CC FYI: @arnaudquette-eaton

Reminded me of an unrelated idea in issue #1950 (kernel modules for systems whose life-cycle can not use a nutshutdown kind of script directly) that is somewhat similar in terms of OS-dependent development that can benefit tighter NUT integrations (especially for complex shutdowns).

@jimklimov jimklimov added enhancement portability We want NUT to build and run everywhere possible labels Aug 13, 2024
@jimklimov jimklimov added this to the NUT 2.9 milestone Aug 13, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 13, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 13, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 13, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
…networkupstools#2591]

These would likely become NUT optional dependencies in `docs/config-prereqs.txt`,
if a more integrated client would be made to follow up with this idea eventually.

Signed-off-by: Jim Klimov <[email protected]>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement portability We want NUT to build and run everywhere possible
Projects
Status: To Do
Development

No branches or pull requests

1 participant