Friday, June 28, 2013

AIX fcs* and fcsi* devices

The fcs* devices are the fibre channel adapters.
The fscsi* devices are the drivers on top of them.

[sasquatch@mtnforest] $ lsdev -l fscsi1 -F parent
[sasquatch@mtnforest] $ lsdev -p fcs0
fcnet0 Defined   00-00-01 Fibre Channel Network Protocol Device
fscsi0 Available 00-00-02 FC SCSI I/O Controller Protocol Device

[sasquatch@mtnforest] $ lspath | grep fscsi0 | wc | awk -u '{print $1 ; }'

[sasquatch@mtnforest] But, what I really, really wanted is this:
iostat -datV | grep fcs | awk -u '{print $1 ; }'

The iostat will print adapter throughput.. and the V makes sure only nonzeroes get printed.

By filtering out the zeroes... I won't get errors from failing to open the device when I run fcstat... I was getting those when running fcstat for every fcs* device in the output of:
lsdev -C -c adapter -S a | grep fcs

That's because an fcs* adapter could be available... it could even have an fscsi* driver on top of it... but if there's no disk using a path through the fscsi* driver for the fcs* adapter, you just might get an error running fcstat for the fcs* device.

Not anymore.  I'll run fcstat only for the fcs* devices that are listed in the output of iostat -datV.   

No comments:

Post a Comment