Archive for January, 2008

NetApp’s “lun_top” utility

Add comment 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

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.
Installation
  1. 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.
  2. 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.
Example

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.

Download:

http://www.serverchief.com/netapp/lun_top.zip

Example:

perl lun_top -s ssh -k -i 1 -F -c 1 -A nyfiler1.serverchief.com

Hope you find it useful!!!

VmWare Patches Screen Scrapper in Perl

Add comment January 4th, 2008

I have written a perl script that screen scrapes the vmware patches pages and generates an output that can be used in esx upgrade scripts

To view the sample, visit following pages (re-generated every 4 hours):

VmWare ESX 3.0.0 - http://www.serverchief.com/esx-updater/feed/vi3_patches_300.txt
VmWare ESX 3.0.1 - http://www.serverchief.com/esx-updater/feed/vi3_patches_301.txt
VmWare ESX 3.0.2 - http://www.serverchief.com/esx-updater/feed/vi3_patches_302.txt
The perl source code is available Script is realeased under GPL License Agreement, please give author a credit, if used in your environment. :)

Enjoy …