cifssvrtop updated

When I originally wrote cifssvrtop (top for CIFS servers), all of the systems I tested with had one thing in common: the workstations (clients) had names. Interestingly, I recently found a case where the workstations are not named, so the results were less useful than normal.


2012 Sep 11 23:50:48, load: 3.11, read: 0        KB, write: 176448   KB
Client          CIFSOPS   Reads  Writes   Rd_bw   Wr_bw    Rd_t    Wr_t  Align%
                   3391       0    3033       0  192408       0      85     100
all                3391       0    3033       0  192408       0      85     100

In this case, there are supposed to be 5 clients. But none have workstation names, so they all get lumped together under "". 

The fix is, of course, easy and obvious: make an option to discern clients by IPv4 address instead of workstation name. This is more consistent with nfssvrtop and iscsisvrtop, a good thing. Now the output looks like:

2012 Sep 12 19:52:23, load: 2.50, read: 0        KB, write: 1766632  KB
Client          CIFSOPS   Reads  Writes   Rd_bw   Wr_bw    Rd_t    Wr_t  Align%
172.60.0.101        452       0     441       0   27984       0     108     100
172.60.0.104        488       0     473       0   30072       0     101     100
172.60.0.103        505       0     490       0   31068       0     849      99
172.60.0.102        625       0     614       0   38979       0    2710      99
172.60.0.105        792       0     773       0   49002       0    4548      99
all                2864       0    2792       0  177106       0    2030      99

Here we can clearly see the clients separated by IPv4 address. The sorting is by CIFSOPS, which is the easiest way to deal with dtrace aggregations.

To implement this change, I added a new "-w" flag that will print the workstation name instead of the IPv4 address. If you prefer the previous defaults, then feel free to fork it on github.

I've updated the cifssvrtop sources in github, check it out. The code has details, the "-h" option shows usage, and there is a PDF presentation to accompany the top tools there. Finally, feedback and bug reports are always welcome!



Comments