SynLink CLI for Serial, SSH, and Telnet
Table of Contents
- Overview
- Navigating Command Line Interface
- List of Commands
Overview
SynLink Command Line Interface is a text based terminal shell which shows information and controls PDU functions.
Typing in commands from the list of commands, will provide further details and additional commands which can be appended to previous commands separated by spaces.
Access to SynLink Command Line Interface can be achieved with with SSH (Secure Shell), Telnet, or a local serial connection.
Examples
Following examples were run on model: SP-1001AIE-01
Instructions to access this Command Line Interface can be found here: Accessing CLI
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
}
]
Accessing CLI
Accessing CLI via SSH
Example Ubuntu/Debian OS
Execute the ssh
command with username and IP address separated by an @. A prompt for admin password will appear. Once properly authenticated, SynLink Shell Help Menu will appear.
$ ssh admin@192.168.1.100
The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
ECDSA key fingerprint is SHA256:VZMUnPw2MrIWR9y9pBbKlEzuWZRxJAo9bLMMUdsO/Jw.
Are you sure you want to continue connecting (yes/no)?
admin@192.168.1.100's password:
-----------------------
SynLink Shell Help Menu
-----------------------
Usage: [command] [options...]
Press Tab to autocomplete commands
Commands
[n]etwork Show and configure network info
[s]ystem Show and Configure PDU power, control, sensors, etc
[set]tings Manage PDU settings
[m]odem Access a connected modem
[l]ogs See various logs
ping [host] Send ping to specified host
[h]elp Returns this message
[ex]amples Common example commands
[exit] Exits SynLink Shell
SynLink>
Example Windows 10 OS
PuTTY is a useful tool which has an SSH Client. You can download PuTTY on their organization's website
Once downloaded open the application. The following screen will likely appear.
Under Host Name (or IP address)
you can add your username and IP address.
Example: admin@192.168.1.100
Accessing CLI via Telnet
Follows similar steps to SSH for Ubuntu/Debian Linux OS and Windows 10 OS
Example Ubuntu/Debian Linux OS
telnet admin@192.168.1.100
Example Windows 10 OS
Same steps as SSH, on PuTTY select telnet instead.
Accessing CLI via USB-Serial COM Port
Connect the provided USB type A to USB type A cord from the usb port labeled COM (not USB). Connect the other side of the cable to a computer running Windows, Linux, or MacOS.
Example Windows Vista/7/10 OS
If are using a Windows Computer to access the serial port. We recommend using PuTTY.
After connecting the PDU to your Computer. Open putty and choose the serial section like in the screenshot below.
The default baud rate (speed) is 115200. Identify your Serial Line (COM1 or COM2...) and click Open to start a command line interface with a SynLink Shell.
While inside, type help
to see a list of commands.
To identify your Serial Line On Separate Windows OS's read the following instructions.
Identify Serial Line on Windows Vista/7
- Click on Start Button on left corner of your screen
- Type:
devmgmt.msc
, and hit enter (To open the Device Manager) - Inside the Device Manager, look for a section called "Ports (COM & LPT)", and expand the section
- It should be listed as a USB Serial Port, the COM port number is show in parantheses beside the name ![windows7screenshot](https://i.imgur.com/jZ9Gntx.png =600x)
Identify Serial Line on Windows 10
- Access Device Manager
- Select "Show hidden devices" in View menu
- Look for "Com Ports" section.
- Check for the com ports inside that section.
Example Ubuntu/Debian OS
If you are using a Linux Ubuntu Machine, we use Minicom or Screen to access the device.
To install minicom
$ sudo apt-get install minicom
To identify the /dev
of the USB-Serial port you can use type dmesg
after the usb connection is made.
$ dmesg
Look for Manufacturer Synaccess LLC or Product: SynLink USB COM Port. You can find the /dev
device in the dmesg
output, in this example it is: ttyUSB0
Open a command line interface with minicom and identified serial device
Be sure to turn Hardware Flow Control off with 8N1 as the parity and bits. Default Baud rate is 115200.
$ sudo minicom -D /dev/ttyUSB0 -b 115200
While inside, type help
to see a list of commands.
Configuring Passwordless SSH Access with Keys
With proper permissions, a User may include SSH Public Keys and access SSH without any passwords.
Configure SSH Keys on the web interface in Settings -> Manage Users -> User section. /settings/users
.
Navigating Command Line Interface
Commands
help
command returns a help menu with possible commands. It is shown by default when logging on to the SynLink Command Line Interface (CLI)
help
SynLink> help
-----------------------
SynLink Shell Help Menu
-----------------------
Usage: [command] [options...]
Press Tab to autocomplete commands
Commands
[n]etwork Show and configure network info
[s]ystem Show and Configure PDU power, control, sensors, etc
[set]tings Manage PDU settings
[m]odem Access a connected modem
[l]ogs See various logs
ping [host] Send ping to specified host
[h]elp Returns this message
[ex]amples Common example commands
[exit] Exits SynLink Shell
system
system
command returns a list of commands to access system related subcategories.
outlets
or groups
commands only applies to PDUs with outlet current measurement or outlet switching capabilities.
SynLink> system
-----------
System Menu
-----------
Usage: system [command]
Commands:
[s]tatus Print status device, inlet, bank, and outlet status
[d]evice Print PDU Information and Versions
[b]anks Show and Configure Bank (Circuit) info
[i]nlets Show and Configure Inlet info
[o]utlets Show and Configure Outlet Info
[g]roups Show and Configure group related info
sensors Show and Configure sensor related info
system status
system status
command returns all system information related to inlets, circuit, and outlets.
The following example is from a 1U single phase, switched, and outlet monitored PDU
SynLink> system 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 # | 1360604425
Enclosure Serial # | 9826498
Inlet Configuration | standard
Mac Address | 3A:D2:21:D3:82:45
Form Factor | 1U
Phase | Single Phase
Device Time | 09/01/2012 - 05:15:24 UTC
Uptime | 678606 seconds
-----------------
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.80 V
Line Frequency | 60.14 W
Power Factor | 0.37
Active Power | 0.40 W
Apparent Power | 1.07 VA
-----------------
Banks Information
-----------------
Bank 1 Status
-------------------------------------
Bank Name | Bank 1
Lines Used | L-L/N
Energy Accumulation | 0.00 kWh
Current RMS | 0.01 A
Voltage RMS | 117.80 V
Line Frequency | 60.14 W
Power Factor | -0.37
Active Power | 0.40 W
Apparent Power | 1.07 VA
-------------------
Outlets Information
-------------------
--------------------------------------------------------------------
| ID | Name | State | Current | Apparent Power
--------------------------------------------------------------------
1 | 1-16777225 | Outlet 1 | ON | 0.16 A | 18.90 VA
2 | 2-16777225 | Outlet 2 | ON | 0.16 A | 18.93 VA
3 | 3-16777225 | Outlet 3 | ON | 0.16 A | 19.12 VA
4 | 4-16777225 | Outlet 4 | ON | 0.16 A | 18.91 VA
5 | 5-16777225 | Outlet 5 | ON | 0.17 A | 19.63 VA
6 | 6-16777225 | Outlet 6 | ON | 0.16 A | 19.15 VA
7 | 7-16777225 | Outlet 7 | ON | 0.16 A | 18.39 VA
8 | 8-16777225 | Outlet 8 | ON | 0.15 A | 18.02 VA
system device status
system device status
return device information.
SynLink> 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 # | 1360604425
Enclosure Serial # | 9826498
Inlet Configuration | standard
Mac Address | 3A:D2:21:D3:82:45
Form Factor | 1U
Phase | Single Phase
Device Time | 09/01/2012 - 05:19:19 UTC
Uptime | 678841 seconds
system device json
system device json
returns device information in json format
SynLink> system device json
{
"numBanks":1,
"numOutlets":4,
"numDryContactRelays":2,
"numInlets":1,
"inletPlug":"IEC-320 C20",
"outletPwrMeasurementsSupported":true,
"outletSwitchingSupported":true,
"enclosureSerialNumber":1000016,
"modelNumber":"5001AIE-0E",
"inletConfig":"standard",
"formFactor":"Compact",
"controllerSerialNumber":1359160329,
"controllerFirmwareVersion":"2.5.4",
"controllerHardwareVersion":"SP000005 1.17.0",
"phase":"Single Phase",
"circuitBreakerProtection":false,
"uptime":14500,
"time":"2021-07-06T15:08Z"
}
system device set
system device set
will return a list of configurations that can be set.
SynLink> system device set
---------------------
Device Configurations
---------------------
Usage: system device set [key] [value]
Key | Values | Desc
-----------------------------------------------------------------
device_name | TEXT | 100 char Limit
global_reboot_time | NUMBER | Min: 1 seconds, Max: 21600 seconds
system inlets status
system inlets status
return inlet information. Optional argument json
return the inlet information in a JSON format (system inlets json
).
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 | 118.00 V
Line Frequency | 60.19 W
Power Factor | 0.37
Active Power | 0.40 W
Apparent Power | 1.07 VA
system inlets set
SynLink> system inlets set
---------------------
Inlet Configurations
---------------------
Usage:
system inlets set [key] [inlet_id:optional] [value:optional]
Key | Values | Desc
-----------------------------------------------------------------
inlet_name | TEXT | User defined name for inlet
inlet_energy_accumulation | NONE | No Value necessary.
system banks status
system banks status
returns information of circuits/banks on PDU. Optional argument json
returns the bank(s) information in a JSON format (system banks json
).
SynLink> system banks status
-----------------
Banks Information
-----------------
Bank 1 Status
-------------------------------------
Bank Name | Bank 1
Lines Used | L-L/N
Energy Accumulation | 0.00 kWh
Current RMS | 0.02 A
Voltage RMS | 119.30 V
Line Frequency | 60.19 W
Power Factor | 0.64
Active Power | 1.77 W
Apparent Power | 2.76 VA
system banks set
system banks set
will return a list of configurations that can be set.
SynLink> system banks set
---------------------
Device Configurations
---------------------
Usage: system banks set [key] [bank_id:optional] [value:optional]
Key | Values | Desc
------------------------------------------------------
bank_name | TEXT | Prompts for bank_id and bank_name
system outlets status
system outlets status
returns outlet information. Optional argument json
returns outlet information in JSON format (system outlets json
)
SynLink> system outlets status
-------------------
Outlets Information
-------------------
----------------------------------------------------------------------
| ID | Name | State | Current | Apparent Power
----------------------------------------------------------------------
1 | 1-16777225 | Outlet 1 | ON | 0.16 A | 19.19 VA
2 | 2-16777225 | Outlet 2 | ON | 0.16 A | 19.04 VA
3 | 3-16777225 | Outlet 3 | ON | 0.16 A | 19.39 VA
4 | 4-16777225 | Outlet 4 | ON | 0.16 A | 19.05 VA
5 | 5-16777225 | Outlet 5 | ON | 0.17 A | 19.90 VA
6 | 6-16777225 | Outlet 6 | ON | 0.16 A | 19.28 VA
7 | 7-16777225 | Outlet 7 | ON | 0.16 A | 19.11 VA
8 | 8-16777225 | Outlet 8 | ON | 0.15 A | 18.15 VA
system outlets set
system outlets set
will return a list of configurations that can be set.
SynLink> system outlets set
---------------------
Outlet Configurations
---------------------
Usage:
system outlets set [Key] [outlet_id:optional] [Value:optional]
Description:
To choose an outlet from a list to turn off/on or power cycle:
system outlet set outlet_state
To change a specific outlet's state:
system outlet set outlet_state 1 off
system outlet set outlet_state 1 reboot
Key | Values | Desc
----------------------------------------------------------------
outlet_name | TEXT | 100 char limit
outlet_state | ON,OFF,RB | RB = reboot outlet/power cycle
custom_reboot_time_enabled | one,off | Custom reboot time for outlet
custom_reboot_time | SECONDS | Reboot time in seconds
power_up_state | ON,OFF,PREV | Outlet state when PDU boots up (cold boot)
system groups status
Show Outlet group information in human readable format. Print Outlet Group Info in JSON format by appending json
argument (system groups json
)
SynLink> system groups status
------------------------
Outlet Group Information
------------------------
1. Example Group Name
Total Current RMS: 0.81A (0.16A average for 5 outlets)
# | ID | Name | State | Current | Apparent Power
1 | 1-16777225 | Outlet 1 | ON | 0.16 A | 19.19 VA
2 | 2-16777225 | Outlet 2 | ON | 0.16 A | 19.04 VA
3 | 3-16777225 | Outlet 3 | ON | 0.16 A | 19.39 VA
4 | 4-16777225 | Outlet 4 | ON | 0.16 A | 19.05 VA
5 | 5-16777225 | Outlet 5 | ON | 0.17 A | 19.90 VA
------------------------------------------------------------------
2. Dell Poweredge Servers
# of Group Outlets: 3
Total Current RMS: 0.48A (0.16A average for 3 outlets)
# | ID | Name | State | Current | Apparent Power
2 | 2-16777225 | Outlet 2 | ON | 0.16 A | 19.04 VA
4 | 4-16777225 | Outlet 4 | ON | 0.16 A | 19.05 VA
5 | 5-16777225 | Outlet 5 | ON | 0.17 A | 19.90 VA
------------------------------------------------------------------
system groups set
Configure an individual outlet group.
SynLink> system groups set
---------------------------
Outlet Group Configurations
---------------------------
Usage:
system groups set [key] [group_id:optional] [value:optional]
Description:
Type "system groups status" to see a list of group ids or
Omit [group_id] AND [value] to be prompted for information.
Key | Values | Desc
------------------------------------------------------------
group_name | TEXT | 100 char limit
reboot_seq_delay | SECONDS | Waterfall timing for group outlet switching
group_state | ON,OFF,RB | Turn all outlets ON, OFF, or Power Cycle/Reboot
add_outlet | OUTLET_ID | Add this single outlet id to the outlet group
remove_outlet | OUTLET_ID | Remove this single outlet from the outlet group
system groups add
Create a brand new outlet group.
SynLink> system groups add
Usage:
system groups add [group_name:optional]
Description:
If group_name is included and has spaces, uses quotations to wrap the name "example group name". If group_name is not included the group name will be prompted for.
system groups remove
Remove a single outlet group.
SynLink> system groups remove
Usage:
system groups remove [group_id:optional]
Description:
If group_id is not included the group id will be prompted for. Find a list of group_ids with command system groups status
system sensors status
Print sensor information in human readable format. Print sensor information in JSON format by appending json
argument (system sensors json
).
SynLink> system sensors status
------------------
Sensor Information
------------------
-----------------------------------------
Port A - Temperature & Humidity Sensor
-----------------------------------------
Temperature (C) | 18.86 celsius
Temperature (F) | 66.01 fahrenheit
Humidity (RH) | 39.85 relative humidity
-----------------------------------------
-----------------------------------------
Port B - Disconnected
-----------------------------------------
No Sensor Found
-----------------------------------------
settings
settings
command returns a list of commands to change PDU settings
SynLink> settings
-------------
Settings Menu
-------------
Usage: settings [command]
Commands:
firmware Print options/info for firmware configurations
ports Print options for controller front panel ports
display Print options for front panel lcd display
settings firmware status
Return firmware information for PDU in human readable format.
SynLink> settings firmware status
-----------------------
SynLink Firmware Status
-----------------------
Controller Serial number | 1360604425
Controller Hardware Version | 1.17.0
Controller Firmware Version | 1.3.0
Enclosure Serial Number | 9826498
Subsystem Serial Numbers | 16777225, 16777226
Subsystem Hardware Versions | 1.0.0,1.0.0
Subsystem Firmware Versions | 1.1.0,1.1.0
settings firmware factory_reset
Issue factory reset from command line interface and proper permissions.
SynLink> settings firmware factory_reset
Are you sure you want to factory reset? You will lose all your configurations (y/n)> y
Please type "reset" and Enter to issue factory reset> reset
Issuing factory reset.
Controller module will restart. Your outlets will not change states.
settings firmware reboot
Restart SynLink Controller Module and any running services/processes. Your outlets will not change states. If your outlets are on, they will stay on. If your outlets are off, they will stay off.
SynLink> settings firmware reboot
Are you sure you want to reboot your Controller Module? Any active connections to SynLink services will be terminated (y/n)>y
Restarting SynLink Module now. You may lose connection.
settings ports status
SynLink> settings ports status
----------------
Port Information
----------------
Current Mode for Port A: Sensor
Port A COM mode baud rate: 115200 (not active)
Port A MODEM mode baud rate: 115200 (not active)
USB COM port baud rate: 115200
USB MODEM port baud rate: 115200
-----------------
Port Descriptions
-----------------
RJ45 Port labeled "A" can be configured to do one of three separate functions.
Port A can act as a sensor port and connected sensor accessories will properly pair.
Port A can act as a modem port and provide out of band access to a serial device, such as a modem.
Port A can act as a com port and allows access to this SynLink Command Line Interface with a connected host.
USB Port labeled "COM" provides serial access to the SynLink Command Line Interface
USB Port labeled "USB" can provide outlet of band access to a connected serial device, such as a modem.
settings ports set
See options to configure ports on front panel of SynLink controller.
RJ45 Port labeled "A" can be configured to do one of three separate functions.
Port A can act as a sensor
port and connected sensor accessories will properly pair.
Port A can act as a modem
port and provide out of band access to a serial device, such as a modem.
Port A can act as a com
port and allows access to this SynLink Command Line Interface with a connected host.
USB Port labeled "COM" provides serial access to the SynLink Command Line Interface
USB Port labeled "USB" can provide outlet of band access to a connected serial device, such as a modem.
SynLink> settings ports set
-------------------
Port Configurations
-------------------
Usage:
settings ports set [key] [value]
Key | Values | Desc
------------------------------------------------------------------------------------
port_a_mode | sensor,com,modem | change functionality of RJ45 port labeled: A
port_a_com_baud | BAUD_RATE | baud rate when port A is set to mode: com
port_a_modem_baud | BAUD_RATE | baud rate when port A is set to mode: modem
usb_com_port_baud | BAUD_RATE | baud rate for USB port labeled: COM
usb_modem_port_baud | BAUD_RATE | baud rate for USB port labeled: USB
Valid Baud rates: 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1200
settings display status
SynLink> settings display status
-------------------
Display Information
-------------------
Picture Settings
----------------
Orientation: Landscape
Brightness: 100%
Theme: Black
Screensaver Settings
--------------------
Screensaver Type: Power info
Screensaver Timeout: 60 seconds
Display Permissions
-------------------
Control Outlets with LCD display: Enabled
Change Network Settings with LCD Display: Enabled
Reboot Control Module with LCD Display: Disabled
Flush logs with LCD Display: Disabled
settings display set
SynLink> settings display set
----------------------
Display Configurations
----------------------
Usage:
settings display set [key] [value]
Key | Values | Desc
-----------------------------------------------------------------------------------
orientation | 0,90,180,270 | Degrees of rotation to rotate
brightness | 0,1,2,3,4,5,6,7 | 7 is brightest.
color_theme | COLOR | changes background color of display
screensaver | off,power | have screensaver show power info or nothing
screensaver_timeout | SECONDS | max timeout 3600 seconds.
enable_outlet_ctrl | ON,OFF | ON will allow outlet switching from lcd
enable_network_ctrl | ON,OFF | ON will allow network configuration from lcd
enable_lcd_reboot | ON,OFF | ON will allow reboot via lcd screen
enable_lcd_flush | ON,OFF | ON will allow flush system logs from lcd screen
Valid colors: black, blue, gray, green, magenta, maroon, navy, olive, orange, teal, purple
modem
modem
command returns a list of commands to connect/disconnect or see modem information
SynLink> modem
----------
Modem Menu
----------
Usage: modem [command]
Commands:
status Print current status of any modem connections/configurations
connect Print options to connect to
terminate Print options to terminate active connection if exists.
modem status
SynLink> modem status
-------------------
Serial Modem Status
-------------------
USB Modem Port: No Active Connection
Port A Port: Currently in sensor mode. No Active Connection.
modem connect
SynLink> modem connect
Usage:
modem connect [port:optional]
Ports | Availability | Description
-----------------------------------------------
usb | usb detected | USB port labeled: USB
port_a | unavailable | Set to modem mode to activate.
port> usb
Successfully Connected.
Use CTRL + X to stop the connection to the device.
modem terminate
SynLink> modem terminate
Usage:
modem terminate [port:optional]
Ports | Availability | Description
-----------------------------------------------
usb | in use | USB port labeled: USB
port_a | unavailable | Set to modem mode to activate.
port> usb
Successfully disconnected.
network
network
command returns a list of commands to access networking related subcategories. To see a general overview of networking configurations and status use command status
. Options to change configurations can be found within each subcategory.
SynLink> network
---------------------------
SynLink PDU Networking Menu
---------------------------
Usage: network [command] [options...]
Commands:
[s]tatus Print all network status and configurations
[r]estart Restart all networking related activity
[i]p Print options to show and configure PDU IP
[w]eb Print options to show and configure HTTP(S) Webserver
[ss]h Print options to show and configure SSH Server
[t]elnet Print options to show and configure Telnet Server
network status
SynLink> network status
IP Address Assignment: Static
-------------------
Static IP Address: 192.168.1.100
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
Webserver
---------------
Current Status: Currently Running
Availability: ENABLED
Webserver Port: 80
SSL Security Enabled
SSH Server
---------------
Current Status: Not Currently Running
Availability: ENABLED
SSH Port: 22
network ip restart
Restart all network related processes/services.
SynLink> network ip restart
Successfully restarted Network
network ip status
Show IP settings in human readable format.
SynLink> network ip status
----------------
Network Settings
----------------
IP Assignment | Static
Static IP Address | 192.168.1.220
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
network ip set
Show configurations to change for IP related settings.
SynLink> network ip set
-------------------------
Network IP Configurations
-------------------------
Usage: network ip set [key] [value]
Key | Values | Desc
----------------------------------------
ip_assign | static, dhcp |
static_ip | IP_ADDRESS |
subnet_mask | SUBNET_MASK |
gateway_ip | GATEWAY_IP_ADDR |
primary_dns | IP_ADDRESS |
secondary_dns | IP_ADDRESS |
network web status
Show web/http(s) settings in human readable format.
SynLink> network web status
-----------------
SynLink Webserver
-----------------
Current Status | Currently Running
Availability | ENABLED
Webserver Port | 80
SSL Security | ENABLED
Webserver HTTPS Port | 443
Basic Auth Enabled | DISABLED
HTTP to HTTPS Redirect | DISABLED
network web set
SynLink> network web set
------------------------
Webserver Configurations
------------------------
Usage: network webserver set [key] [value]
Key | Values | Desc
------------------------------------------
enabled | on, off |
http_port | PORT_NUM |
https_port | PORT_NUM |
ssl_enabled | on, off |
basic_auth_enabled | on, off | Allows passing username/password for API access (Insecure)
redirect_http | on, off | Redirects http requests to https when applicable
network ssh status
SynLink> network ssh status
------------------
SynLink SSH Server
------------------
Current Status | Currently Running
Availability | ENABLED
SSH Port | 22
Password Login | ENABLED
Key Based Login | ENABLED
Idle Timeout | No Timeout
network ssh set
SynLink> network ssh set
------------------
SSH Configurations
------------------
Usage: network ssh set [key] [value]
Key | Values | Desc
-----------------------------------------
enabled | on, off |
ssh_port | PORT_NUM |
idle_timeout | SECONDS | 0 - no timeout
disable_keys | on, off | While on, key based entry not allowed
disable_pass | on, off | While On, password based entry not allowed
network telnet status
SynLink> network telnet status
---------------------
SynLink Telnet Server
---------------------
Current Status | Currently Running
Availability | ENABLED
Telnet Port | 23
network telnet set
SynLink> network telnet set
---------------------
Telnet Configurations
---------------------
Usage: network telnet set [key] [value]
Key | Values | Desc
-----------------------------------------
enabled | on, off |
telnet_port | PORT_NUM |
List of Commands
[s]ystem Print options for PDU power, control, sensors, etc
[s]tatus Print status device, inlet, bank, and outlet status
[d]evice Print options to view/edit PDU Information
status Print device configurations and related info
json Print device configurations and related info in json format
set See configuration options to change AutoPing Reboot Settings
device_name Name for device which shows up on network searches
global_reboot_time Default number of seconds power cycles will cycle for outlet reboots
[i]nlets Print options for Inlet information
status Print inlet configurations and info
json Print inlet configurations and info in JSON format
set See configuration options to change inlet settings
inlet_name User defined name for inlet
energy_accumulation Reset Energy accumulation (kWh). No Value necessary.
[b]anks Print options for Bank (Circuit) info
status Print Power Stats, Energy Stats, and Overload Protection Info for bank(s)
json Print Power Stats, Energy Stats, and Overload Protection Info for bank(s) in json format
set See options to configure each bank
bank_name Prompts for bank_id and bank_name
[o]utlets Print options for Outlet Info
status Print Outlet configurations and related info
json Print Outlet configurations and related info in JSON format
set See options to configure individual outlets
outlet_name Change outlet name for a specified outlet
outlet_state Change outlet relay state to specified state
power_up_state Change power on state for specified outlet
custom_reboot_time_enabled Configures outlet to use custom reboot time instead of global reboot time
custom_reboot_time Number of seconds to reboot when custom reboot time is enabled
[g]roups Print options for configuring and showing group related info
status Print relevant information about outlet groups and their power consumption
json Print relevant information about outlet groups and their power consumption in JSON format
add Prompts for group name, and which outlets to include
set Prints a list of group names, and prompts to select one, then prompts for setting to change
group_name Change group name for a specified group.
reboot_seq_delay Waterfall timing for group outlet switching
group_state Turn all outlets ON, OFF, or Power Cycle/Reboot
add_outlet Add this single outlet id to the outlet group
remove_outlet Remove this single outlet from the outlet group
remove Prints a list of group names, and prompts to select one to remove forever
sensors Print options for configuring and showing sensor related info
status Print relevant information about any attached sensors
json Print relevant information about any attached sensors in JSON format
[n]etwork Print options to show and configure network info
status Print all network status and configurations
restart Restart all networking related activity.
ip Print options to show and configure PDU IP
status Show current status and configurations for IP
set See configuration options to change IP settings
ip_assign Choosing DHCP will have DHCP Server at 'gateway_ip' assign IP address to PDU
static_ip IP Address that unit will respond to if ip_assign is set to 'dhcp'
subnet_mask Subnet Mask that divides the IP address into network address and host address
gateway_ip IP Address for forwarding host (router) to other networks
primary_dns Default DNS Server from Google
secondary_dns Default Secondary DNS Server from Google
web Print options to show and configure HTTP(S) Webserver
status Show current status and configurations for HTTP(S) Webserver
set See configuration options to change HTTP(S) Webserver settings
enabled Turns on or off HTTP(S) Server
http_port Port to reach HTTP Webserver
https_port Port to reach HTTPS Webserver
ssl_enabled Enforces SSL certificate for HTTPS
basic_auth_enabled Enable or disable username-password access access to HTTP(S). WARNING: Insecure
redirect_http Specifies if HTTP requests will be forwarded to HTTPS
ssh Print options to show and configure ssh info
status Show current status and configurations for SSH Server
set See configuration options to change SSH settings
enabled Turns on or off SSH Server
ssh_port Port to reach SSH Server
idle_timeout Number seconds before SSH Server auto disconnects
disable_pass Disable password logins for SSH
disable_keys Disable key based Login for SSH
telnet Print options to show and configure telnet info
status Show current status and configurations for Telnet Server
set See configuration options to change Telnet settings
telnet_port Port to reach Telnet Server
enabled Turns on or off Telnet Server
[se]ttings Print all SynLink settings to manage
firmware Print options for managing PDU Firmware.
status Prints current firmware versions for any connected banks, controller, hardware versions, and firmware history.
factory_reset Reset all configuration to factory default
reboot Restart SynLink Controller Module. Your outlets will not change state.
ports Print current status or change configurations for port on SynLink Controller Module
status Print status and configuration of all ports on your SynLink Controller module.
set Print options to set for port related configurations
port_a_mode Options: sensor, com, modem. COM: access serial SynLink CLI. Modem: out of band access to a serial device.
port_a_com_baud Baud rate for RJ45 modem port in COM mode. Options: 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200
port_a_modem_baud Baud rate for RJ45 modem port in MODEM mode. Options: 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200
usb_com_port_baud Baud rate for USB-serial port (labeled COM) in COM mode. Options: 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200
usb_modem_port_baud Baud rate for USB port (labeled USB) in MODEM mode. Options: 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200.
usb_fw_update Enable or disable usb firmware update
display Print options to configure local LCD screen
status Print current LCD Configuration and status
set See configuration options to change LCD settings
orientation Rotate screen between 90, 180, 270, and 0/360 deg
brightness Change brightness of LCD
color_theme Changes background color of LCD screen
screensaver Defines which type of content displays on LCD screen during screensaver
screensaver_timeout Number of seconds before screensaver is enabled
enable_outlet_ctrl Allow controlling of outlet relays (if applicable) through front panel LCD
enable_network_ctrl Allow changing of IP assignment/Address through front panel LCD
enable_lcd_reboot Allow rebooting SynLink Controller Module from LCD
enable_lcd_flush Allow flushing system logs from LCD screen
[m]odem Print options for managing/connecting to ports configured as modem mode.
status Print status and configurations of any relevant ports for modem mode.
connect Create active connection from specified modem port and the connected serial device.
usb Connect to USB port if modem mode is active.
port_a Connect to RJ45 port A if modem mode is active.
terminate Terminate active connection from specified modem port and connected serial device.
usb Disconnect USB port if modem mode is active and a device is connected.
port_a Disconnect Port A if modem mode is active and a device is connected.
help Print help menu with top level list of commands.
SSH Scripting
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 admin@192.168.1.100 "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 admin@192.168.1.100 "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 admin@192.168.1.100 "system device status json" | jq .modelNumber
"1001AIE-01"
Serial Scripting
The following examples use Ubuntu 18.04 Linux OS and the USB-Serial COM Port on SynLink Controller
Device file is identified as /dev/ttyUSB0 with dmesg
Get tty configuration:
stty -F /dev/ttyUSB0
Change baud rate:
stty -F /dev/ttyUSB0 115200
Write to Serial Port:
echo "system status" > /dev/ttyUSB0
Read from Serial Port:
cat /dev/ttyUSB0
Set Outlet Off
Configure tty with appropriate configurations beforehand
Identify outlet ID beforehand by printing list of outlets: system outlet status
Requires pre login to be able to issue commands.
user@host:~$ echo "system outlet set outlet_state 1-100001 OFF" > /dev/ttyUSB0
or
user@host:~$ sudo sh -c "echo 'system outlet set outlet_state 1-100001 OFF' >> /dev/ttyUSB0"