nut-rs/rupsc
2023-08-14 23:43:38 -04:00
..
src Release 0.6.0; edition 2021 2023-07-01 15:57:28 -04:00
Cargo.toml Release 0.6.1 2023-08-14 23:43:38 -04:00
LICENSE Release 0.5.1 2021-08-01 04:12:41 -04:00
README.md Rename repository to nut-rs 2021-08-01 17:26:25 -04:00

rupsc

crates.io Documentation GPL-3.0 or later CI

A Rust clone of upsc, the Network UPS Tools (NUT) demo program to display UPS variables.

Written using the rups 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
  • Connect securely with SSL

Installation

# 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, so the usage is the same:

# Show usage
rupsc -h

# List variables on UPS device "nutdev1" (assumes upsd running on localhost:3493)
rupsc nutdev1

# List variables on UPS device "nutdev1" (remote upsd)
rupsc nutdev1@upsd.remote: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 to the original tool:

# Enable network debugging
rupsc -D

# Enable SSL (strict verification)
rupsc -S

# Enable SSL (no verification)
rupsc --insecure-ssl

Pronunciation

r-oopsie