PortRate
Set/Display port rate metering characteristics
- PortRate
Shortest form:
pr.Show or set per-port ingress policing or egress shaping, in kilobits per second with a burst size in kilobits.
PortRate <pbmp> [ingress | egress] [<rate> <max_burst>]With only the bitmap, both meters are shown, one line each:
Ingress meter: <n> kbps <n> kbits max burst.andEgress meter: …. Any prefix ofingress/egressworks (i,e). Chips without that kind of meter printingress metering unavailable for this device(oregress). Higig ports in the bitmap produce a warning.The built-in help also offers
pause [pause_thresh resume_thresh], but this shell rejects it withunrecognized port rate type: pause.Showing is read-only. Setting a meter changes port policing or shaping behind SONiC’s back.
On a SONiC Trident 3 switch the ingress meter is not available through this command:
portrate <port>andportrate <port> ingressstop at the first port withPortRate port <name>: ERROR: bcm_port_rate_ingress_get: Feature unavailable, followed by the SAI shell’sFailed to execute the diagnostic command. Error: Operation failed.Hardware-validated — Show both meters of ce0 (read-only)
drivshell> portrate ce0 PortRate port ce0: ERROR: bcm_port_rate_ingress_get: Feature unavailable Failed to execute the diagnostic command. Error: Operation failed.
To see the egress meter, ask for it alone:
Hardware-validated — Show only the egress meter of ce0 (read-only)
drivshell> portrate ce0 egressUnvalidated — Shape ce0 egress to 1 Gbit/s with a 512 kbit burst (changes the ASIC)
drivshell> portrate ce0 egress 1000000 512Built-in help
Set/Display port rate metering characteristics. Parameters: <pbm> [ingress|egress|pause [arg1 arg2]] For Ingress or Egress: arg1 is rate, arg2 is max_burst For Pause: arg1 is pause_thresh, arg2 is resume_thresh rate is in kilobits (1000 bits) per second max_burst and xxx_thresh are in kilobits (1000 bits)Further reading