跳转到内容
Ask AI

System Status

此内容尚不支持你的语言。

Table 1 Basic Information View

CommandPurpose
show versionDisplay version info.
show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}Display system platform information.
show imageDisplay the installed image of the system.
**show history ** [all]Display history commands.
show system processes {cpu|memory| summary}Display information about system processes.
show system {users|reboot-cause|uptime|memory}Display system-related information.
**show patches ** [detail]Display the patches already installed.

[Command] show version

[Purpose] Display version info.

[View] Privileged User View

[Notes] This command displays the version information including: software, description, kernel, create, and image.

[Use Cases]

sonic# show version
Asterfusion AsterNOS Software, Version 3.1, R0402P01
SONiC Software Version: SONiC.202111.R0402P01
Distribution: Debian 11.7
Kernel: 5.10.0-8-2-amd64
Build commit: 77b733bbf
Build date: Tue Jul 25 07:54:52 UTC 2023
Built by: jenkins@sonic-Super-Server
Platform: x86_64-asterfusion_cx532p_n-r0
HwSKU: CX532P-N
ASIC: innovium
ASIC Count: 1
Serial Number: F023529A054
Model Number: LE5032C
Hardware Revision: 1
Uptime: 10:00:19 up 8:20, 9 users, load average: 0.79, 1.15, 1.14
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-dhcp-relay latest b579bf4af4f4 452MB
docker-teamd 202111.R0402P01 740816f290c6 463MB
docker-teamd latest 740816f290c6 463MB
docker-sonic-mgmt-framework 202111.R0402P01 fab89648d04e 675MB
docker-sonic-mgmt-framework latest fab89648d04e 675MB
docker-slad 202111.R0402P01 fe39ccd088a5 472MB
docker-slad latest fe39ccd088a5 472MB
docker-sflow 202111.R0402P01 e092a98e73b8 464MB
docker-sflow latest e092a98e73b8 464MB
docker-orchagent 202111.R0402P01 a494ff09a565 484MB
docker-orchagent latest a494ff09a565 484MB
docker-neighbor-proxy 202111.R0402P01 22c393e97052 463MB
docker-neighbor-proxy latest 22c393e97052 463MB
docker-nat 202111.R0402P01 14d147def064 466MB
docker-nat latest 14d147def064 466MB
docker-mstpd 202111.R0402P01 366d8236220e 485MB
docker-mstpd latest 366d8236220e 485MB
docker-macsec 202111.R0402P01 24c53be62fa6 468MB
docker-macsec latest 24c53be62fa6 468MB
docker-lldp 202111.R0402P01 d2d41b9d8918 505MB
docker-lldp latest d2d41b9d8918 505MB
docker-iccpd 202111.R0402P01 a6e24b2dc581 466MB
docker-iccpd latest a6e24b2dc581 466MB
docker-fpm-frr 202111.R0402P01 954d87aafa63 492MB
docker-fpm-frr latest 954d87aafa63 492MB
docker-cluster 202111.R0402P01 96e50ff3edc4 892MB
docker-cluster latest 96e50ff3edc4 892MB
docker-syncd-invm 202111.R0402P01 c940e72b0685 826MB
docker-syncd-invm latest c940e72b0685 826MB
docker-web-server 202111.R0402P01 e53911947b43 477MB
docker-web-server latest e53911947b43 477MB
docker-sonic-telemetry 202111.R0402P01 f4ab4ab9acef 516MB
docker-sonic-telemetry latest f4ab4ab9acef 516MB
docker-snmp 202111.R0402P01 217730a11313 483MB
docker-snmp latest 217730a11313 483MB
docker-router-advertiser 202111.R0402P01 585724965c6d 438MB
docker-router-advertiser latest 585724965c6d 438MB
docker-platform-monitor 202111.R0402P01 d38c88b80d5b 561MB
docker-platform-monitor latest d38c88b80d5b 561MB
docker-mux 202111.R0402P01 faacdde8a401 486MB
docker-mux latest faacdde8a401 486MB
docker-database 202111.R0402P01 dc3502d3da31 438MB
docker-database latest dc3502d3da31 438MB

show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}

Section titled “show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}”

[Command] show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}

[Purpose] Display system platform information.

[View] Privileged User View

[Notes] This command displays information including: PSU status, hardware platform summary, system EEPROM, fan, temperature, and system ssd device health.

[Use Cases]

Display hardware platform summary information, including device model, serial number, and other related details.
sonic# show platform summary
Platform: x86_64-asterfusion_cx532p_n-r0
HwSKU: CX532P-N
ASIC: marvell
ASIC Count: 1
Serial Number: F023529A054
Model Number: CX532P-N
Hardware Revision: 1
Display information such as the number, status, and speed of fans.
sonic# show platform fan
FAN Speed Direction Presence Status Timestamp
----- ------- ----------- ---------- -------- -------------------
FAN1 9120RPM exhaust Present OK 2025-01-24 06:52:16
FAN2 9120RPM exhaust Present OK 2025-01-24 06:52:17
FAN3 9120RPM exhaust Present OK 2025-01-24 06:52:17
FAN4 9120RPM exhaust Present OK 2025-01-24 06:52:18
Display PSU power status and power information.
sonic# show platform psu-status
PSU VoltageIn(V) CurrentIn(A) PowerIn(W) VoltageOut(V) CurrentOut(A) PowerOut(W) Direction Status Warning Direction_warning
----- -------------- -------------- ------------ --------------- --------------- ------------- ----------- -------- --------- -------------------
PSU 1 234.50 3.40 819.00 12.30 63.10 777.00 exhaust OK false false
PSU 2 0.00 0.00 0.00 0.00 0.00 0.00 exhaust NOT OK false false
Display device temperature information.
sonic# show platform temperature
Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp
---------------- ------------- --------- -------- -------------- ------------- --------- -------------------
CORE_0 52 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_1 53 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_2 52 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_3 54 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CPU_0 54 N/A N/A N/A N/A false 2025-01-24 06:54:56
Left_Fan_Board 36 N/A N/A N/A N/A false 2025-01-24 06:54:56
Left_Main_Board 34 N/A N/A N/A N/A false 2025-01-24 06:54:56
Main_Temp 50 N/A N/A N/A N/A false 2025-01-24 06:54:56
Physical_id_0 54 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
Right_Fan_Board 37 N/A N/A N/A N/A false 2025-01-24 06:54:56
Right_Main_Board 34 N/A N/A N/A N/A false 2025-01-24 06:54:56
Display system EEPROM information.
sonic# show platform sys-eeprom
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 247
TLV Name Code Len Value
------------------- ------ ----- ------------------------------
Product Name 0x21 12 CX864E-N-AC
Part Number 0x22 19 ONBP2U-N-2X64E-A-AC
Serial Number 0x23 11 F02524BB889
Base MAC Address 0x24 6 60:EB:5A:00:11:22
Manufacture Date 0x25 19 10/31/2024 23:59:59
Device Version 0x26 1 1
Label Revision 0x27 1 0
Platform Name 0x28 30 x86_64-asterfusion_cx864e_n-r0
ONIE Version 0x29 14 2019.05_v1.0.6
MAC Addresses 0x2A 2 2
Manufacturer 0x2B 11 Asterfusion
Manufacture Country 0x2C 2 CN
Vendor Name 0x2D 11 Asterfusion
Diag Version 0x2E 3 1.0
Service Tag 0x2F 1 X
CRC-32 0xFE 4 0x92DD741D
Display health information of SSD devices in the system, including hard drive model information.
sonic# show platform ssd-health
Device Model : Saturn NCT 624XN 256GB
Health : N/A
Temperature : Old_age

[Command] show image

[Purpose] Display the installed image of the system.

[View] Privileged User View

[Use Cases]

sonic# show image
Current: SONiC-OS-202111.R0402P01
Next: SONiC-OS-202111.R0402P01
Available:
SONiC-OS-202111.R0402P01
SONiC-OS-202111.R0402P01T02

[Command] show history [all] [Purpose] Display history commands.

[View] Privileged User View

[Notes] When the all parameter is not included, only the current session history commands are viewed. When the all parameter is included, all history commands are viewed

[Use Cases]

sonic# show history all
NUMBER DATE TIME USER PRIVILEGE TTY RESULT COMMAND
1 2024-10-18 09:58:51.195 root sys_admin /dev/pts/1 success startup
2 2024-10-18 09:58:52.083 root sys_admin /dev/pts/1 success show running-config
3 2024-10-18 09:59:09.158 root sys_admin /dev/pts/1 success startup
4 2024-10-18 09:59:09.945 root sys_admin /dev/pts/1 success show running-config
5 2024-10-18 09:59:23.923 admin sys_admin /dev/pts/2 success startup
sonic# show history
1 show version
2 show mclag state
3 show dhcp pool info
4 show ip route

show system processes {cpu|memory|summary}

Section titled “show system processes {cpu|memory|summary}”

[Command] show system processes {cpu|memory|summary}

[Purpose] Display information about system processes.

[View] Privileged User View

[Use Cases]

sonic# show system processes cpu
top - 17:24:07 up 6:10, 4 users, load average: 2.08, 1.62, 1.15
Tasks: 301 total, 1 running, 299 sleeping, 0 stopped, 1 zombie
%Cpu(s): 11.8 us, 3.2 sy, 0.0 ni, 84.6 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem : 16416408 total, 12812084 free, 2342092 used, 1262232 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 13738596 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3519 root 20 0 74032 18700 10384 S 6.2 0.1 0:16.59 syseepromd
25105 root 20 0 43564 3700 3020 R 6.2 0.0 0:00.02 top
1 root 20 0 57640 7576 5432 S 0.0 0.0 0:03.07 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:01.39 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root 20 0 0 0 0 S 0.0 0.0 0:22.04 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0.0 0.0 0:00.65 migration/0
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/1
15 root rt 0 0 0 0 S 0.0 0.0 0:00.72 migration/1
16 root 20 0 0 0 0 S 0.0 0.0 0:00.88 ksoftirqd/1
18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
20 root rt 0 0 0 0 S 0.0 0.0 0:00.05 watchdog/2
21 root rt 0 0 0 0 S 0.0 0.0 0:00.44 migration/2
22 root 20 0 0 0 0 S 0.0 0.0 0:00.86 ksoftirqd/2
24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
26 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/3
27 root rt 0 0 0 0 S 0.0 0.0 0:00.41 migration/3
28 root 20 0 0 0 0 S 0.0 0.0 0:00.66 ksoftirqd/3
30 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0H
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
32 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
33 root 20 0 0 0 0 S 0.0 0.0 0:00.02 khungtaskd
34 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
35 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
36 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
38 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
39 root 39 19 0 0 0 S 0.0 0.0 0:00.04 khugepaged

show system {users|reboot-cause|uptime|memory}

Section titled “show system {users|reboot-cause|uptime|memory}”

[Command] show system {users|reboot-cause|uptime|memory}

[Purpose] Display system-related information.

[View] Privileged User View

[Use Cases]

sonic# show system users
admin pts/0 2022-07-27 16:45 (192.168.30.185)
admin pts/1 2022-07-27 14:17 (192.168.30.184)
admin pts/2 2022-07-27 15:01 (192.168.30.184)
admin pts/3 2022-07-27 15:13 (192.168.20.28)

[Command] **show patches ** [detail]

[Purpose] Display the patches already installed.

[View] Privileged User View

[Use Cases]

sonic# show patches
Patch Id Name Created Time Install Time Operator
---------- ------ -------------- -------------- ----------

Table 2 Configure Information View

CommandPurpose
show running-configDisplay configuration running currently.
show startup-configDisplay startup configuration.
show thisDisplay configuration of current view.

[Command] show running-config

[Purpose] Display configuration running currently.

[View] Privileged User View

[Use Cases]

sonic# show running-config
vlan range 10,20,30,107,200,2013-2016,2019-2020
!
interface mgmt 0
ip address 10.250.0.163/24 gw 10.250.0.254
exit
!
interface ethernet 0/0
mtu 9216
no fec
speed 10000
switchport access vlan 200
exit
!
interface ethernet 0/1
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/2
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/3
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/4
fec rs
mtu 9216
speed 25000
exit
!
……

[Command] show startup-config

[Purpose] Display startup configuration.

[View] Privileged User View

[Use Cases]

sonic# show startup-config
vlan range 10,20,30,107,200,2013-2016,2019-2020
!
interface mgmt 0
ip address 10.250.0.163/24 gw 10.250.0.254
exit
!
interface ethernet 0/0
mtu 9216
no fec
speed 10000
switchport access vlan 200
exit
!
interface ethernet 0/1
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/2
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/3
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/4
fec rs
mtu 9216
speed 25000
exit
!
……

[Command] show this

[Purpose] Display configuration of current view.

[View] All configuration views except Global Configuration View

[Use Cases]

sonic(config)# interface ethernet 0/16
sonic(config-if-0/16)# show this
!
interface ethernet 0/16
fec rs
mtu 9216
speed 25000
sonic(config-if-0/16)#
sonic(config-if-0/16)# exit
sonic(config)# router bgp 65207
sonic(config-router)# show this
!
router bgp 65207
no bgp ebgp-requires-policy
bgp graceful-reload
neighbor 199.0.3.2 remote-as 65209
neighbor 199.0.3.2 bfd
neighbor 199.0.7.2 remote-as 65209
neighbor 199.0.7.2 bfd
!
address-family ipv4 unicast
network 10.1.0.34/32
exit-address-family
!
address-family l2vpn evpn
neighbor 199.0.3.2 activate
neighbor 199.0.7.2 activate
advertise-all-vni
exit-address-family
exit

Table 3 System Config

CommandPurpose
configure terminalEnter Global Configuration View.
rebootReboot the system.
reloadReload the system.
writeSave the configuration.
hostname hostnameModify the hostname of the switch.
image switch image-versionSwitch the system image.
image update bin-fileUpgrade the system image.
ping ip-addressPing.
traceroute ip-addressRoute tracking.
**delete startup-config ** [reserve-mgmt]Restore to the default configuration.
terminal rich-outputEnable paging and colorizing when printing to the terminal.

[Command] configure terminal

[Purpose] Enter Global Configuration View.

[View] Privileged User View

[Use Cases]

sonic# configure terminal
sonic(config)#

[Command] reboot

[Purpose] Reboot the system.

[View] Privileged User View

[Use Cases]

sonic# reboot
Do you want to reboot? [y/N]: y

[Command] reload

[Purpose] Reload the system.

[View] Privileged User View

[Use Cases]

sonic# reload
Clear current config and reload config in config_db format from the default config file(s) ? [y/N]: y

[Command] write

[Purpose] Save the configuration.

[View] Privileged User View

[Use Cases]

sonic# write
save running-config...
Existing files will be overwritten, continue? [y/N]: y

[Command] hostname hostname

[Purpose] Modify the hostname of the switch.

[Parameters]

ParameterDescription
hostnameSpecify the hostname in string form, up to 64 characters, including only ”.”, ”-”, “a-z”, “A-Z” and “0-9”. It cannot begin with ”…” , ”-” and no ”..”.

[View] Privileged User View

[Notes] You need to manually save the configuration after modification, and re-enter after exiting KLISH to take effect.

[Use Cases]

sonic# hostname sonic-226
Running command: service hostname-config restart
Reloading Monit configuration ...
Reinitializing monit daemon

[Command] image switch image-version

[Purpose] Switch the system image.

[Parameters]

ParameterDescription
imageName of the image.

[View] Privileged User View

[Use Cases]

sonic# show image
Current: SONiC-OS-V3.1R0402P02T06
Next: SONiC-OS-V3.1R0402P02T06
Available:
SONiC-OS-V3.1R0402P02T06
SONiC-OS-V3.1R0402P02T05
sonic# image switch SONiC-OS-V3.1R0402P02T05
Command: grub-set-default --boot-directory=/host 1

[Command] image update bin-file

[Purpose] Upgrade the system image.

[Parameters]

ParameterDescription
bin-fileThe image bin file.

[View] Privileged User View

[Use Cases]

sonic# image update sonic-innovium.bin

[Command] **ping ** [ip|ipv6|arp] ip-address [vrf vrf_name] [src A.B.C.D/A::B] [interface {ethernet interface_name|link-aggregation interface_name|vlan vlan-id}] [repeat count] [size size][interval interval]

[Purpose] Ping.

[Parameters]

ParameterDescription
ipSend ICMP IPv4 messages, default is IPv4.
ipv6Send ICMP IPv6 messages.
arpSend ARP requests.
ip-addressSpecify the destination IP address.
vrf_nameSpecify the source VRF.
vlan-idVLAN ID, the range is [1,4094].
interface_nameSpecify source interface name.
countStop after count replies, the default is 5.
sizeSpecify the number of data bytes to be sent.
intervalSpecify the interval in seconds. The default is 1.

[View] Privileged User View

[Use Cases]

sonic# ping 10.250.0.242
PING 10.250.0.242 (10.250.0.242) 56(84) bytes of data.
64 bytes from 10.250.0.242: icmp_seq=1 ttl=63 time=2.47 ms
64 bytes from 10.250.0.242: icmp_seq=2 ttl=63 time=0.164 ms
64 bytes from 10.250.0.242: icmp_seq=3 ttl=63 time=0.154 ms
64 bytes from 10.250.0.242: icmp_seq=4 ttl=63 time=0.168 ms
64 bytes from 10.250.0.242: icmp_seq=5 ttl=63 time=0.144 ms
--- 10.250.0.242 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4049ms
rtt min/avg/max/mdev = 0.144/0.619/2.467/0.923 ms

[Command] **traceroute ** [ip|ipv6] ip-address [vrf vrf_name] [src A.B.C.D/A::B] [interface {ethernet interface_name|link-aggregation interface_name|vlan vlan-id}]

[Purpose] Route tracking.

[Parameters]

ParameterDescription
ipSend ICMP IPv4 messages, default is IPv4.
ipv6Send ICMP IPv6 messages.
ip-addressSpecify the destination IP address.
vrf_nameSpecify the source VRF.
A.B.C.D/A::BSpecify the source IP address.
vlan-idVLAN ID, the range is [1,4094].
interface_nameSpecify source interface name.

[View] Privileged User View

[Use Cases]

sonic# traceroute ip 60.0.0.1
traceroute to 60.0.0.1 (60.0.0.1), 30 hops max, 60 byte packets
1 10.250.0.254 0.889 ms 1.066 ms 1.174 ms
2 172.16.1.1 0.907 ms 1.005 ms 172.16.1.2 0.801 ms
3 172.16.11.34 0.188 ms 0.165 ms 0.187 ms
4 100.68.128.1 3.902 ms 3.968 ms 3.992 ms
5 220.249.83.105 3.744 ms 4.175 ms 4.100 ms
6 * 58.19.158.97 3.811 ms *
7 * * *
8 61.182.183.138 27.232 ms 61.182.183.142 29.072 ms 61.182.183.214 29.369 ms
9 60.0.0.1 33.401 ms 34.328 ms 34.045 ms

[Command] **delete startup-config ** [reserve-mgmt]

[Purpose] Restore to the default configuration.

[Parameters]

ParameterDescription
reserve-mgmtThis option preserves the Management Interface IP configuration, which is not preserved by default.

[View] Privileged User View

[Use Cases]

sonic# delete startup-config reserve-mgmt
Load_default_settings is executing ...
Generating config_db file...
Running command: /usr/local/bin/sonic-cfggen -H -k CX308P-48Y-N --preset none > /tmp/_config_db.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/_config_db.json -t /usr/share/sonic/device/x86_64-asterfusion_cx308p_48y_n-r0/CX308P-48Y-N/buffers.json.j2 >/tmp/buffers.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/_config_db.json -t /usr/share/sonic/device/x86_64-asterfusion_cx308p_48y_n-r0/CX308P-48Y-N/qos.json.j2 -y /etc/sonic/sonic_version.yml >/tmp/qos.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/qos.json -j /tmp/buffers.json -j /tmp/_config_db.json --print-data > /etc/sonic/config_db.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/qos.json -j /tmp/buffers.json -j /tmp/_config_db.json --print-data > /etc/sonic/config_db.json
Inherit eth0 ip address, mask and gateway...
Running command: /usr/local/bin/sonic-cfggen -j /tmp/mgmt_ip.json -j /etc/sonic/config_db.json --print-data > /tmp/config_db.json
Running command: cp /tmp/config_db.json /etc/sonic/config_db.json
The configuration has been restored. Please reload it to take effect

[Command] terminal rich-output

[Purpose] Enable paging and colorizing when printing to the terminal.

[View] Privileged User View

[Notes] Enabled by default. Run command terminal raw-output to disable paging and colorizing when printing to the terminal.

[Use Cases]

sonic# terminal rich-output