[pox-dev] port statistic documentation
Murphy McCauley
murphy.mccauley at gmail.com
Thu Nov 28 22:53:24 PST 2013
On Nov 28, 2013, at 10:25 PM, Dhanu <dhanu.d at gmail.com> wrote:
> Dear everyone
>
>
> is there any documentation about port stats? i.e, what are the meaning of the stats like tx_dropped, tx_bytes etc
The OpenFlow specification defines these fields:
http://archive.openflow.org/documents/openflow-spec-v1.0.0.pdf
.. but it doesn't actually say too much about exactly what they are, so implementations (particular switches) may vary a bit in exactly what they mean. However, it's worth noting that the fields in OpenFlow correspond *extremely* closely to the statistics kept by network interfaces in Linux, so figuring out what they mean in Linux is probably a good start -- particularly if your switch is Linux-based.
> why only the rx_packets, rx_bytes, tx_packets, tx_bytes that have non zero value in my port stats below?
> what about the other stats?
>
> even when i add flow to drop all packet, it's still zero
The other fields are all for various types of errors. They're all zero because you haven't experienced any errors.
Note that the "dropped" counters here are for when a packet is dropped due to part of the send or receive process (e.g., a DMA error when the kernel tries to send to the NIC), and not for when the OpenFlow datapath was *instructed* to drop the packet (which isn't an error).
-- Murphy
> thank you for your help
>
> Dhanu
>
> ----------------------------------------------------------------------------------------------------------------------
> sudo ovs-ofctl dump-flows s2
> NXST_FLOW reply (xid=0x4):
> cookie=0x0, duration=49.218s, table=0, n_packets=2, n_bytes=140, dl_dst=b2:8b:ce:50:85:06 actions=drop
> cookie=0x0, duration=258.99s, table=0, n_packets=48, n_bytes=1968, priority=65000,dl_dst=01:23:20:00:00:01,dl_type=0x88cc actions=CONTROLLER:65535
> -----------------------------------------------------------------------------------------------------------------------
>
> PortStatsReceived from 00-00-00-00-00-02:
> [{'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 62016, 'rx_frame_err': 0, 'rx_bytes': 4403255, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 92435952, 'rx_dropped': 0, 'tx_packets': 66607, 'port_no': 3},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 1433, 'rx_frame_err': 0, 'rx_bytes': 125334, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 120620, 'rx_dropped': 0, 'tx_packets': 1487, 'port_no': 2},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 1473, 'rx_frame_err': 0, 'rx_bytes': 153726, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 548648, 'rx_dropped': 0, 'tx_packets': 1983, 'port_no': 4},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 0, 'rx_frame_err': 0, 'rx_bytes': 0, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 24821, 'rx_dropped': 0, 'tx_packets': 445, 'port_no': 65534},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 68471, 'rx_frame_err': 0, 'rx_bytes': 93026859, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 4694820, 'rx_dropped': 0, 'tx_packets': 65227, 'port_no': 1}]
>
> PortStatsReceived from 00-00-00-00-00-01:
> [{'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 74184, 'rx_frame_err': 0, 'rx_bytes': 5326195, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 115525746, 'rx_dropped': 0, 'tx_packets': 88261, 'port_no': 3},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 5341, 'rx_frame_err': 0, 'rx_bytes': 1991874, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 394175, 'rx_dropped': 0, 'tx_packets': 4159, 'port_no': 2},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 4, 'rx_frame_err': 0, 'rx_bytes': 300, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 52534, 'rx_dropped': 0, 'tx_packets': 1114, 'port_no': 5},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 84847, 'rx_frame_err': 0, 'rx_bytes': 113724236, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 5170308, 'rx_dropped': 0, 'tx_packets': 73127, 'port_no': 4},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 0, 'rx_frame_err': 0, 'rx_bytes': 0, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 38496, 'rx_dropped': 0, 'tx_packets': 769, 'port_no': 65534},
> {'rx_over_err': 0, 'tx_dropped': 0, 'rx_packets': 1707, 'rx_frame_err': 0, 'rx_bytes': 144850, 'tx_errors': 0, 'rx_crc_err': 0, 'collisions': 0, 'rx_errors': 0, 'tx_bytes': 186758, 'rx_dropped': 0, 'tx_packets': 2454, 'port_no': 1}]
>
> -----------------------------------------------------------------------------------------------------------------------
>
>
>
> thanks
>
>
More information about the pox-dev
mailing list