]> granicus.if.org Git - sysstat/commit
iostat: Always display persistent names with option -j
authorSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 14 Jul 2021 09:29:53 +0000 (11:29 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 14 Jul 2021 09:29:53 +0000 (11:29 +0200)
commitcff5911b624c50a9dabf203f889e43955d88f1a3
tree90afdc776fb5fde711271f04bba85cd85a0dab57
parentdfac5a486e9c25e878677fd8210ed5899dcab2b5
iostat: Always display persistent names with option -j

When a persistent name (e.g. UUID) is entered on the command line,
iostat displayed the real name of the device instead of its persistent
name, e.g.:

$ iostat -d -j UUID 65ccf2b5-50de-4f89-bf8e-e3e88eae4c63
Linux 5.12.14-200.fc33.x86_64 (linux-1.home)  07/14/2021  _x86_64_ (8 CPU)

      tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd Device
     1.89         6.73         0.00     31799.48      58452         12  276250680 sda

Fix this so that the persistent name appears in the report:

$ iostat -d -j UUID 65ccf2b5-50de-4f89-bf8e-e3e88eae4c63
Linux 5.12.14-200.fc33.x86_64 (linux-1.home)  07/14/2021  _x86_64_ (8 CPU)

      tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd Device
     1.88         6.66         0.00     31489.67      58452         12  276250680 65ccf2b5-50de-4f89-bf8e-e3e88eae4c63

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
iostat.c
iostat.h