Learning EMC server stats for statistic collection

Once upon a time, not too long ago, the EMC's command line interface utilized a few known commands for gathering statistics. The commands I grew used to were called server_cifsstat and server_nfsstat but then one day when I called upon their mighty powers they responded to me with an unexpected echo:

Info 26306752352: server_2 : This command has been deprecated and replaced with server_stats command.

"Deprecated!?", I yelled into the air, fists raised high as if I was clutching doom! I slowly put my hands down, took a deep breath and started to focus my inner child towards more positive thoughts. Years of software development and design decisions played through my head as I realized, "there must be a new way of doing the old thing." I just had to search for an answer, much as my old friend Indiana Jones would do, I went into the deep dark caverns of documentation to solve the riddle.

Okay, I'm really not that great at reading documentation but once I found a command called server_stats (keyword "stats" gave it away to me) I realized I was heading down the right path… but I was still lost in the darkness. When I executed the command I received a cryptic message:

[nasadmin@EMC-VNX-SIM ~]$ server_stats
   | -info [-all|[,...]]
   | -service { -start [-port ]
      | -stop
      | -delete
      | -status }
   | -monitor -action {status|enable|disable}
     [{ -monitor {statpath_name|statgroup_name}[,...]
     | -monitor {statpath_name|statgroup_name}
        [-sort ]
        [-order {asc|desc}]
        [-lines ]
[-count ]
[-interval ]
[-terminationsummary {no|yes|only}]
[-format {text [-titles {never|once|}]|csv}]
[-type {rate|diff|accu}]
[-file  [-overwrite]]

The command, which was pretty easy before, has turned into something a bit harder for me to wield but, thanks to some research, experimentation and friends here I can count on, we formulated a single-line statistics gathering command that would do what we needed. I emphasis friends that I can count on, because we have some pretty brilliant folks here. This is the magic sauce (all one one line):


server_stats server_2 -monitor cifs.smb1,cifs.smb2,nfs.v2,nfs.v3,nfs.v4,cifs.global,nfs.basic -format csv -terminationsummary no -count 144 -interval 300 -type accu -file name-server_2.csv


This command will capture statistics for CIFS/SMB version 1 and 2 as well as NFS version 2, 3 and 4 along with a few more statistics that we may want in the future (bandwidth, other stats and goodies, etc.) It will capture 144 statistical snapshots in time, every 300 seconds, and save them into name-server_2.csv (a comma-separated file with a nice header). One piece of the puzzle, that took me by surprise, was the -type accu option, which accumulates statistics upon each capture rather than starting back at a baseline of zero. You can also do 'diff' to capture the difference from interval to interval, which is nice… but unfortunately I am not able to utilize that feature.

We have written tools to scan statistics on some storage devices like EMC and Network Appliance and, while this new command is super awesome, it's not consistent with anything else out there (even older releases prior to deprecation) so our in-house tools which calculate differences do the work for us.

If you're looking to start working with the newer server_stats feature, I suggest using the online manual pages (man server_stats) to get a slightly more clear understanding of all the features and what they can do for you. I believe the command is a bit large for what it needs to do for us, considering it deprecated a much simpler series of commands. However, we work with what we have and hopefully our example command line implementation will give you an understanding of how you can unlock the potential of server_stats for your own needs.


Published Dec 09, 2011
Version 1.0

Was this article helpful?

1 Comment

  • Derrick_Schomme's avatar
    Historic F5 Account
    Awesome, glad you found it useful. Some of the emc statistics options can be pretty tough to understand/read, it's almost a job onto itself!