The Qlogic Command Line

For many environments, a Qlogic switch can be as simple as plugging it into the wall to get working. The web interface is a great tool and appropriate for many a configuration, but the interactive shell environment on the switches gives a few more options.
Let’s first get logged into the switch. The switch will have an IP address, so telnet into that address (I’ll use the my IP rather than the default IP of 10.0.0.1 that the switches ship with):

telnet 192.168.210.87

Once you provide a password you’ll be placed into an Interactive Command Line Interface SHell environment, which Qlogic calls CLISH.

This switch supports a dual-stacked IPv4 and IPv6 network connection.
Use the ‘set setup system’ command to change the network settings.
Either IPv4 or IPv6 can be disabled, otherwise the switch will run in
dual-stack mode.

Because you need to be an administrator to do almost anything fun on these things, let’s start an administrative session by issuing the admin command in the interactive shell, followed by the start verb:

admin start

Next up, let’s look at our active ports using the show command, along with the port verb:

show port

Once we can see our ports, let’s check out one specific port, again using the show port, but this time specifying a port number:

This shows us a pretty good amount of information, from the link speed plugged into a given port to the brand of transceiver that is being used and the WWN of the actual , in this case, initiator. We also see whether or not IOStreamGuard is enabled (in this case we’re dealing with an initiator, so it is) and what the available media speeds are for the port as well as available speeds for that port. Also notice that the ports have no statistics. Here, we want to keep an eye on things like TotalErrors, LIPs (LIP*), LinkFailures, RxLinkResets and ALInitError. Basically, if it’s in the above list and it sounds bad then it probably is…
Because switches have been running in many cases for years, it turns out that sometimes you’ll find resetting port statistics to be pretty helpful as it will enable you to see only the latest information for troubleshooting. When troubleshooting, you can use the baseline options in the GUI, but every now and then while you’re troubleshooting, many will want to work with as small a subset of data as possible and so will want to clear out information regarding a port. The GUI can clear baseline stats, but not historical statistics. To clear these stats, we’re going to use the set command, along with the port (as we’re setting something on a port) followed by the clear verb and then the port number:

set port clear 1

You can also do the same command without indicating a port numbering order to clear ’em all out:

set port clear

Show also comes with a an option to show logs:

show log

And to see more historical information:

show log archive

I usually pipe that information into a text file for easier parsing. Because the date seems off on most switches where people forget to put time servers in, running the date command will let you figure out an appropriate offset for log file isolation:

date

And one of my favorite commands tells me how long the switch has been up:

uptime

As with Mac OS X and linux, the ps command shows us running processes:

ps

And show interface is the equivalent of an ifconfig in a standard shell environment:

show interface

And many a problem is based on a port configuration issue, so to see information on a given port:

Next up, let’s look at zoning. This is one of the most common things that you’ll need to use the command line for as you cannot enable the default zone using the GUI and the 9200 ships with it disabled. To start off, let’s use that show command, along with the config (as we’re going to be looking at a configuration option) and then zoning so we only see our options for zoning:

show config zoning

While we’re in admin mode, we’re not a mode to edit our configuration, so let’s jump into the config mode:

config edit

Now that we can actually edit our configuration, let’s run the set command, along with the config and then zoning:

set config zoning

On a 56xx, this brings up a little wizard that asks us 3 questions, the current answer to which is in brackets and can be retained by simply hitting the enter key for that option. Or, type the other option. In the following example we’re allowing the DefaultZone:

But on a 9×00 it brings up 4 options, the 4th being oft problematic as most Xsan’s these days seem to have more than 64 nodes per zone (although most Xsan environments are’t gonna’ hit the 10,000 limit):

The reason I wanted to look at using the show env command with the 9200 is that it is one of the few that is supported in the 9200 and not in the 5600 series switches. Also, I thought it worth mentioning that given that the environmental options are much different between the 9200 and 5600, Lithium, a popular tool for monitoring Xsan environments will show errors that the 9200 has problems in the event you add it to a Lithium Console (which makes my iPad go batty with vibrations). To see the information on the snmp configuration, you guessed it: