NetApp’s “lun_top” utility
January 16th, 2008
Have you ever wanted to run linux like top command and see most active luns on your NetApp filers?
Even if this twisted idea never crossed your mind, this is one of the usefull tools to keep your eye on when managing NetApp filer(s).
The Lun Top tool is a client-based utility that scans a filer via rsh/ssh and ranks the LUNs by usage. It enables the user to identify LUNs with the most activity on a given filer. There are two versions available: a Perl script for UNIX and an executable file for Windows.
Usage is as follows:
lun_top [-s shell] [-k] [-i interval] [-F | -I] [-c count] [-A] filer
- -s shell
- By default, the script uses rsh, but if you need another binary (remsh, ssh, etc.), use this flag to specify.
- -k
- Ranks by Kbytes per interval rather than the default ops/interval
- -i interval
- Sets the interval between updates and calculations in seconds. Default is 10 seconds (like sysstat).
- -F
- This flag will only show FCP luns, not iSCSI (default is to show all LUNs).
- -I
- This flag will only show iSCSI luns (default is to show all LUNs).
- -c count
- This will stop the loop after iterations. Default is to loop forever, until CTRL-C breaks it.
- -A
- Show the initiator adapters (WWPN or IQN) rather than the igroup. Default is to show the igroup.
- filer
- Name (or IP) of the filer to monitor. Must have rsh or ssh access from the host running the script.
- For a UNIX client with Perl, simply run the lun_top script. Make sure that the LunTop.pm file is in the same directory as the lun_top script.
- For a Windows client which does not have Perl installed, simply run the lun_top.exe file included in the package. Other files in the package are not needed.
Here is an example of output:
Lun: Ops: Igroup: ================================================================================= lun.4 8478074 ESX lun.5 3805463 ESX lun.1 3222303 ESX lun.2 1889689 ESX lun.6 1740423 ESX lun.3 1561762 ESX lun.0 778500 ESX iscsi_vir 8081 iscsi-vir test.lun 608 viaRPC.iqn.1991-05.com.microsoft:ex1.rtp.netapp.lab lun.7 46 ESX
From this output, it is clear that LUNs that belong to the igroup ESX are the busiest in terms of ops. The server(s) that own these luns can be determined by looking at the igroup in the filer.
Example:
perl lun_top -s ssh -k -i 1 -F -c 1 -A nyfiler1.serverchief.com
Hope you find it useful!!!
Entry Filed under: Tutorials, best-practice
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed