Collecting FusionIO inventory

I have a requirement to write a script that collects inventory data of FusionIO drives from a Linux server.

The only method that I've been able to find is the fio-status utility, but it's designed to output human-readable text, not machine-parsable text. I could scrape it, but that's dirty.

I checked /proc/fusion but it doesn't have enough information to be of any use.

I'm hoping there's a better way, be it some sort of way to interface with libiodrivesdk.so or an already-existing utility to do this job.


I was originally using v1.2.7.2. On Shane's recommendation I upgraded to 2.2.3.66.

fio-status now has a -fk option that outputs:

sles11-live:~ # fio-status -fk
; Retrieving Fusion-io product information...

[driver]
total_ioDimms=4
ioDrive_Duos=2
driver_version=unavailable
sdk_api_version=unavailable

[adapter 1]
product_name=IBM 640GB High IOPS MD Class PCIe Adapter
product_number=68Y7381
…

Ugh, I was hoping for JSON but beggars can't be choosers.


Try fio-status -fx for XML, or fio-status -fj for JSON.

If they don't work, mind checking which version of the tool you've got?

Edit: Well, let's post-date this answer. These options will be available in 3.0.