Package: nicstat Version: 1.92-1 Severity: important Tags: patch nicstat uses the nic's duplex mode (as obtained via ioctl or from the command line) to work out utilisation, like so:
half duplex: (tx + rx) / speed full duplex: max(tx, rx) / speed The code that calculates this checks the duplex mode against a numeric value (`2') that (apparently) is the value of DUPLEX_FULL on Solaris. On Linux, DUPLEX_FULL has a different value and so nicstat will always treat full duplex cards as half duplex and get the utilisation wrong; hence the increased severity. The code that prints the interface list does use the macro so the duplex mode is displayed correctly. diff --git a/nicstat.c b/nicstat.c index 3b028d7..daa87cc 100644 --- a/nicstat.c +++ b/nicstat.c @@ -2076,7 +2076,7 @@ print_stats() * 100 for the % conversion, and 8 for * bytes2bits. */ - if (nicp->duplex == 2) + if (nicp->duplex == DUPLEX_FULL) /* Full duplex */ if (wbps > rbps) util = wbps * 800 / nicp->speed; Thanks, -- Stelios. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org