Command Line Reference
Device Management
Device Status
17 min
show version 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] 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 show platform fan show platform fan \[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 item 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 show platform psu status \[command] show platform psu status \[purpose] view power status \[view] system view item description 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 psu status \ psu 1 ok psu 2 not ok show platform summary show platform summary \[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 show platform temperature show platform temperature \[command] show platform temperature \[purpose] view hardware platform information \[view] system view \[use cases] sonic# show platform temperature show image show image \[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 show feature state 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 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 show ztp show ztp \[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 show ztp verbose show ztp verbose \[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 show environment powers show environment powers \[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) show system memory usage 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 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) | + + + + + + + show system cpu usage 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 usage + + \| cpu usage % | \| | \| 18 3 | + + show system disk usage 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 usage + + \| disk usage % | \| | \| 27 4 | + + + + + + \| total | used | free | \| + + | \| 29357916160(b) | 8025161728(b) | 21315977216(b) | \| 27 34(gb) | 7 47(gb) | 19 85(gb) |
