mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 05:28:31 -04:00
parent
43121ce2ea
commit
8556a7ca0e
16 changed files with 676 additions and 82 deletions
65
rupsc/README.md
Normal file
65
rupsc/README.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# rupsc
|
||||
|
||||
[](https://crates.io/crates/rupsc)
|
||||
[](https://docs.rs/nut-client)
|
||||
[](./LICENSE)
|
||||
[](https://github.com/aramperes/nut-client-rs/actions?query=workflow%3ACI)
|
||||
|
||||
A Rust clone of [upsc](https://networkupstools.org/docs/man/upsc.html),
|
||||
the [Network UPS Tools](https://github.com/networkupstools/nut) (NUT) demo program to display UPS variables.
|
||||
|
||||
Written using the [nut-client](https://github.com/aramperes/nut-client-rs) crate.
|
||||
|
||||
- Connect to `upsd`/`nut-server` using TCP
|
||||
- List UPS devices
|
||||
- List variables for a UPS device
|
||||
- Get variable value of a UPS device
|
||||
- List clients connected to a UPS device
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Using cargo
|
||||
cargo install rupsc
|
||||
|
||||
# Or, build for other targets
|
||||
# (make sure you install the appropriate toolchain & gcc linker)
|
||||
cargo build --release --target armv7-unknown-linux-gnueabihf
|
||||
cargo build --release --target aarch64-unknown-linux-gnu
|
||||
cargo build --release --target arm-unknown-linux-gnueabihf
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This is a clone of [`upsc`](https://networkupstools.org/docs/man/upsc.html), so the usage is the same:
|
||||
|
||||
```bash
|
||||
# Show usage
|
||||
rupsc -h
|
||||
|
||||
# List variables on UPS device "nutdev1" (assumes upsd running on 127.0.0.1:3493)
|
||||
rupsc nutdev1
|
||||
|
||||
# List variables on UPS device "nutdev1" (remove upsd)
|
||||
rupsc nutdev1@192.168.1.2:3493
|
||||
|
||||
# List available UPS devices
|
||||
rupsc -l
|
||||
|
||||
# List available UPS devices, with description
|
||||
rupsc -L
|
||||
|
||||
# List clients connected to UPS device "nutdev1"
|
||||
rupsc -c nutdev1
|
||||
```
|
||||
|
||||
However, there are also some additions:
|
||||
|
||||
```bash
|
||||
# Enable network debugging (global flag).
|
||||
ruspc -D
|
||||
```
|
||||
|
||||
## Pronunciation
|
||||
|
||||
> r-oopsie
|
Loading…
Add table
Add a link
Reference in a new issue