-
Notifications
You must be signed in to change notification settings - Fork 35
OPX commands
OPX commands are available for Linux management for release 3.0.0.
Note: Use
source etc/opx/opx-environment.sh
in advance before using any of these commands.
Using a breakout cable, you can split a 40GbE physical port into four (quad) 10GbE SFP+ ports (if supported by the NPU). Each 4x10G port is represented by a Linux interface with a fan-out field in the interface name that identifies the 4x10G port.
You can fan-out a 40GbE port or disable the fanned-out 4x10G configuration, then return the physical port to 40G operation. Use true
to enable 4x10G fan-out on a 40GbE port, or use false
to disable 4x10G fan-out on a 40GbE port.
opx-config-fanout portID [true | false]
$ opx-config-fanout e101-005-0 true
Key: 1.20.1310766.1310754.1310755.1310756.1310757.
base-port/physical/unit-id = 0
base-port/physical/phy-media = 1
base-port/physical/front-panel-number = 0
base-port/physical/loopback = 0
base-port/physical/hardware-port-id = 45
base-port/physical/npu-id = 0
base-port/physical/fanout-mode = 4
base-port/physical/breakout-capabilities = 4,2
base-port/physical/port-id = 45
base-port/physical/slot-id = 0
Deleting.. e101-005-0
Completed...
Creating interface e101-005-1
Creating interface e101-005-2
Creating interface e101-005-3
Creating interface e101-005-4
Successfully created interfaces...
Easily identify each time a beacon is sent to check for pending packets on the interface.
opx-chassis-beacon [on | off]
$ opx-chassis-beacon on
Reconfigure MAC age-timer and set switch values, and display current switch values.
opx-config-switch [set | show]
$ opx-config-switch set switch-id=0 mac-age-timer=1900
Success
$ opx-config-switch show
Key: 2.3.0966121.
base-switch/switching-entities/switch-count = 1
Key: 1.30.1966121.1966082.1966085.
base-switch/switching-entities/switching-entity/bridge-table-size = 163840
base-switch/switching-entities/switching-entity/acl-table-max-priority = 11
base-switch/switching-entities/switching-entity/acl-entry-min-priority = 0
base-switch/switching-entities/switching-entity/acl-table-min-priority = 0
base-switch/switching-entities/switching-entity/ecmp-hash-fields = 8,9,5,3,10,4,2,1,7,6
base-switch/switching-entities/switching-entity/npu-identifiers = 0
base-switch/switching-entities/switching-entity/mac-age-timer = 1800
base-switch/switching-entities/switching-entity/lag-hash-algorithm = 2
base-switch/switching-entities/switching-entity/switch-id = 0
base-switch/switching-entities/switching-entity/temperature = 45
base-switch/switching-entities/switching-entity/switch-mode = 2
base-switch/switching-entities/switching-entity/lag-hash-fields = 8,9,5,3,10,4,2,1,7,6
base-switch/switching-entities/switching-entity/max-ecmp-entry-per-group = 64
base-switch/switching-entities/switching-entity/ecmp-hash-algorithm = 2
base-switch/switching-entities/switching-entity/acl-entry-max-priority = 2147483647
base-switch/switching-entities/switching-entity/default-mac-address = 90:b1:1c:f4:aa:81
base-switch/switching-entities/switching-entity/max-mtu = 9216
Display statistics and media information from a Linux interface which maps to a physical port. The output is a subset of the opx-show-stats
output for the same physical port interface.
opx-ethtool [-v | -e | -s | -S]
Options:
-
-v
— Display version information -
-e
— Display transceiver statistics -
-s
— Display port speed, duplex, and auto-negotiation settings -
-S
— Display port statistics
$ opx-ethtool -S e101-001-0
Statistics for interface e101-001-0
Ether statistics:
rx_bytes: 9185614848
rx_no_errors: 0
tx_no_errors: 9003181
tx_total_collision: 0
rx_undersize_packets: 0
rx_jabbers: 0
rx_fragments: 0
rx_align_errors: 0
rx_discards: 0
rx_mcast_packets: 35445
rx_bcast_packets: 0
rx_oversize_packets: 0
tx_oversize_packets: 0
rx_64_byte_packets: 0
rx_65_to_127_byte_packets: 0
rx_128_to_255_byte_packets: 0
rx_256_to_511_byte_packets: 0
rx_512_to_1023_byte_packets: 0
rx_1024_to_1518_byte_packets: 0
rx_1519_to_2047_byte_packets: 0
rx_2048_to_4095_byte_packets: 0
rx_4096_to_9216_byte_packets: 0
tx_64_byte_packets: 0
tx_65_to_127_byte_packets: 33217
tx_128_to_255_byte_packets: 2228
tx_256_to_511_byte_packets: 0
tx_512_to_1023_byte_packets: 0
tx_1024_to_1518_byte_packets: 8967736
tx_1519_to_2047_byte_packets: 0
tx_2048_to_4095_byte_packets: 0
tx_4096_to_9216_byte_packets: 0
$ opx-ethtool -e e101-001-0
Show media info for e101-001-0
if_index is 17
Key: 2.19.1245389.1245248.1245249.1245250.
base-pas/media/rate-identifier = 0
base-pas/media/oper-status = 0
base-pas/media/category = 3
base-pas/media/voltage-state = 1
base-pas/media/bias-low-warning-threshold =
base-pas/media/vendor-pn = 568400002
base-pas/media/current-temperature = ??
base-pas/media/insertion-cnt = 0
base-pas/media/voltage-low-warning-threshold =
base-pas/media/cc_ext = 162
base-pas/media/length-om2 = 0
base-pas/media/length-om3 = 0
base-pas/media/rx-power-low-alarm-threshold =
base-pas/media/length-om1 = 0
base-pas/media/vendor-id = AP
base-pas/media/media-category/sfp-plus/br-max = 0
base-pas/media/connector = 33
base-pas/media/ext-transceiver = 0
base-pas/media/vendor-Specific = ffffffffffffff00000000000000000000000000000000000000000000000000
base-pas/media/media-category/sfp-plus/br-min = 0
base-pas/media/encoding = 0
base-pas/media/tx-power-high-warning-threshold =
base-pas/media/vendor-name = Amphenol
base-pas/media/rx-power-low-warning-threshold =
base-pas/media/slot = 1
base-pas/media/port = 1
base-pas/media/vendor-rev = 4700
base-pas/media/slot = 1
base-pas/media/port = 1
base-pas/media/tx-power-low-alarm-threshold =
base-pas/media/bias-low-alarm-threshold =
base-pas/media/capability = 6
base-pas/media/media-category/sfp-plus/sff-8472-compliance = 0
base-pas/media/diag-mon-type = 0
base-pas/media/temp-state = 1
base-pas/media/type = 43
base-pas/media/media-category/qsfp-plus/wavelength-tolerance = 0
base-pas/media/ext-identifier = 0
base-pas/media/temp-low-warning-threshold =
base-pas/media/voltage-high-warning-threshold =
base-pas/media/temp-high-alarm-threshold =
base-pas/media/length-sfm = 0
base-pas/media/rate-select-state = 0
base-pas/media/rx-power-measurement-type = 0
base-pas/media/wavelength = 0
base-pas/media/cc_base = 54
base-pas/media/temp-low-alarm-threshold =
base-pas/media/tx-power-low-warning-threshold =
base-pas/media/insertion-timestamp = 0
base-pas/media/current-voltage =
base-pas/media/bias-high-alarm-threshold =
base-pas/media/high-power-mode = 1
base-pas/media/br-nominal = 0
base-pas/media/options = 0
base-pas/media/rx-power-high-warning-threshold =
base-pas/media/date-code = 3131303632322000
base-pas/media/present = 1
base-pas/media/transceiver = 0000000000000000205c
base-pas/media/length-cable = 2
base-pas/media/voltage-high-alarm-threshold =
base-pas/media/identifier = 12
base-pas/media/voltage-low-alarm-threshold =
base-pas/media/dell-qualified = 0
base-pas/media/length-sfm-km = 0
base-pas/media/rx-power-high-alarm-threshold =
base-pas/media/admin-status = 0
base-pas/media/serial-number = APF11240020140
base-pas/media/tx-power-high-alarm-threshold =
base-pas/media/temp-high-warning-threshold =
base-pas/media/bias-high-warning-threshold =
base-pas/media/enhanced-options = 0
base-pas/media/media-category/qsfp-plus/max-case-temp = 70
Enables logging which is maintained in the var/log/syslog
file. You must restart the module after changing logging levels.
opx_logging_cli [show all module-id {log-level value} | enable | disable]
Options:
-
show
— Display current logging status for all or specific module IDs and logging levels -
enable
— Enable logging status for all or specific module IDs and logging levels -
disable
— Disable logging status for all or specific module IDs and logging levels -
log-level value
— Set logging levels (debug
,info
,notice
,warning
,error
,critical
,alert
,emerg
)
$ opx_logging_cli enable all
$ opx_logging_cli enable L3_SERVICES
Display information about current alarms present in OPX.
opx-show-alms
$ opx-show-alms
2017-07-13 13:31:12.170129 Fan tray 1 absent
2017-07-13 13:34:09.012345 Temperature sensor NPU sensor warning
Display information about environmental system components, such as temperature, fan, and voltage.
opx-show-env
$ opx-show-env
Node
Vendor name: Dell
Service tag: 69Y8VS1
PPID: CN-08YWFG-28298-3AR-0087-A00
Platform name:
Product name: S6000
Hardware version:
Number of MAC addresses: 129
Base MAC address: 90:b1:1c:f4:a8:30
Operating status: Fail
Power supplies
Slot 1
Present: Yes
Vendor name:
Service tag:
PPID: CN0T9FNW282983AR020
Platform name:
Product name: CN0T9FNW282983AR020
Hardware version:
Operating status: Up
Input: AC
Fan airflow: Normal
Slot 2
Present: Yes
Vendor name:
Service tag:
PPID:
Platform name:
Product name:
Hardware version:
Operating status: Up
Input: Invalid
Fan airflow: Invalid
Fan trays
Slot 1
Present: Yes
Vendor name:
Service tag:
PPID: CN0MGDH8282983AR028
Platform name:
Product name: CN0MGDH8282983AR028
Hardware version:
Operating status: Up
Fan airflow: Reverse
Slot 2
Present: Yes
Vendor name:
Service tag:
PPID: CN0MGDH8282983AR028
Platform name:
Product name: CN0MGDH8282983AR028
Hardware version:
Operating status: Up
Fan airflow: Reverse
Slot 3
Present: Yes
Vendor name:
Service tag:
PPID: CN0MGDH8282983AR028
Platform name:
Product name: CN0MGDH8282983AR028
Hardware version:
Operating status: Up
Fan airflow: Reverse
Fans
Fan 1, PSU slot 1
Operating status: Up
Speed (RPM): 6720
Speed (%): 37
Fan 1, Fan tray slot 1
Operating status: Up
Speed (RPM): 6916
Speed (%): 38
Fan 2, Fan tray slot 1
Operating status: Up
Speed (RPM): 6803
Speed (%): 37
Fan 1, Fan tray slot 2
Operating status: Up
Speed (RPM): 7188
Speed (%): 39
Fan 2, Fan tray slot 2
Operating status: Up
Speed (RPM): 7175
Speed (%): 39
Fan 1, Fan tray slot 3
Operating status: Up
Speed (RPM): 7201
Speed (%): 40
Fan 2, Fan tray slot 3
Operating status: Up
Speed (RPM): 6698
Speed (%): 37
Temperature sensors
Sensor T2 temp sensor, Card slot 1
Operating status: Up
Temperature (degrees C): 33
Sensor system-NIC temp sensor, Card slot 1
Operating status: Up
Temperature (degrees C): 25
Sensor Ambient temp sensor, Card slot 1
Operating status: Up
Temperature (degrees C): 27
Sensor NPU temp sensor, Card slot 1
Operating status: Up
Temperature (degrees C): 46
Display detailed information on OPX packages including name, original and current version, if the package was altered since installation, and a short package description.
opx-show-packages
$ opx-show-packages
Name Original Version Current Version Altered Description
=======================================================================================
libopx-nas-l3-1 3.0.0 3.0.0 No This package contains
base layer 3 functionality for the OpenSwitch software
libopx-nas-l2-1 1.12.0 1.12.0 No This package contains
L2 Network abstraction features
Display port statistics for all or a specified Linux interface which maps to physical ports. Enter a filter_list value to display specified statistics.
opx-show-stats [if_stat iface_name filter_list | vlan_stat vlan_ifindex filter_list | clear iface_name vlan_ifindex]
Options:
-
if_stat
— Statistics for all or specified port interfaces -
iface_name
— Physical port (such as e101-001-0) -
filter_list
— Filter to retrieve stats (no filters are applied by default) -
vlan_stat
— Stats for all or a specified VLAN interface -
vlan_ifindex
— VLAN ID using the interface index -
clear
— Clears stats for all or a specified port or VLAN
$ opx-show-stats if_stat e101-001-0
Key:
base-stats/interface/ip/in-discards = 0
base-stats/interface/ether-octets = 13442942147
base-stats/interface/ether-out/pkts-64-octets = 0
base-stats/interface/ether-collisions = 0
base-stats/interface/ether-in/pkts-4096-to-9216-octets = 0
base-stats/interface/ether-in/pkts-1024-to-1518-octets = 0
base-stats/interface/ipv6-out-mcast-pkts = 0
base-stats/interface/if/in-octets = 0
base-stats/interface/ether-jabbers = 0
base-stats/interface/if-out-multicast-pkts = 36295
base-stats/interface/ether-out/pkts-256-to-511-octets = 0
base-stats/interface/if-out-errors = 0
base-stats/interface/ether-rx-no-errors = 0
base-stats/interface/ether/pkts-512-to-1023-octets = 0
base-stats/interface/ether/pkts-64-octets = 0
base-stats/interface/ether/pkts-1024-to-1518-octets = 13125220
base-stats/interface/ipv6/out-discards = 0
base-stats/interface/if/out-octets = 13442942147
base-stats/interface/ether-in/pkts-256-to-511-octets = 0
base-stats/interface/if/out-ucast-pkts = 13125220
base-stats/interface/ether-fragments = 0
base-stats/interface/ether-crc-align-errors = 0
base-stats/interface/ipv6-in-mcast-pkts = 0
base-stats/interface/ether-out/pkts-65-to-127-octets = 34014
base-stats/interface/if-out-broadcast-pkts = 0
base-stats/interface/ether-drop-events = 0
base-stats/interface/if/in-ucast-pkts = 0
base-stats/interface/ether-out/pkts-128-to-255-octets = 2281
base-stats/interface/ether-in/pkts-2048-to-4095-octets = 0
base-stats/interface/ether-tx-oversize-pkts = 0
base-stats/interface/ether/pkts-256-to-511-octets = 0
base-stats/interface/ether-multicast-pkts = 36295
base-stats/interface/ether-out/pkts-4096-to-9216-octets = 0
base-stats/interface/ether/pkts-128-to-255-octets = 2281
base-stats/interface/ether-in/pkts-128-to-255-octets = 0
base-stats/interface/time-stamp = 1455586392
base-stats/interface/ip-in-receives = 0
base-stats/interface/ether-rx-oversize-pkts = 0
base-stats/interface/ether-oversize-pkts = 0
base-stats/interface/ether-out/pkts-1024-to-1518-octets = 13125220
base-stats/interface/if-in-errors = 0
base-stats/interface/ether-out/pkts-512-to-1023-octets = 0
base-stats/interface/if/in-non-ucast-pkts = 0
base-stats/interface/ether-in/pkts-65-to-127-octets = 0
base-stats/interface/ether/pkts-65-to-127-octets = 34014
base-stats/interface/if/in-discards = 0
base-stats/interface/ipv6-in-receives = 0
base-stats/interface/if/out-non-ucast-pkts = 36295
base-stats/interface/ipv6/in-discards = 0
base-stats/interface/ether-tx-no-errors = 13161515
base-stats/interface/ether-broadcast-pkts = 0
base-stats/interface/if-in-broadcast-pkts = 0
base-stats/interface/if/out-discards = 0
base-stats/interface/ether-out/pkts-1519-to-2047-octets = 0
base-stats/interface/ether-out/pkts-2048-to-4095-octets = 0
base-stats/interface/ether-pkts = 13161515
base-stats/interface/ether-in/pkts-1519-to-2047-octets = 0
base-stats/interface/ether/pkts-4096-to-9216-octets = 0
base-stats/interface/ether-undersize-pkts = 0
base-stats/interface/if-in-unknown-protos = 0
base-stats/interface/if-out-qlen = 0
base-stats/interface/if-in-multicast-pkts = 0
base-stats/interface/ether-in/pkts-64-octets = 0
base-stats/interface/ether-in/pkts-512-to-1023-octets = 0
$ opx-show-stats vlan_stat br1
Key:
base-stats/vlan/time-stamp: 1455586573
base-stats/vlan/in-octets: 16381983058
base-stats/vlan/in-pkts: 16101053
base-stats/vlan/out-octets: 55146334258
base-stats/vlan/out-pkts: 67419926
$ opx-show-stats clear e101-001-0
Success
Display system status information including failed services and corrupted packages.
opx-show-system-status
$ opx-show-system-status
System State: running
No Failed Service
No Modified Package
Display information about the transceiver types present.
opx-show-transceivers [summary]
$ opx-show-transceivers summary
Front Panel Port Media Type Part Number Serial Number DellQualified
1 QSFP 40GBASE SR4 AFBR-79E4Z-D-FT1 7503832L005V Yes
2 QSFP 40GBASE SR4 AFBR-79EQDZ-FT1 482943B200GW Yes
3 QSFP 40GBASE CR4 3M 616750003 CN0FC6KV35D6864 Yes
4 Not Present
5 Not Present
...
32 Not Present
Display OPX software version information.
opx-show-version
$ opx-show-version
OS_NAME="OPX"
OS_VERSION="3.0.0"
PLATFORM="S6000-ON"
ARCHITECTURE="x86_64"
INTERNAL_BUILD_ID="OpenSwitch Blue Print 1.0.0"
BUILD_VERSION="3.0.0(27)"
BUILD_DATE="2018-07-25T16:28:19-0700"
INSTALL_DATE="2018-07-08T06:24:18+0000"
SYSTEM_UPTIME= 21 minutes
SYSTEM_STATE= degraded
UPGRADED_PACKAGES=no
ALTERED_PACKAGES=no
Enable SAI-specific logging by module name and level.
opx-switch-log set [module_name] [level_name]
Options:
-
module_name
— SAI module (WRED
,FDB
,ROUTE
,VLAN
,HOST_INTERFACE
,ACL
,MIRROR
,QOS_QUEUE
,SCHEDULER_GROUP
,PORT
,VIRTUAL_ROUTER
,NEXT_HOP_GROUP
,SWITCH
,POLICER
,NEIGHBOR
,UNSPECIFIED
,SAMPLEPACKET
,QOS_MAPS
,ALL
,STP
,LAG
,ROUTER_INTERFACE
,NEXT_HOP
,SCHEDULER
) -
level_name
— SAI logging level (debug
,info
,notice
,warning
,critical
,error
)
$ opx-switch-log set wred debug
© 2019 OpenSwitch project. All information is contributed to and made available by OPX under the Creative Commons Attribution 4.0 International License (available at http://creativecommons.org/licenses/by/4.0/).
- Home
- System overview
- Software releases
- Hardware support
- FAQs
- Install
- Build
- Configure
- Develop
- Administer
- Troubleshoot
- Software compatibility
- Contribute
- DevOps
- Join