SAR (System Activity Reporter) reporting more bytes than expected

I was using SAR for monitoring bandwidth in one of my projects and I was not sure if it is reporting correct data. So I wrote a very simple dummy program (in java) for testing it which opens a server socket, opens a client connection to that server socket. The server socket upon accepting that client connection, starts writing bytebuffer (of size 1) in a while(true) loop with 1 sec sleep between each iteration. Ideally, I would expect 1 byte transfer every second on the loopback interface in the "SAR -n DEV 1 100" output but what I see is following:

10:54:53    IFACE    Ipkts/s      Ibytes/s     Opkts/s      Obytes/s 

10:54:56    lo0            2           113           2           113
10:54:56    gif0           0             0           0             0
10:54:56    stf0           0             0           0             0
10:54:56    en0            0             0           0             0
10:54:56    en1            0             0           0             0
10:54:56    fw0            0             0           0             0
10:54:56    vmnet1         0             0           0             0
10:54:56    vmnet8         0             0           0             0

Anyone who can explain this output ?

thanks, sandeep


If you're using a TCP connection, you don't transfer just the bytes, you also transfer some header information for each packet. Also, the client will have to acknowledge each packet received.

Need Your Help

How can it be useful to overload the “function call” operator?

c++ operator-overloading functor function-object

I recently discovered that in C++ you can overload the "function call" operator, in a strange way in which you have to write two pair of parenthesis to do so:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.