Pass commands to ssh like in the following examples:
The following examples are with a Ubuntu/Debian based OS.
Return device information in human readable format
$ ssh [email protected] "system device status"
------------------
Device Information
------------------
Device Name | SynLink PDU
Model Number | 1001AIE-01
Outlet Switching | Supported
Outlet Pwr Measurements | Supported
Number of Banks | 1
Number of Outlets | 8
Controller Serial # | 10283628
Enclosure Serial # | 461298
Inlet Configuration | standard
Mac Address | 00:00:00:00:00:00
Form Factor | 1U
Phase | Single Phase
Device Time | 01/01/2012 - 08:02:54 UTC
Uptime | 28971 seconds
Return device information in JSON format
$ ssh [email protected] "system device json"
{
"numBanks":1,
"numOutlets":8,
"numInlets":1,
"inletPlug":"IEC-320 C20",
"outletPwrMeasurementsSupported":true,
"outletSwitchingSupported":true,
"enclosureSerialNumber":9826498,
"modelNumber":"1001AIE-01",
"inletConfig":"standard",
"formFactor":"1U",
"controllerSerialNumber":1360604425,
"controllerFirmwareVersion":"",
"controllerHardwareVersion":"",
"phase":"Single Phase",
"globalRebootTime":5,
"circuitBreakerProtection":false,
"uptime":"29085",
"time":"2012-01-01T08:04Z"
}
Return device information in JSON format and parse for Model Number
Requires jq (json parsing tool)
$ ssh [email protected] "system device status json" | jq .modelNumber
"1001AIE-01"