34 lines
765 B
Bash
34 lines
765 B
Bash
#!/usr/bin/bash
|
|
#
|
|
# powerman/status.sh — quick PDU status check
|
|
#
|
|
# Usage:
|
|
# PROX_HOST=pfv-tsys1 bash tests/remote.sh prox-file powerman/status.sh
|
|
#
|
|
set -euo pipefail
|
|
|
|
echo "============================================"
|
|
echo " Cyclades PM10i PDU Status"
|
|
echo " Host: $(hostname) $(date)"
|
|
echo "============================================"
|
|
|
|
echo ""
|
|
echo "=== Service ==="
|
|
systemctl is-active powerman 2>/dev/null && echo "(running)" || echo "(stopped)"
|
|
|
|
echo ""
|
|
echo "=== Device ==="
|
|
ls -la /dev/cyclades-pm10 2>/dev/null || echo "(no /dev/cyclades-pm10 symlink)"
|
|
|
|
echo ""
|
|
echo "=== Outlets ==="
|
|
powerman -l 2>&1
|
|
|
|
echo ""
|
|
echo "=== Power Status ==="
|
|
powerman -q 2>&1
|
|
|
|
echo ""
|
|
echo "=== Temperature ==="
|
|
powerman -T 2>&1 || echo "(temperature not available)"
|