CLI Examples

The following examples were run on model: SynLink SP-1001AIE-01

Switching Outlets On or Off

Switch outlets on with command: system outlets set outlet_state to be prompted for outlet index, and outlet state.

Outlet state RB will power cycle PDU. Power cycle time is based off of global reboot time or custom reboot time for an individual outlet.

SynLink> system outlets set outlet_state
--------------------------------------------------
 Index | Outlet ID     | Name            | State 
--------------------------------------------------
 1     | 1-16777225    | Outlet 1        | ON
 2     | 2-16777225    | Outlet 2        | ON
 3     | 3-16777225    | Outlet 3        | ON
 4     | 4-16777225    | Outlet 4        | ON
 5     | 5-16777225    | Outlet 5        | ON
 6     | 6-16777225    | Outlet 6        | ON
 7     | 7-16777225    | Outlet 7        | ON
 8     | 8-16777225    | Outlet 8        | ON

Outlet ID or Outlet Index: 4
ON, OFF, or RB: OFF
Successfully switched outlet

or

Switch outlets with command system outlets set outlet_state 4-16777225 OFF without interactive prompts. Requires knowing outlet ID ahead of time. Find outlet ID's ahead of time by issuing command system outlets status. This command is better for scripting then the previous command.

SynLink> system outlets set outlet_state 4-16777225 OFF
Successfully switched outlet

Setting Static IP to a Specific IP

The following examples shows a SynLink PDU being set to 192.168.1.200. It is assumed this PDU is already configured to use static IPs (ip_assign = static_ip).

SynLink> network ip set static_ip 192.168.1.200
Restarting network to apply changes...
Successfully restarted Network

Network Settings
-----------------
IP Address Assignment:  Static
-------------------
Static IP Address:      192.168.1.200
Static Gateway IP:      192.168.1.1
Static Subnet Mask:     255.255.255.0
Primary DNS IP:         8.8.8.8
Secondary DNS IP:       8.8.4.4
-------------------
Mac Address: 3A:D2:21:D3:82:45

Changing default Static IP to DHCP

SynLink> network ip set ip_assign dhcp
Restarting network to apply changes...
refreshing resolve.conf

Network Settings
-----------------
IP Address Assignment:  DHCP
DHCP Assigned IP:       192.168.1.146
Mac Address: 3A:D2:21:D3:82:45

Get Inlet Power Consumption Information

Get inlet power consumption information in human readable format:

SynLink> system inlets status
-----------------
Inlet Information
-----------------
Inlet Plug          | IEC-320 C20
Inlet Name          | IEC-320 C20 Inlet
Inlet Line          | L-L/N
Energy Accumulation | 0.00 kWh
Current RMS         | 0.01 A
Voltage RMS         | 117.40 V
Line Frequency      | 60.19 W
Power Factor        | 0.49 
Active Power        | 0.38 W
Apparent Power      | 0.77 VA

or

Get inlet power consumption information in JSON format. See SynLink HTTP(S) API documentation to see JSON information

SynLink> system inlets json
[
  {
    "inletType":"single",
    "inletPlug":"IEC-320 C20",
    "inletPhase":"Single Phase",
    "inletName":"IEC-320 C20 Inlet",
    "id":"I1-9826498",
    "inletLineConfiguration":"L-L\/N",
    "inletCurrentRms":0.008,
    "inletVoltageRms":117.199,
    "inletLineFrequency":60.138,
    "inletPowerFactor":0.494,
    "inletActivePower":0.479,
    "inletApparentPower":0.970,
    "inletEnergyAccumulation":0.0
  }
]