Skip to content
Ask AI

Device Information

[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]

admin@sonic:~$ show version
SONiC Software Version: SONiC.AsterNOS-V5.2R001T001-dirty-20220807.083641
Distribution: Debian 9.13
Kernel: 5.10.34-asternos
Build commit: f1376ee06
Build date: Sun Aug 7 12:45:57 UTC 2022
Built by: aster@arm64-compile-server
Platform: arm64-asterfusion_gesp1u_4y48x_1_s-r0
HwSKU: X204Y-48S-M
ASIC: marvell
Serial Number: F020015A003
Uptime: 06:47:53 up 41 min, 7 users, load average: 0.24, 0.37, 0.35
Docker images:
...

[Command]

show platform fan

[Purpose]

View fan information

[View]

System view

[Use Cases]

sonic# show platform fan
FAN Speed Direction Presence Status Timestamp
----- ------- ----------- ---------- -------- -------------------
FAN1 8625RPM exhaust Present OK 2022-08-18 08:59:45
FAN2 8715RPM exhaust Present OK 2022-08-18 08:59:45
FAN3 8580RPM exhaust Present OK 2022-08-18 08:59:45
FAN4 8715RPM exhaust Present OK 2022-08-18 08:59:45
Description of the **show platform fan** command output
ItemDescription
SpeedFan speed
DirectionFan wind direction exhaust:Blowing wind outward inhaust:Inward air suction
PresenceIs the fan in place
StatusFan Status
TimestampGet the time of the current state

[Command]

show platform psu-status

[Purpose]

View power status

[View]

System view

ItemDescription
OKIn place and properly powered
NOT OKIn place but no power supply
NOT PRESENTNot in position

[Use Cases]

sonic# show platform psu-status
PSU Status
----- -----------
PSU 1 OK
PSU 2 NOT OK

[Command]

show platform summary

[Purpose]

View hardware platform information

[View]

System view

[Use Cases]

sonic# show platform summary
Platform: arm64-asterfusion_x206y_48t_ma-r0
HwSKU: CX206Y-48GT-HPW4-M
ASIC: marvell

[Command]

show platform temperature

[Purpose]

View hardware platform information

[View]

System view

[Use Cases]

sonic# show platform temperature

[Command]

show image

[Purpose]

Display the system’s installed firmware

[View]

System view

[Use Cases]

sonic# show image
Current: SONiC-OS-HEAD.0-51e434286
Next: SONiC-OS-HEAD.0-51e434286
Available:
SONiC-OS-HEAD.0-51e434286
SONiC-OS-HEAD.0-7ecdef796

[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 state
Feature State
--------------- --------------
lldp enabled
pmon always_enabled
snooping always_enabled
dhcp_relay always_enabled
database always_enabled
snmp disabled
dot1x disabled
bgp always_enabled
radv always_enabled
proxy always_enabled
mstpd disabled
web-server disabled
teamd always_enabled
syncd always_enabled
ucentral-client disabled
swss always_enabled
slad always_enabled

[Command]

show ztp

[Purpose]

Display ZTP execution results

[View]

System view

[Use Cases]

sonic# show ztp
ZTP Admin Mode : True
ZTP Service : Inactive
ZTP Status : FAILED
ZTP Source : dhcp-opt67 (Ethernet10)
Runtime : 23m 16s
Timestamp : 2024-06-20 09:03:04 UTC
ZTP Service is not running
configdb-json: SUCCESS
upload-log: FAILED

[Command]

show ztp verbose

[Purpose]

Display detailed ZTP execution results

[View]

System view

[Use Cases]

sonic# show ztp verbose
Command: ztp status --verbose
========================================
ZTP
========================================
ZTP Admin Mode : True
ZTP Service : Inactive
ZTP Status : FAILED
Error : upload-log FAILED
ZTP Source : dhcp-opt67 (Ethernet10)
Runtime : 23m 16s
Timestamp : 2024-06-20 09:03:04 UTC
ZTP JSON Version : 1.0
ZTP Service is not running
----------------------------------------
configdb-json
----------------------------------------
Filename : ftp://teraspek:teraspek@150.1.0.1/POAM_CFG/aster666.json
Status : SUCCESS
Runtime : 17s
Timestamp : 2024-06-20 08:59:19 UTC
Exit Code : 0
Ignore Result : False
----------------------------------------
upload-log
----------------------------------------
Status : FAILED
Runtime : 03m 45s
Timestamp : 2024-06-20 09:03:04 UTC
Exit Code : 20
Error : Plugin failed
Ignore Result : False

[Command]

show environment powers

[Purpose]

Display power supply details

[View]

System view

[Use Cases]

sonic# show environment powers
PSU_STATUS:
PSU1:
model: G1251-055
Input Voltage: +233.00 V
Output Voltage: +12.07 V
Fan Speed: 4136 RPM
Temperature: +35.3 C
Input Power: 38.06 W
Output Power: 30.44 W
Input Current: +0.21 A
Output Current: +2.52 A (max = +45.00 A)
PSU2:
model: G1251-055
Input Voltage: +0.00 V
Output Voltage: +0.00 V
Fan Speed: 0 RPM
Temperature: +29.9 C
Input Power: 0.00 W
Output Power: 0.00 W
Input Current: +0.00 A
Output Current: +0.00 A (max = +45.00 A)

[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-usage
+------------------+
| Memory usage % |
|------------------|
| 53.1 |
+------------------+
+---------------+---------------+---------------+-------------+--------------+---------------+
| total | used | free | shared | buff/cache | available |
|---------------+---------------+---------------+-------------+--------------+---------------|
| 4186353664(B) | 2125402112(B) | 1292824576(B) | 19099648(B) | 768126976(B) | 1962168320(B) |
| 3.90(GB) | 1.98(GB) | 1.20(GB) | 18.21(MB) | 732.54(MB) | 1.83(GB) |
+---------------+---------------+---------------+-------------+--------------+---------------+

[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-usage
+---------------+
| Cpu usage % |
|---------------|
| 18.3 |
+---------------+

[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-usage
+----------------+
| Disk usage % |
|----------------|
| 27.4 |
+----------------+
+----------------+---------------+----------------+
| total | used | free |
|----------------+---------------+----------------|
| 29357916160(B) | 8025161728(B) | 21315977216(B) |
| 27.34(GB) | 7.47(GB) | 19.85(GB) |

[Command]

show license status

[Purpose]

Show the current license status of the device.

[View]

System View

[Comment]

The current device supports license-controlled authorizations for features such as IGMP, TUNNEL, ROUTER, CLI, etc. If the license does not authorize the function of a specific module, that module cannot be used and its commands cannot be configured. If the license expires, already configured functions will continue to operate normally, but the corresponding commands cannot be executed. It is recommended to promptly provide the device serial number (viewable via show version), apply for and update the license file.Upload the obtained license file to the /etc/sonic/lic/ directory on the device. The new license will take effect automatically after approximately 3 minutes.

[Use Cases]

sonic# show license status
License Name : xxxxxx-license
MD5 : fab126157378dd632cc607d0cxxxxxxx
Valid : True
Build Time : 1970-12-31 16:07:24
Valid To : 2026-07-19 09:39:08
Feature Status
---------------------------------------
IGMP TRUE
TUNNEL TRUE
ROUTER_PROTOCOL TRUE
CLI TRUE

[Command]

docker ps -a

[Purpose]

Show the device container status.

[View]

Linux View

[Comment]

The device system functional modules run independently as containers. A container starts only when its corresponding feature is enabled, and stops when the feature is disabled. It is not recommended to directly operate containers using docker commands.

[Use Cases]

admin@sonic:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES
e8b35211ec67 docker-dhcp-relay:lates "/usr/bin/docker_ini…" 6 days ago Up 6 days dhcp_relay
49d17dd74950 docker-platform-monitor "/usr/bin/docker_ini…" 2 weeks ago Up 2 weeks pmon
38a9c4d7322f docker-lldp:latest "/usr/bin/docker-lld…" 2 weeks ago Up 2 weeks lldp
c33784c2c8da docker-fpm-frr:latest "/usr/bin/docker_ini…" 2 weeks ago Up 2 weeks bgp
271ae3003549 docker-syncd-mrvl-" "/usr/local/bin/supe…" 2 weeks ago Up 2 weeks syncd
2035ca6094a8 docker-teamd:latest "/usr/local/bin/supe…" 2 weeks ago Up 2 weeks teamd
22c5f0573991 docker-orchagent:latest "/usr/bin/docker-ini…" 2 weeks ago Up 2 weeks swss
41701dca78b1 docker-database:latest "/usr/local/bin/dock…" 2 weeks ago Up 2 weeks database