Inventory Database
Introduction
Pica-OVS mode switch needs to store some basic switch information and some run-time information in the inventory database, this feature is running when Pica-OVS starts.
There are five kinds of information in this module as shown below, including basic Switch Information, SFP/QSFP Information, Counter Information, Alarm Information, and Hardware Flow Information.
Switch Information
Show function control information.
root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 10 counter_enable: false hwflow_enable: false counter_query_interval: 30 hwflow_query_interval: 30 alarm_enable: false alarm_high_temp: 176 alarm_low_temp: 32 last_alarm_id: 0
Â
Show basic switch information in the Switch Inventory table, including switch information, temperature information, port information and SFP/QSFP information.
Before checking the switch information, the DUT must create a bridge and add ports into the bridge. Then make sfp enable-true.
root@PicOS-OVS$ovs-invctl enable-sfp true  root@PicOS-OVS$ovs-invctl show-switch-inventory 2ef72735-5c91-43a3-9c95-cb16dd8b2cd7 model: "P3295" system_mac: "e8:9a:8f:50:3d:30" vendor_name: "Pica8" serial_number: "QTFAXI12400017" ge_port_number: 48 te_port_number: 4 qe_port_number: 0 cpu_temperature: "100 F" switch_temperature: "100 F" system_temperature: "93 F" 7c40378e-751f-470f-a8ad-7176a9c16b2c port_name: "te-1/1/50" vendor_name: JESS-LINK vendor_sn: "12344D0001" wavelength: "256 nm" temperature: "32 F" supply_voltage: "0.00 V" connector: "Copper pigtail" length_copper: "5 m" length_50m: "0 m" length_625m: "0 m" length_9m: "0 m" length_9m_km: "0 m" plugged_in: true rx_receive_power: "-inf dbM" tx_bias_current: "0.00 mA" tx_optical_power: "-inf dbM"
SFP/QSFP Information
SFP/QSFP information is stored into the database if user enables this feature. The Administrator could enable/disable this function by using command "ovs-invctl enable-sfp {true | false}".
root@PicOS-OVS$ovs-invctl enable-sfp true  Administrator could show these information by command "ovs-invctl show-switch-inventory" or "ovs-invctl show-sfp-qsfp".  root@PicOS-OVS$ovs-invctl show-sfp-qsfp 84cb20bd-4ddc-4094-aaaa-b36dc59332a9 port_name: "te-1/1/49" vendor_name: JESS-LINK vendor_sn: "12344D0001" wavelength: "256 nm" temperature: "32 F" supply_voltage: "0.00 V" connector: "Copper pigtail" length_copper: "5 m" length_50m: "0 m" length_625m: "0 m" length_9m: "0 m" length_9m_km: "0 m" plugged_in: true rx_receive_power: "-inf dbM" tx_bias_current: "0.00 mA" tx_optical_power: "-inf dbM" Â
Â
Administrator could control the refresh interval by command "ovs-invctl set-sfp-interval."
root@PicOS-OVS$ovs-invctl set-sfp-interval 50 root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: false hwflow_enable: false counter_query_interval: 30 hwflow_query_interval: 30 alarm_enable: false alarm_high_temp: 176 alarm_low_temp: 32 last_alarm_id: 0
Counter Information
There are 4 types of counters: flow, group, meter, and port counter. As expected, the flow counter is the counter of each flow and the port counter is the counter of each port. The meter counter is the counter of each meter, associated with the band counter, and the group counter is the counter of each group, associated with the bucket counter.
Note: this kind of information generates a lot of data. Turning this on will spend some CPU and memory. So if this information is not needed, please turn it off.
Â
Administrator could enable/disable this function by command "ovs-invctl enable-counter {true | false}"
root@PicOS-OVS$ovs-invctl enable-counter true
Â
Administrator could control the refresh interval by command "ovs-invctl set-counter-interval".
root@PicOS-OVS$ovs-invctl enable-counter true root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: true hwflow_enable: false counter_query_interval: 20 hwflow_query_interval: 30 alarm_enable: false alarm_high_temp: 176 alarm_low_temp: 32 last_alarm_id: 0
Â
The Administrator could show this information by command "ovs-invctl show-port/meter/flow/group-counter" or "ovs-invctl show-all-counter".
root@PicOS-OVS$ovs-invctl show-all-counter Switch PicOS-OVS Bridge "br0" Port "Bridge br0 Local Port" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=368, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=4, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0} Port "Bridge br0 Port 50" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=0, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=0, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0} Port "Bridge br0 Port 49" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=0, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=0, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0} Â root@PicOS-OVS$ovs-invctl show-port-counter Switch : PicOS-OVS Bridge : br0 Port "Bridge br0 Local Port" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=368, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=4, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0} Port "Bridge br0 Port 49" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=0, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=0, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0} Port "Bridge br0 Port 50" statistics: {collisions=0, duration_nsec=3220239464, duration_sec=1208147968, multicast=0, rx_bytes=0, rx_crc_errors=0, rx_dropped=0, rx_errors=0, rx_fifo_errors=0, rx_frame_errors=0, rx_length_errors=0, rx_missed_errors=0, rx_over_errors=0, rx_packets=0, tx_aborted_errors=0, tx_bytes=0, tx_carrier_errors=0, tx_dropped=0, tx_errors=0, tx_fifo_errors=0, tx_heartbeat_errors=0, tx_packets=0, tx_window_errors=0}Alarm information
Alarm Information
Alarm stores the alarm information about: PSU, FAN, OPTICS, PORT, TEMP, MANAGEMENT_PORT_STATUE. This information is stored in the Alarm table.
Administrator could enable/disable this function by command "ovs-invctl enable-alarm {true | false}".
root@PicOS-OVS$ovs-invctl enable-alarm true  root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: true hwflow_enable: false counter_query_interval: 20 hwflow_query_interval: 30 alarm_enable: true alarm_high_temp: 176 alarm_low_temp: 32 last_alarm_id: 9
The Administrator could control the temperature threshold by the command "ovs-invctl set-high/low-temp". When the switch temp id is higher or lower then the temperature threshold, it will produce an alarm message.
root@PicOS-OVS$ovs-invctl set-low-temp 10 root@PicOS-OVS$ovs-invctl set-high-temp 133 Â root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: true hwflow_enable: false counter_query_interval: 20 hwflow_query_interval: 30 alarm_enable: true alarm_high_temp: 133 alarm_low_temp: 10 last_alarm_id: 9
The Administrator could show this information by the command "ovs-invctl show-alarm"
root@PicOS-OVS$ovs-invctl show-alarm Alarm 1 severity_code: cleared switch_name: PicOS-OVS entity_text: "te-1/1/50" text: "Optics inserted" time: "Tue Nov 3 13:49:28 2015" Alarm 2 severity_code: cleared switch_name: PicOS-OVS entity_text: "te-1/1/49" text: "Optics inserted" time: "Tue Nov 3 13:49:28 2015" Alarm 3 severity_code: critical switch_name: PicOS-OVS entity_text: "power 1" text: "power removed" time: "Tue Nov 3 13:49:39 2015" Alarm 4 severity_code: critical switch_name: PicOS-OVS entity_text: "PSU 1" text: "PSU removed" time: "Tue Nov 3 13:49:39 2015"
Hardware Flow Information
Note: This kind of information is very large, turning this feature on will spend some CPU and memory. So if this information is not needed, please turn it off. For saving memory, we support max 20,000 hardware flows written into the database. If the count of hardware flows is exceeded, they are discarded.
Â
Administrator could enable/disable this function by the command "ovs-invctl enable-hwflow {true | false}".
root@PicOS-OVS$ovs-invctl enable-hwflow true  root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: true hwflow_enable: true counter_query_interval: 20 hwflow_query_interval: 30 alarm_enable: true alarm_high_temp: 133 alarm_low_temp: 10 last_alarm_id: 9
Â
The Administrator could control the refresh interval by command "ovs-invctl set-hwflow-interval INTEGER".
root@PicOS-OVS$ovs-invctl enable-hwflow true  root@PicOS-OVS$ovs-invctl set-hwflow-interval 50 root@PicOS-OVS$ovs-invctl show 23aa0580-9578-471a-abae-a9c84b73affd sfp_enable: true sfp_query_interval: 50 counter_enable: true hwflow_enable: true counter_query_interval: 20 hwflow_query_interval: 50 alarm_enable: true alarm_high_temp: 133 alarm_low_temp: 10 last_alarm_id: 9
The Administrator could get hardware flow information by the command  "ovs-invctl list Hardware_Flow"
Others Hardware_Flow commands are available by using the command "root@PicOS-OVS$ovs-invctl --help"
root@PicOS-OVS$ovs-invctl list Hardware_Flow _uuid : e6e61c9d-df38-43c6-abc0-2b0654af9713 hwflow : "[\"#0 normal_d permanent priority=0,recirc_id=0, actions:drop\", \"#1 normal permanent recirc_id=0,tcp,in_port=49,dl_src=22:11:11:11:11:11,dl_dst=22:00:00:00:00:00,nw_src=1.1.2.100,nw_dst=2.2.2.100, actions:50\"]" update_time : "Tue Nov 3 15:11:19 2015"
Show Power/Fan Information
root@PicOS-OVS$ovs-invctl list power-status _uuid : 19af5a8c-9adc-4d92-8615-0e4a50aadabd good_12v : "false" led : "" number : 1 power_alert : "" present : "false" _uuid : 95b3fa12-8f6e-4709-bf0a-363a9fda0c2f good_12v : "true" led : "" number : 2 power_alert : "" present : "true" Â root@PicOS-OVS$ovs-invctl list fan_status _uuid : 43d903ec-7894-4df7-833b-5d5a1004b388 direction : "fan direction from front to back" fault : "false" input : " 11400 rpm" number : 3 pwm : " 50 %"
Â
Copyright © 2024 Pica8 Inc. All Rights Reserved.