PortStat
Display port status in table
- PortStat
Shortest form:
ps.Usually typed as its shortest form,
ps. Show port status: link, speed, duplex, autonegotiation, pause and maximum frame size for all ports or the ports in a port bitmap.pstakes one optional argument, a port bitmap (see Ports and port bitmaps). Without it, all ports are shown. If the bitmap selects no existing port, it printsNo ports specified.; the CPU port is not included, sops cpu0may print that too. An invalid bitmap printsps: Error: unrecognized port bitmap: <word>. Further words are ignored with aWARNING: excess arguments ignored.The output is a two-line table header followed by one line per port, in logical port order. The column legend is in the built-in help. On a Trident 3 the columns are:
port: name and logical port number,ce0( 1);ena/link:up,down, or!enafor a disabled port (on SONiC, an interface that is administratively down);Lns: SerDes lanes, 4 for a 100G port and 1 for a 10G port;speed/duplex,link scan(SWfor software linkscan) andauto neg?;STP state,pause,discrd(which frames the port discards:Untag,None…) andlrn ops(F= forward);inter face(CR4,XFI…),max frame(9122 on SONiC),cut thru?,loop backandencap(IEEE).
Disabled ports still show their configured speed.
SONiC’s
show techsupportrunspson every Broadcom switch (scripts/generate_dump (show techsupport collector)), and the SONiC user manual usesbcmcmd "ps"as its example (SONiC User Manual (section 6.2 example: bcmcmd “ps”)). Tables from an older chip (BCM56846, Cumulus Linux) are in Edgecore AS5610-52X reverse engineering: Cumulus 2.5 baseline captures.psonly reads state and is safe on a running switch.Hardware-validated
drivshell> ps ena/ speed/ link auto STP lrn inter max cut loop port link Lns duplex scan neg? state pause discrd ops face frame thru? back encap ce0( 1) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce1( 5) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE xe0( 9) up 1 10G FD SW No Forward Untag F XFI 9122 No IEEE xe1( 10) up 1 10G FD SW No Forward Untag F XFI 9122 No IEEE xe2( 11) up 1 10G FD SW No Forward Untag F XFI 9122 No IEEE xe3( 12) up 1 10G FD SW No Forward None F XFI 9122 No IEEE ce2( 13) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce3( 17) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce4( 21) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce5( 25) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce6( 29) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce7( 33) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce8( 37) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce9( 41) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce10( 45) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce11( 49) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce12( 53) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce13( 57) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce14( 61) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE xe4( 66) !ena 1 10G FD SW No Forward Untag F XFI 9122 No IEEE ce15( 67) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce16( 71) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce17( 75) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce18( 79) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce19( 83) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce20( 87) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce21( 91) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce22( 95) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce23( 99) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce24(103) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce25(107) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce26(111) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce27(115) up 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce28(119) up 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce29(123) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce30(127) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE
Hardware-validated — Status of the first four 100G ports
drivshell> ps ce0-ce3 ena/ speed/ link auto STP lrn inter max cut loop port link Lns duplex scan neg? state pause discrd ops face frame thru? back encap ce0( 1) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce1( 5) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce2( 13) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE ce3( 17) !ena 4 100G FD SW No Forward Untag F CR4 9122 No IEEE
Built-in help
Display info about port status in table format. Link scan modes: SW = software HW = hardware Learn operations (source lookup failure control): F = SLF packets are forwarded C = SLF packets are sent to the CPU A = SLF packets are learned in L2 table D = SLF packets are discarded. Pause: TX = Switch will transmit pause packets RX = Switch will obey pause packetsFurther reading
bcmsh.md (published as https://kamelnetworks.github.io/sonic/bcmsh.html), SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), OpenBCM sdk-6.5.27/rc: rc.soc, config.bcm, td3_sanity.soc, cmd_td3_tr514_lr.soc, tr51/tr517_bcm56870_a0.soc, bcm_diag_info.soc …, sonic-buildimage issues with bcmcmd usage (exemplars #1762, #3212, #10733, #22287, #28832), sonic-mgmt test suite files invoking bcmcmd (19 files), SONiC User Manual (section 6.2 example: bcmcmd “ps”), scripts/generate_dump (show techsupport collector), SONiC wiki: technical_faq (bcmcmd polling socket timeout), Open Networking Hardware Diagnostic Guide (May 2025), TroubleShooting Guide for the ARM platform via DIAG mode, FBOSS: BcmSwitch gatherSdkState/rcload, validated shell commands, diag shell stress test, vendor-diag-shell skill, debugging doc, bcm cmd, 交换芯片Helix4 L2 L3功能验证, 【交换芯片】硬件调测使用场景下的BMC交换常用命令说明, [j-nsp] Link establishment issues with 1Gbps SX/LX SFPs on QFX5110, OF-DPA with ONL Cheat Sheet, Edgecore AS5610-52X reverse engineering: Cumulus 2.5 baseline captures, BRKDCT-3101 Nexus 9000 (Standalone) Architecture and Troubleshooting.