Added "-U" option, to display separate read and write utilization. Simplified display code regarding "-M" option.
For Solaris, fixed fetch64() to check type of kstats andf ixed memory leak in update_nicdata_list(). Full details at the entry for version 1.95
Added "-M" option to display throughput in Mbps (Megabits per second). Fixed some bugs. Full details at the entry for version 1.92
Many new features available, including extended NIC, TCP and UDP statistics. Full details at the entry for version 1.90
Nicstat now can produce parseable output if you add a "-p" flag.
This is compatible with
System Data Recorder (SDR).
Links below are for the new version - 1.22.
Just a little one - nicstat now works on shared-ip Solaris zones.
OK, this is heading toward overkill...
The more I publish updates, the more I get requests for
enhancement of nicstat. I have also decided to complete a few things
that needed doing.
The improvements for this month are:
All source and binaries will from now on be distributed in a tarball.
This blog entry will remain the home of nicstat for the time
Lastly, I have heard the requests for easier availability in
OpenSolaris. Stay tuned.
That's more like it - we should get plenty of coverage now :)
A colleague pointed out to me that nicstat's method of calculating
utilization for a full-duplex interface is not correct.
Now nicstat will look for the kstat "link_duplex" value, and if it is 2 (which means full-duplex),
it will use the greater of rbytes or wbytes to calculate utilization.
No change to the Linux version. Use the links in my previous post for downloading.
I should probably do this at least once a year, as nicstat needs
A number of people have commented to me that nicstat always reports
"0.00" for %Util on Linux. The reason for this is that there is no
simple way an unprivileged user can get the speed of an interface in
Linux (quite happy for someone to prove me wrong on that however).
Recently I got an offer of a patch from David Stone, to add an option
to nicstat that tells it what the speed of an interface is. Pretty
reasonable idea, so I have added it to the Linux version. You will
see this new "-S" option explained if you use nicstat's "-h" (help)
I have made another change which makes nicstat more portable, hence
easier to build on Linux.
A few years ago, a bloke I know by the name of Brendan Gregg wrote a
Solaris kstat-based utility called nicstat. In 2006 I decided I
needed to use this utility to capture network statistics in testing I
do. Then I got a request from a colleague in PAE to do something
about nicstat not being aware of "e1000g" interfaces.
I have spent a bit of time adding to nicstat since then, so I thought
I would make the improved version available.
nicstat is to network interfaces as "iostat" is to disks, or "prstat"
is to processes. It is designed as a much better version of "netstat
-i". Its differences include:
eac-t2000-3[bash]# nicstat 5
For more examples, see the man page.
Note - the Solaris binaries will work on later releases; and probably on earlier