Viewing port utilization on Brocade switches

The Brocade Silkworm family of switches maintain a number of important performance and reliability counters for each switch port. Performance and reliability counters for specific switch ports can be viewed with the porterrshow, portshow and portStatsShow commands. To view system wide throughput statistics, the portPerfShow command can be run with an optional interval:

switch1:admin> portPerfShow 5

      0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15  Total
      0    0   21m  28m  31m   0  8.4m   0   28m  21m  31m   0  8.4m   0    0    0  178m
      0    0   20m  29m  31m   0   10m   0   29m  20m  31m   0   10m   0    0    0  182m
      0    0   18m  36m  31m   0   14m   0   36m  18m  31m   0   14m   0    0    0  201m
      0    0   17m  34m  30m   0  7.0m   0   34m  17m  31m   0  7.0m   0    0    0  179m

The individual switch ports are listed above the dashes, and the numbers below the dashes contain the number of bytes transmitted and received per second. This is a super useful tool for getting a high level overview of what your switch is doing.

Backing up Brocade switch configurations

Brocade switches have become one of the most widely deployed componets in most Storage Area Networks (SANs). One thing that has led to Brocade’s success is their robust CLI, which allow you to view and modify almost every aspect of their switch. This includes zoning configurations, SNMP attributes, domain ids, switch names and network addresses, etc. All of this configuration information is necessary for the switch to function properly, and should be periodically backed up to allow speedy recovery when disaster hits.

Each Brocade switch comes with the “configUpload” and “configDownload” commands to back up a switch configuration to a remote system, or to restore a configuration from a remote system. ConfigUplaod has two modes of oepration: interactive mode and automatic mode. To use the interactive mode to upload a config from a switch named switch1 to an ftp server with the IP address, configUpload can be run to walk you through backing up the configuration:

switch1:admin> configupload
Server Name or IP Address [host]:
User Name [user]: matty
File Name [config.txt]: switch1_config.txt
Protocol (RSHD or FTP) [rshd]: ftp
upload complete

After the configuration is uploaded, you will have a text file with you switches configuration on the remove server:

$ ls -l sw*

-rw-r--r--   1 matty    other       7342 Jul  7 09:15 switch1_config.txt

To restore a configuration, you can use the configDownload command. Both of these commands allow the paramters to be passed as arguments to the script, so they are ideal for automation (there is a backup script on the Brocade support site that can be used to automate configuration backups). In case others find it useful, I placed my Brocade cheat sheet on my website.