How to monitor current output/receive queue length in Linux

by IZhen   Last Updated October 10, 2019 12:00 PM

I want to check the capacity and performance of my network. Besides checking the txkB/s and rxkB/s via Sar, I'd also like to see the average queue length of the network interface(so that the average queueing time in the interface can be calculated). It seems that netstat can give a per socket queue length, is it possible to get a per interface statics(a bit like Network Interface\Output Queue Length in Windows)?

A related and kind of reverse questions is How do I view the TCP Send and Receive Queue sizes on Windows?


Answers 2

It is available in IF-MIB. I'm assuming you already have an snmpd running that supports IF-MIB, if not you'll need to install something like net-snmp. After that walk the box and look for:

IF-MIB::ifOutErrors.4 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 0

From the MIB definition:

The length of the output packet queue (in packets).

August 29, 2011 02:52 AM

To see an interface's current txqueue queue occupancy - look at the backlog (in bytes and packets) return by the tc command (e.g. For eth0):

tc -s -d qdisc ls dev eth0
October 10, 2019 11:10 AM

Related Questions

Updated November 27, 2017 05:00 AM

Updated September 22, 2015 10:00 AM

Updated January 31, 2017 14:00 PM

Updated April 06, 2015 23:00 PM

Updated March 28, 2019 10:00 AM