News, tips, partners, and perspectives for the Oracle Solaris operating system

A D Script for Observing the Network - Take Two

About a year and a half ago I wrote about a nifty little D script I came across while working with the now defunct Crossbow Virtual Wire Demo Tool. However, the script stopped compiling somewhere between the release of OpenSolaris 2009.06 and Solaris 11 Express. 

Solaris 11 Express also included the addition of two new DTrace providers, TCP and UDP. These new providers make it possible to simplify the script and Solaris Systems Architect Andrew Gabriel did this, creating so2.d

bleonard@solaris:~$ sudo dtrace -s so2.d 
Tracing... Hit Ctrl-C to end.
Process Zone Protocol Destination Port Bits
dhcpagent global UDP ff02::1:2 547 512
pidgin global TCP 5223 720
firefox-bin global TCP 80 279536
Trace ran for 8 seconds

The associated Chime display is useful when you want to monitor a system with lots of network traffic. In this example I'm using Netperf to simulate traffic between my global zone and a local zone, which has been configured to run at IP address

In this example you can see we're achieving a throughput of 681,836,544
bits per second, or approximately 682 megabits per second. In my case
the local zone is configured using a VNIC, myzone0:

bleonard@solaris:~$ dladm show-vnic myzone0
myzone0 e1000g0 1000 2:8:20:3f:cc:8a random 0

Notice the link speed of myzone0
is 1000 megabits per second, and at the moment it's using a good chunk of that bandwidth, potentially starving other virtual NICs and
the physical NIC itself from the network. Fortunately, network virtualization allows
me to put some reigns on my virtual NICs. For example, if I do the

bleonard@solaris:~$ sudo dladm set-linkprop -p maxbw=200 myzone0

Above we can see we're now running just under 200 megabits per second. Or More ridiculously:

bleonard@solaris:~$ sudo dladm set-linkprop -p maxbw=2 myzone0

We're now under 2 megabits per second.

Now it is also possible to drill down on the Chime display, graphing throughput over time. The above scenario looks like so:

If you want to check this out on your own environment, you only need the D script, Chime and the Network display:

Note, you'll have to edit the programFileName property of Network.xml to the location you saved the D script:
 <void property="programFileName">

To launch the Chime display:

chime -C ./Network.xml

To run the netperf test for an extended period of time:

netperf -H <ip address of netserver> -l <seconds to run>

Join the discussion

Comments ( 1 )
  • guest Sunday, October 9, 2011

    Just to inform you i like very much your blog full of info, but right now i'm running ubuntu, and trying to install the joynet OS,but keep it up mate,Ciao

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha