Ever been asked to list the serial numbers on an f5 Viprion? No? Well stay with me anyway – this is a quick one, and you never know when it will be helpful!
Once upon a time, much of the networking equipment in the data center was blissfully unaware of its own serial number. Now, thank goodness, most systems allow you to query the serial numbers of the chassis and modules via the command line. The f5 Viprion is a bit of a pain though, as the command to show the system hardware (and thus the serial numbers) only shows the serial number of the blade to which you are currently connected. To get the serials for the others, there are two ways to approach the problem.
1. Viprion – Connect to Slots
The first way to get the other information is to connect to the blade in each slot one at a time and issue the same command. For example here is my first blade (slot 2 in this case):
f5@(nyc-lb01)(/S2-green)(tmos)# show /sys hardware | grep Serial Chassis Serial chs123456s Switchboard Serial Host Board Serial bld222222s
(Prompts are shortened for clarity) To get the others, I run bash, then ssh into another slot and issue the same command using tmsh:
f5@(nyc-lb01)(/S2-green)(/Common)(tmos)# run util bash # ssh slot1 Last login: Fri Oct 03 18:01:08 2013 from 127.3.0.2 # tmsh show sys hardware | grep Serial Chassis Serial chs123456s Switchboard Serial Host Board Serial bld111111s
The “Host Board Serial” is the serial number of the blade in the current slot (now slot 1), and we’ve got two more slots to check in this chassis. This is a little tiresome to do, and this is where method 2 comes into play.
2. Using CLSH
In the bash shell, there’s a utility called
clsh that rather helpfully will issue the command on every slot for you and show you the results. Just preface your shell command with
clsh , tweak the grep command for clarity and life is good:
# clsh tmsh sh sys hardware | egrep "Serial|=== slot" === slot 2 addr 127.3.0.2 color green === Chassis Serial chs123456s Switchboard Serial Host Board Serial bld222222s === slot 3 addr 127.3.0.3 color blue === === slot 4 addr 127.3.0.4 color blue === === slot 1 addr 127.3.0.1 color green === Chassis Serial chs123456s Switchboard Serial Host Board Serial bld111111s
So now we know that this example Viprion chassis has a blade in slots 1 and 2 (serials listed above), and slots 3 and 4 are empty. Isn’t that easier?
30 Blogs in 30 Days
This post is part of my participation in Etherealmind’s 30 Blogs in 30 Days challenge.