mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
mon/PGMap: align to same side when output ceph df / ceph df detail
Aligns are not in the same side when showing raw storage usage and pools, change to the same side. Signed-off-by: haoyixing <haoyixing@kuaishou.com>
This commit is contained in:
parent
5fbae26e9e
commit
5c25778258
@ -347,16 +347,16 @@ the following::
|
||||
|
||||
The output of ``ceph df`` looks like this::
|
||||
|
||||
CLASS SIZE AVAIL USED RAW USED %RAW USED
|
||||
CLASS SIZE AVAIL USED RAW USED %RAW USED
|
||||
ssd 202 GiB 200 GiB 2.0 GiB 2.0 GiB 1.00
|
||||
TOTAL 202 GiB 200 GiB 2.0 GiB 2.0 GiB 1.00
|
||||
|
||||
--- POOLS ---
|
||||
POOL ID PGS STORED (DATA) (OMAP) OBJECTS USED (DATA) (OMAP) %USED MAX AVAIL QUOTA OBJECTS QUOTA BYTES DIRTY USED COMPR UNDER COMPR
|
||||
device_health_metrics 1 1 242 KiB 15 KiB 227 KiB 4 251 KiB 24 KiB 227 KiB 0 297 GiB N/A N/A 4 0 B 0 B
|
||||
cephfs.a.meta 2 32 6.8 KiB 6.8 KiB 0 B 22 96 KiB 96 KiB 0 B 0 297 GiB N/A N/A 22 0 B 0 B
|
||||
cephfs.a.data 3 32 0 B 0 B 0 B 0 0 B 0 B 0 B 0 99 GiB N/A N/A 0 0 B 0 B
|
||||
test 4 32 22 MiB 22 MiB 50 KiB 248 19 MiB 19 MiB 50 KiB 0 297 GiB N/A N/A 248 0 B 0 B
|
||||
POOL ID PGS STORED (DATA) (OMAP) OBJECTS USED (DATA) (OMAP) %USED MAX AVAIL QUOTA OBJECTS QUOTA BYTES DIRTY USED COMPR UNDER COMPR
|
||||
device_health_metrics 1 1 242 KiB 15 KiB 227 KiB 4 251 KiB 24 KiB 227 KiB 0 297 GiB N/A N/A 4 0 B 0 B
|
||||
cephfs.a.meta 2 32 6.8 KiB 6.8 KiB 0 B 22 96 KiB 96 KiB 0 B 0 297 GiB N/A N/A 22 0 B 0 B
|
||||
cephfs.a.data 3 32 0 B 0 B 0 B 0 0 B 0 B 0 B 0 99 GiB N/A N/A 0 0 B 0 B
|
||||
test 4 32 22 MiB 22 MiB 50 KiB 248 19 MiB 19 MiB 50 KiB 0 297 GiB N/A N/A 248 0 B 0 B
|
||||
|
||||
|
||||
|
||||
|
@ -761,28 +761,28 @@ void PGMapDigest::dump_pool_stats_full(
|
||||
f->open_array_section("pools");
|
||||
} else {
|
||||
tbl.define_column("POOL", TextTable::LEFT, TextTable::LEFT);
|
||||
tbl.define_column("ID", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("PGS", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("STORED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("ID", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("PGS", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("STORED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
if (verbose) {
|
||||
tbl.define_column("(DATA)", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("(OMAP)", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("(DATA)", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("(OMAP)", TextTable::RIGHT, TextTable::RIGHT);
|
||||
}
|
||||
tbl.define_column("OBJECTS", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("USED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("OBJECTS", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("USED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
if (verbose) {
|
||||
tbl.define_column("(DATA)", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("(OMAP)", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("(DATA)", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("(OMAP)", TextTable::RIGHT, TextTable::RIGHT);
|
||||
}
|
||||
tbl.define_column("%USED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("MAX AVAIL", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("%USED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("MAX AVAIL", TextTable::RIGHT, TextTable::RIGHT);
|
||||
|
||||
if (verbose) {
|
||||
tbl.define_column("QUOTA OBJECTS", TextTable::LEFT, TextTable::LEFT);
|
||||
tbl.define_column("QUOTA BYTES", TextTable::LEFT, TextTable::LEFT);
|
||||
tbl.define_column("DIRTY", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("USED COMPR", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("UNDER COMPR", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("QUOTA OBJECTS", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("QUOTA BYTES", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("DIRTY", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("USED COMPR", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("UNDER COMPR", TextTable::RIGHT, TextTable::RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -873,11 +873,11 @@ void PGMapDigest::dump_cluster_stats(stringstream *ss,
|
||||
ceph_assert(ss != nullptr);
|
||||
TextTable tbl;
|
||||
tbl.define_column("CLASS", TextTable::LEFT, TextTable::LEFT);
|
||||
tbl.define_column("SIZE", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("AVAIL", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("USED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("RAW USED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("%RAW USED", TextTable::LEFT, TextTable::RIGHT);
|
||||
tbl.define_column("SIZE", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("AVAIL", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("USED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("RAW USED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
tbl.define_column("%RAW USED", TextTable::RIGHT, TextTable::RIGHT);
|
||||
|
||||
|
||||
for (auto& i : osd_sum_by_class) {
|
||||
|
Loading…
Reference in New Issue
Block a user