diff options
author | Milan Broz | 2011-07-09 15:24:04 +0200 |
---|---|---|
committer | Karel Zak | 2011-07-15 15:41:22 +0200 |
commit | 64c9e22aa47ea262f8e01c2aff1d48890d6e4e8b (patch) | |
tree | 582dd260c4d8d3779e23c8bc86cb9344977651df /misc-utils/lsblk.c | |
parent | include: [tt.c] always truncate if TT_FL_TRUNC (diff) | |
download | kernel-qcow2-util-linux-64c9e22aa47ea262f8e01c2aff1d48890d6e4e8b.tar.gz kernel-qcow2-util-linux-64c9e22aa47ea262f8e01c2aff1d48890d6e4e8b.tar.xz kernel-qcow2-util-linux-64c9e22aa47ea262f8e01c2aff1d48890d6e4e8b.zip |
lsblk: add queue request size attribute
Add queue request size parameter.
Very useful for tuning multipath performance.
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r-- | misc-utils/lsblk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 259b77093..e64eb9984 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -78,6 +78,7 @@ enum { COL_LOGSEC, COL_ROTA, COL_SCHED, + COL_RQ_SIZE, COL_TYPE, COL_DALIGN, COL_DGRAN, @@ -119,6 +120,7 @@ static struct colinfo infos[__NCOLUMNS] = { [COL_PHYSEC] = { "PHY-SEC", 7, TT_FL_RIGHT, N_("physical sector size") }, [COL_LOGSEC] = { "LOG-SEC", 7, TT_FL_RIGHT, N_("logical sector size") }, [COL_SCHED] = { "SCHED", 0.1, 0, N_("I/O scheduler name") }, + [COL_RQ_SIZE]= { "RQ-SIZE", 5, TT_FL_RIGHT, N_("request queue size") }, [COL_TYPE] = { "TYPE", 4, 0, N_("device type") }, [COL_DALIGN] = { "DISC-ALN", 6, TT_FL_RIGHT, N_("discard alignment offset") }, [COL_DGRAN] = { "DISC-GRAN", 6, TT_FL_RIGHT, N_("discard granularity") }, @@ -565,6 +567,11 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line if (p) tt_line_set_data(ln, col, p); break; + case COL_RQ_SIZE: + p = sysfs_strdup(&cxt->sysfs, "queue/nr_requests"); + if (p) + tt_line_set_data(ln, col, p); + break; case COL_TYPE: p = get_type(cxt); if (p) @@ -976,6 +983,7 @@ int main(int argc, char *argv[]) columns[ncolumns++] = COL_LOGSEC; columns[ncolumns++] = COL_ROTA; columns[ncolumns++] = COL_SCHED; + columns[ncolumns++] = COL_RQ_SIZE; break; default: help(stderr); |