Forum Discussion
TimRiker
Cirrocumulus
Feb 26, 2020Find all blade serial numbers with REST call
How to I discover the serial numbers for all blades in a VIPRION chassis over REST? The data in /mgmt/tm/sys/hardware and /mgmt/tm/sys/license seems to only include the primary blade. We'd like to ru...
suttonsc
Employee
Feb 27, 2020I don't believe there is a specific endpoint that will list the entire set of serial numbers. However, you can get the serial numbers from the slots using a 'util/bash' endpoint and sending a clsh command.
Here is an example of getting the blade serial numbers:
# curl -sku admin:${bigip_pass} https://${BIGIP-MGMT-ADDR}/mgmt/tm/util/bash -X POST -H "Content-Type: application/json" -d "{ \"command\":\"run\", \"utilCmdArgs\":\"-c 'clsh tmsh show sys hardware field-fmt \| awk \\\'/\^sys hardware system-info/,/\^}/ {if(\$1==\\\"host-board-serial-num\\\") print $2}\\\''\"}" | jq .commandResult | xargs echo -e
host-board-serial-num bld012429s
host-board-serial-num bld012451sThe core command is "utilCmdArgs": "-c 'clsh tmsh show sys hardware field-fmt" the rest just gets the specific serial information and dumps it in a more readable format.
Let me know if this gets you closer to what you are looking for.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects