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?
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).
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