Easy network I/O monitor steps
On Solaris, a tool called nicstat from the freeware K9Toolkit reports network utilization and saturation by network interface. The K9Toolkit is also included in the Solaris Performance Tools CD 3.0 package mentioned earlier in the “Monitoring CPU Utilization on Solaris” section of this chapter. The K9Toolkit can also be downloaded from http://www.brendangregg.com/k9toolkit.html.
nicstat has the following command line syntax:
nicstat [-hnsz] [-i interface[,…]] | [interval [count]]
where -h displays a help message, -n shows nonlocal interfaces only, -s shows a summary output, -z skips reporting of zero values, -i interface is the network interface device name, interval is the frequency at which output is to be reported in seconds, and count is the number of samples to report. The following is example output from nicstat -i yukonx0 1, which samples the network interface device yukonx0 at a 1 second interval.
The column headings are
Int is the network interface device name.
rKb/s is the number of kilobytes read per second.
wKb/s is the number of kilobytes written per second.
rPk/s is the number of packets read per second.
wPk/s is the number of packets written per second.
rAvs is average bytes read per read.
wAvs is the average bytes written per write.
%Util is the network interface utilization.
Sat is the saturation value.
As you can see a wealth of meaningful data is presented with nicstat to help you identify whether your distributed Java application is saturating the network. You can see there is activity occurring at the yukonx0 network interface as shown in the number of bytes read and written yet the network utilization never reaches much above 4% utilization. As a result, you can conclude the applications running on this system are not experiencing a performance issue as a result of a saturated network.
Monitoring Network I/O Utilization on Linux
Monitoring Network I/O Utilization on Linux A port of the Solaris nicstat monitoring tool for Linux is available. The source code can be downloaded from http://blogs.sun.com/roller/resources/timc/nicstat/nicstat-1.22.tar.gz. It requires compilation before being able to use it. It reports network utilization in the same way as described in the previous section on monitoring network utilization on Solaris.
Monitoring Network I/O Utilization on Windows
Monitoring network utilization on Windows is not as simple as adding performance counters to Performance Monitor and observing their values. It requires knowing the possible bandwidth of the network interface you are interested in monitoring and some measure of the amount of data passing through the network interface. The number of bytes transmitted across a network interface can be obtained using the “\Network Interface(*)\Bytes Total/sec” performance counter. The “*” wildcard reports the bandwidth for all network interfaces on the system.
You can use the typeperf \Network Interface(*)\Bytes Total/sec command to see the names of the network interfaces. Then, you can replace the wildcard “*” with the network interface you are interested in monitoring. For example, suppose the output from typeperf \Network Interface(*)\Bytes Total/sec shows the network interfaces as Intel[R] 82566DM-2 Gigabit Network Connection, isatap. gateway.2wire.net, Local Area Connection* 11 and you know the network interface card installed in your system is an Intel network card. You can substitute “Intel[R] 82566DM-2 Gigabit Network Connection” for the “*” wildcard when adding the performance counter to Performance Monitor or when using the typeperf command.
In addition to the bytes transmitted across the interface, the bandwidth of the network interface must also be obtained. It can be obtained using the “\Network Interface(*)\Current Bandwidth” performance counter. Again, the “*” wildcard should be replaced with the network interface you are interested in monitoring. It is important to note that the Current Bandwidth performance counter reports bandwidth in bits per second. In contrast, the Bytes Total/sec reports in units of bytes per second. Therefore, the formula to calculate network utilization must compensate for the proper units, bits per second, or bytes per second. The following are two formulas that compute network utilization: the first one by adjusting the Current Bandwidth into bytes per second by dividing the Current Bandwidth by 8, and the second one by adjusting the Bytes Total/sec into bits per second by multiplying it by 8 (8 bits per byte).
network utilization % = Bytes Total/sec/(Current Bandwidth / 8) x 100
Or, alternatively as
network utilization % = (Bytes Total/sec * 8) / Current Bandwidth x 100
Network utilization can also be monitored in Windows using Task Manager and clicking on the Networking tab. An example is shown in below Figure
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.