Device Management
Device Status
Section titled “Device Status”show version
Section titled “show version”[Command]
show version
[Purpose]
Show system version
[View]
System view
[Notes]
This command displays version information including: software, description, kernel, create, and image.
[Use Cases]
sonic# show versionSONiC Software Version: SONiC.V6.1R0100P03-20250729.190136SONiC OS Version: 12Distribution: Debian 12.11Kernel: 6.1.67Build commit: 9e1c6a61cfBuild date: Tue Jul 29 11:19:17 UTC 2025Built by: jenkins@c108d77f6c16Platform: arm64-asterfusion_et2500-r0Device: ET2500-SWPASIC: vppASIC Count: 1Serial Number: N/AModel Number: ET2508-PoE-ACHardware Revision: N/AUptime: 03:42:20 up 16:05, 2 users, load average: 7.08, 7.18, 7.25Date: Wed 30 Jul 2025 03:42:20 AM
show platform fan
Section titled “show platform fan”[Command]
show platform fan
[Purpose]
View fan information
[View]
System view
[Use Cases]
sonic# show platform fanFAN Speed Direction Presence Status Timestamp----- ------- ----------- ---------- -------- -----------------FAN1 6840RPM exhaust Present OK 20250604 09:52:39FAN2 6780RPM exhaust Present OK 20250604 09:52:39
Description of the show platform fan command output
Parameter | Description |
Speed | Fan speed |
Direction | Fan wind direction exhaust:Blowing wind outward inhaust:Inward air suction |
Presence | Is the fan in place |
Status | Fan Status |
Timestamp | Get the time of the current state |
show platform psu-status
Section titled “show platform psu-status”[Command]
show platform psu-status
[Purpose]
View power status
[View]
System view
[Notes]
OK In place and properly powered
NOT OK In place but no power supply
NOT PRESENT Not in position
[Use Cases]
sonic# show platform psu-status
show platform summary
Section titled “show platform summary”[Command]
show platform summary
[Purpose]
View hardware platform information
[View]
System view
[Use Cases]
sonic# show platform summary
show platform temperature
Section titled “show platform temperature”[Command]
show platform temperature
[Purpose]
View hardware platform information
[View]
System view
[Notes]
temp_lm75 Ambient temperature
temp_tmp400 CPU temperature
[Use Cases]
sonic# show platform temperature
show image
Section titled “show image”[Command]
show image
[Purpose]
Display the system’s installed firmware
[View]
System view
[Use Cases]
sonic# show imageCurrent: SONiC-OS-1.0Next: SONiC-OS-1.0Available:SONiC-OS-1.0SONiC-OS-1.0T18
show feature state
Section titled “show feature state”[Command]
show feature state
[Purpose]
Check if the feature is enabled
[View]
System view
[Notes]
The processes related to all features on the current system are running in the corresponding containers, and the corresponding containers will be started after the feature is enabled. The containers in the always_enabled state are not allowed to be closed.
[Use Cases]
sonic# show feature statusFeature State AutoRestart SetOwner----------- -------------- -------------- ----------bgp enabled enableddatabase always_enabled always_enableddhcp_relay enabled enabled localdhcp_server disabled enabled localdot1x enabled enablediccpd disabled enabledl2mcd disabled enabledlldp enabled enabledmstpd disabled enablednat enabled enabledpmon enabled enabledptp disabled enabledradv enabled enabledsflow disabled enabledslad enabled enabledsnmp enabled enabledsnooping enabled enabledswss enabled enabledsyncd enabled enabledteamd enabled enabled
show ztp
Section titled “show ztp”[Command]
show ztp
[Purpose]
Display ZTP execution results
[View]
System view
[Use Cases]
sonic# show ztpZTP Admin Mode : TrueZTP Service : InactiveZTP Status : FAILEDZTP Source : dhcp-opt67 (Ethernet10)Runtime : 23m 16sTimestamp : 2024-06-20 09:03:04 UTCZTP Service is not runningconfigdb-json: SUCCESSupload-log: FAILED
show ztp verbose
Section titled “show ztp verbose”[Command]
show ztp verbose
[Purpose]
Display detailed ZTP execution results
[View]
System view
[Use Cases]
sonic# show ztp verboseCommand: ztp status --verbose========================================ZTP========================================ZTP Admin Mode : TrueZTP Service : InactiveZTP Status : FAILEDError : upload-log FAILEDZTP Source : dhcp-opt67 (Ethernet10)Runtime : 23m 16sTimestamp : 2024-06-20 09:03:04 UTCZTP JSON Version : 1.0ZTP Service is not running----------------------------------------configdb-json----------------------------------------Filename : ftp://teraspek:teraspek@150.1.0.1/POAM_CFG/aster666.jsonStatus : SUCCESSRuntime : 17sTimestamp : 2024-06-20 08:59:19 UTCExit Code : 0Ignore Result : False----------------------------------------upload-log----------------------------------------Status : FAILEDRuntime : 03m 45sTimestamp : 2024-06-20 09:03:04 UTCExit Code : 20Error : Plugin failedIgnore Result : False
show system memory-usage
Section titled “show system memory-usage”[Command]
show system memory-usage
[Purpose]
Display the current memory usage of the device
[View]
System view
[Notes]
When the device’s memory usage exceeds 80%, executing this command will display the top 10 processes by memory usage
[Use Cases]
sonic# show system memory-usageMemory usage:65.1%+-----------+-----------+----------+-----------+--------------+-------------+| total | used | free | shared | buff/cache | available ||-----------+-----------+----------+-----------+--------------+-------------|| 15.00(GB) | 10.00(GB) | 5.60(GB) | 46.00(MB) | 2.20(GB) | 5.50(GB) |+-----------+-----------+----------+-----------+--------------+-------------++---------------+---------------+---------------+-------------+--------------+---------------+
show system cpu-usage
Section titled “show system cpu-usage”[Command]
show system cpu-usage
[Purpose]
Display the current CPU usage of the device.
[View]
System view
[Notes]
When the device’s CPU usage exceeds 80%, executing this command will display the top 10 processes by CPU usage.
[Use Cases]
sonic# show system cpu-usageCpu usage:76.7%+-----------------+-------------------+-----------+| user usage(%) | kernel usage(%) | free(%) ||-----------------+-------------------+-----------|| 75.5 | 1.3 | 23.1 |+-----------------+-------------------+-----------+
show system disk-usage
Section titled “show system disk-usage”[Command]
show system disk-usage
[Purpose]
Display the current disk utilization of the device.
[View]
System view
[Notes]
When the device’s disk utilization exceeds 80%, executing this command will display the major files occupying disk space.
[Use Cases]
sonic# show system disk-usageDisk usage:20.1%+-----------+----------+-----------+| total | used | free ||-----------+----------+-----------|| 27.94(GB) | 5.60(GB) | 22.32(GB) |+-----------+----------+-----------+
Device Configuration
Section titled “Device Configuration”hostname
Section titled “hostname”[Command]
hostname hostname
[Purpose]
Modify the device host name
[Parameter]
hostname Host name
[View]
System view
[Notes]
The hostname can be named with a maximum of 64 characters and can only contain ”.” , ”-”, “a-z”, “A-Z” and “0-9”.
It cannot start and end with ”.”, ”-”, and ”..” cannot appear. After modification, you need to save the configuration manually and log out to take effect again.
[Use Cases]
sonic# hostname sonic-226
NTP Configuration
Section titled “NTP Configuration”NTP(Network Time Protocol),is a protocol used to synchronize the time of individual computers in a network.
show ntp
Section titled “show ntp”[Command]
show ntp
[Purpose]
Show NTP information
[View]
System view
[Use Cases]
sonic# show ntpremote refid st t when poll reach delay offset jitter==============================================================================*10.250.0.240 203.107.6.88 3 u 46 64 377 0.165 10.575 3.198
ntp server
Section titled “ntp server”[Command]
ntp server ip-address [prefer]
no ntp server ip-address
[Purpose]
Configure NTP server
[Parameter]
ip-address NTP server ip address
[View]
System configuration view
[Use Cases]
sonic(config)# ntp server 10.250.0.242
ntp source-interface interface
Section titled “ntp source-interface interface”[Command]
ntp source-interface interface-name [vrf {default|mgmt}]
no ntp source-interface interface
[Purpose]
Specify the NTP source interface
[View]
System configuration view
[Notes]
Configuring the local source interface for sending/receiving NTP packets can help avoid using IP addresses from other interfaces on this device as the destination address for response packets.
[Use Cases]
sonic(config)# ntp source-interface Ethernet1 vrf default
System Time Configuration
Section titled “System Time Configuration”show clock
Section titled “show clock”[Command]
show clock
[Purpose]
Display time zone and time
[View]
System view
[Use Cases]
sonic# show clock
show supported-timezones
Section titled “show supported-timezones”[Command]
show supported-timezones
[Purpose]
Display the time zones supported by the system configuration
[View]
System view
[Use Cases]
sonic# show supported-timezones
clock datetime date_string time_string
Section titled “clock datetime date_string time_string”[Command]
clock datetime date_string time_string
[Purpose]
Configure system time
[Parameter]
date_string Date value, YY-MM-DD format
time_string Time value, HH:MM:SS format
[View]
System configuration view
[Usage Scenario]
When preparing to deploy a device, it’s essential to configure the system time of the device to the current actual time. This ensures that the device’s logs and alarm messages accurately reflect the timestamp of events. The device often comes with an arbitrary system time when it leaves the factory, which doesn’t represent the actual time.
[Use Cases]
sonic# configuresonic(config)# clock datetime 2022-02-22 20:30:30
clock timezone zone
Section titled “clock timezone zone”[Command]
clock timezone zone
no clock timezone
[Purpose]
Configure the system time zone, the default time zone is UTC
[Parameter]
zone Timezone
[View]
System view
[Use Cases]
sonic# configuresonic(config)# clock timezone Asia/Shanghai
POE Configuration
Section titled “POE Configuration”show interface poe
Section titled “show interface poe”[Command]
show interface poe
[Purpose]
Display interface POE information
[View]
System view
[Use Cases]
sonic# show interface poe
show interface poe diagnose
Section titled “show interface poe diagnose”[Command]
show interface poe diagnose
[Purpose]
Display interface POE initialization information
[View]
System view
[Usage Scenario]
This command displays information including POE hardware version, POE status, current POE temperature, alarm temperature, and the number of internal POE resets.
[Notes]
If the command results in a “device busy” message, it is normal. This indicates that the system is currently retrieving POE power information. Simply reissue the command to get the results.
[Use Cases]
sonic# show interface poe diagnosePSE device information:field value----------------- ------------------------------------version 0x4a02status OK Expected PoE device Found (Zone1)eventtemperature 48 Ctemperature-alarm 110 Creset-count 0initialized TruePSE wrong port map:Interface Current Id Expect Id----------- ------------ -----------
poe enable
Section titled “poe enable”[Command]
poe enable
no poe enable
[Purpose]
Enable POE power supply function of the interface
[View]
Interface view
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# poe enable
poe delay time
Section titled “poe delay time”[Command]
poe-delay time no poe-delay
[Purpose]
Configure the delayed start time of the interface POE function
[Parameter]
time Range of values:0-3600
[View]
Interface view
[Usage Scenario]
This command is used to delay the activation of Power over Ethernet (PoE) power supply on an interface based on actual usage requirements. When the uplink link state stabilizes, and the protocols are running correctly, PoE power is supplied to the connected PoE devices. This delay mechanism is useful for ensuring that PoE devices receive power only when the network is stable and ready to support them.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# poe delay 300
poe max-power POWER
Section titled “poe max-power POWER”[Command]
poe max-power POWER
no poe max-power
[Purpose]
Configure the maximum output power of the device
[Parameter]
POWER The unit is: w
[View]
System configuration view
[Notes]
By default, the maximum output power of a device is the power actually provided by the device. Therefore, the configured maximum output power must be lower than or equal to the total power of PoE power modules.
[Use Cases]
sonic(config)# poe max-power 60
poe priority { low/high/critical }
Section titled “poe priority { low/high/critical }”[Command]
poe priority { low/high/critical }
[Purpose]
Configure the power priority of a PoE interface
[Parameter]
critical Indicates the highest priority
high Indicates the second highest priority
low Indicates the lowest priority
[View]
System configuration view
[Notes]
When the output power of a device is insufficient, the device in automatic power management mode provides power for the interfaces of the higher power supply priorities first and cuts off power of the interfaces of the lower power supply priorities. PoE switches provide power to PDs connected to the interfaces in the sequence in which PDs are connected to them.
By default, the power supply priority of an interface is low.
[Use Cases]
sonic(config)# interface ethernet 4sonic(config-if-4)# poe priority high
time-range name from date-stop to date-start
Section titled “time-range name from date-stop to date-start”[Command]
time-range name from date-stop to date-start
no time-range name
[Purpose]
Configure PoE power-off time range
[Parameter]
name Specifies the name of a time range
date-stop Specify the stop time of a time range, the format is hh:mm
date-start Specify the start time of a time range, the format is hh:mm
[View]
System configuration view
[Use Cases]
sonic(config)# time-range test from 12:00 2022-01-01 to 16:00 2023-01-01
time-range name date-stop to date-start day
Section titled “time-range name date-stop to date-start day”[Command]
time-range name date-stop to date-start day
no time-range name
[Purpose]
Configure PoE power-off time range
[Parameter]
Specifies the name of a time range | |
Specify the stop time of a time range, the format is hh:mm | |
Specify the start time of a time range, the format is hh:mm | |
Specifies the date on which the time range takes effect A weekday includes Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday The value "Daily" indicates that the time range takes effect during the seven days in a week The value "off-day" indicates that the time range takes effect on weekends including Saturday and Sunday The value "Working-day" indicates that the time range takes effect in five days from Monday to Friday |
[View]
System configuration view
[Use Cases]
sonic(config)# time-range test 00:00 to 23:59 off-day
poe power-off time-range name
Section titled “poe power-off time-range name”[Command]
poe power-off time-range name
no poe power-off time-range name
[Purpose]
Configure PoE power-off time range effective on an interface
[View]
Interface view
[Use Cases]
sonic(config)# interface ethernet 48sonic(config-if-48)# poe power-off time-range testWarning: This operation may power off some PD. Continue?[Y/N]: y
poe legacy-detect enable
Section titled “poe legacy-detect enable”[Command]
poe legacy-detect enable
poe legacy-detect disable
[Purpose]
Enable device power supply compatibility detection for PD devices.
[View]
interface view
[Usage Scenario]
Enable compatibility detection for PD devices, allowing the device to detect PD devices that do not comply with the 802.3af or 802.3at standards and supply power to these PD devices. If the compatibility check for PD devices is not enabled, the device will not recognize non-standard PD devices and will be unable to supply power to them.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# poe legacy-detect disable
poe reinitialize
Section titled “poe reinitialize”[Command]
poe reinitialize
[Purpose]
Initialize POE feature
[View]
System configuration view
[Usage Scenario]
If the device has not been initialized for POE at the factory, this command can be used for manual initialization. After executing this command, a device reboot is not required, but all POE functionalities will be automatically disabled. Once initialization is complete, POE will be enabled again
[Use Cases]
sonic(config)# poe reinitialize
show crm summary
Section titled “show crm summary”[Command]
show crm summary
[Purpose]
Display the summary information of CRM configuration
[View]
System view
[Usage Scenario]
When you want to view the resource statistics polling time configuration, you can do so by executing this command.
[Use Cases]
sonic# show crm summaryPolling Interval: 300 second(s)
show crm thresholds {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}
Section titled “show crm thresholds {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}”[Command]
show crm thresholds {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}
[Purpose]
Display the threshold configuration of the CRM
[Parameter]
Parameter | Description |
---|---|
acl | Display the threshold configuration information of ACL-related resources, including counter, entry, group and table |
all | Display the threshold configuration information of all resources |
dnat | Display the threshold configuration information of the dnat resource |
fdb | Display the threshold configuration information of the fdb resource |
IPv4 | Display the threshold configuration information of ipv4 resources, including neighbor, nexthop, and route |
IPv6 | Display the threshold configuration information of ipv6 resources, including neighbor, nexthop, and route |
nexthop group | Display the threshold configuration information of the next-hop group resources, including member and object |
snat | Display the threshold configuration information of the snat resource |
[View]
System view
[Usage Scenario]
When you want to view the threshold configuration of different types of resources, you can do so by executing this command.
[Use Cases]
sonic# show crm thresholds all
show crm resources {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}
Section titled “show crm resources {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}”[Command]
show crm resources {acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}
[Purpose]
Display the resource information monitored by CRM
[Parameter]
Parameter | Description |
---|---|
acl | Display the threshold configuration information of ACL-related resources, including counter, entry, group and table |
all | Display the threshold configuration information of all resources |
dnat | Display the threshold configuration information of the dnat resource |
fdb | Display the threshold configuration information of the fdb resource |
IPv4 | Display the threshold configuration information of ipv4 resources, including neighbor, nexthop, and route |
IPv6 | Display the threshold configuration information of ipv6 resources, including neighbor, nexthop, and route |
nexthop group | Display the threshold configuration information of the next-hop group resources, including member and object |
snat | Display the threshold configuration information of the snat resource |
[View]
System view
[Usage Scenario]
When you want to view information about different types of resources, you can do so by executing this command.
[Use Cases]
sonic# show crm resources all
show crm-resource configuration
Section titled “show crm-resource configuration”[Command]
show crm-resource configuration
[Purpose]
Display the configuration of CRM statistical history information
[View]
System view
[Usage Scenario]
When you want to view the configuration of resource statistics history information, you can do so by executing this command.
[Use Cases]
sonic# show crm-resource configuration
show crm-resource history {all|type{acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}}
Section titled “show crm-resource history {all|type{acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}}”[Command]
show crm-resource history {all|type{acl {counter|entry|group|table}|all|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat}}
[Purpose]
Display the historical resource information of CRM statistics
[Parameter]
Parameter | Description |
---|---|
all | Display historical statistical information of all types of resources |
type | Display historical statistical information of different types of resources, including acl, dnat, fdb, ipv4, ipv6, nexthop and snat |
[View]
System view
[Usage Scenario]
When you want to view the historical statistics of various types of resources, you can do so by executing this command.
[Use Cases]
sonic# show crm-resource history all
crm polling interval interval
Section titled “crm polling interval interval”[Command]
crm polling interval interval
[Purpose]
Configure the CRM polling interval
[Parameter]
Parameter | Description |
---|---|
intervarl | Value range: 1-9999, unit: seconds |
[View]
System configuration view
[Usage Scenario]
When adjusting the polling time for resource statistics, you can configure it by executing this command.
[Use Cases]
sonic# configure terminalsonic(config)# crm polling interval 10
crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} type {percentage|used|free}
Section titled “crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} type {percentage|used|free}”[Command]
crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} type {percentage|used|free}
[Purpose]
Configure the threshold type of CRM statistical resources
[Parameter]
Parameter | Description |
---|---|
percentage/used/free | The resource types are respectively percentage, the number of used items and the number of available items |
[View]
System configuration view
[Usage Scenario]
When adjusting the threshold types for statistics of various types of resources, you can configure them by executing this command.
[Use Cases]
sonic# configure terminalsonic(config)# crm thresholds fdb type used
crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} {high|low} crm threshold
Section titled “crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} {high|low} crm threshold”[Command]
crm thresholds {acl {{group}{counter|entry}|table}|dnat|fdb|{ipv4|ipv6} {neighbor|nexthop|route}|nexthop group {member|object}|snat} {high|low} crm threshold
[Purpose]
Configure the threshold for CRM statistical resources
[Parameter]
Parameter | Description |
---|---|
high/low | The maximum and minimum values of the resource statistics threshold |
crm threshold | Resource statistics threshold, value range: 0-65535 |
[View]
System configuration view
[Usage Scenario]
When adjusting the thresholds for statistics of various types of resources, you can configure them by executing this command.
[Use Cases]
sonic# configure terminalsonic(config)# crm thresholds ipv4 neighbor high 85
crm history frequency frequency
Section titled “crm history frequency frequency”[Command]
crm history frequency frequency
[Purpose]
Configure the frequency of CRM statistics on historical resource information and use it in conjunction with the polling time
[Parameter]
Parameter | Description |
---|---|
frequency | Historical resource statistics frequency, value range: 1-9999 seconds |
[View]
System configuration view
[Usage Scenario]
When adjusting the frequency of statistical historical resource information, this command can be executed to configure it.
[Use Cases]
sonic# configure terminalsonic(config)# crm history frequency 10
crm history max max
Section titled “crm history max max”[Command]
crm history max max
[Purpose]
Configure the maximum number of record entries for historical resource information statistics in CRM
[Parameter]
Parameter | Description |
---|---|
max | Value range: 1 to 100 items |
[View]
System configuration view
[Usage Scenario]
When adjusting the maximum number of entries for statistical historical resource information records, this command can be executed to configure it.
[Use Cases]
sonic# configure terminalsonic(config)# crm history max 20