Yes! A new version is now available with some long-awaited features. Many thanks to those who suggested improvements and helped with testing.
Changes for Version 1.90, April 2011
- nicstat.sh script, to provide for automated multi-platform deployment. See the Makefile's for details.
- Added "-x" flag, to display extended statistics for each interface.
- Added "-t" and "-u" flags, to include TCP and UDP (respectively) statistics. These come from tcp:0:tcpstat and udp:0:udpstat on Solaris, or from /proc/net/snmp and /proc/net/netstat on Linux.
- Added "-a" flag, which equates to "-tux".
- Added "-l" flag, which lists interfaces and their configuration.
- Added "-v" flag, which displays nicstat version.
- Added use of libdladm.so:dladm_walk_datalink_id() to get list of interfaces. This is better than SIOCGLIFCONF, as it includes interfaces given exclusively to a zone.
NOTE: this library/routine can be (by default is) linked in to nicstat in "lazy" mode, meaning that a Solaris 11 binary built with knowledge of the routine will also run on Solaris 10 without failing when the routine or library is not found - in this case nicstat will fall back to the SIOGLIFCONF method.
- Added search of kstat "link_state" statistics as a third method for finding active network interfaces. See the man page for details.
- Added support for SIOCETHTOOL ioctl, so that nicstat can look up interface speed/duplex (i.e. "-S" flag not necessarily needed any longer).
- Removed need for LLONG_MAX, improving Linux portability.
nicstat source and binaries are available from sourceforge
For more history on nicstat, see my earlier entry