[pve-devel] [PATCH manager 2/2] Add %-used and min_size to "pveceph lspools" command

Alwin Antreich a.antreich at proxmox.com
Mon Oct 30 17:48:53 CET 2017


Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
 PVE/CLI/pveceph.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index 422ac709..a5a04949 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -159,9 +159,12 @@ our $cmddef = {
     lspools => [ 'PVE::API2::Ceph', 'lspools', [], { node => $nodename }, sub {
 	my $res = shift;
 
-	printf("%-20s %10s %10s %20s\n", "Name", "size", "pg_num", "used");
+	printf("%-20s %10s %10s %10s %10s %20s\n", "Name", "size", "min_size",
+		"pg_num", "%-used", "used");
 	foreach my $p (sort {$a->{pool_name} cmp $b->{pool_name}} @$res) {
-	    printf("%-20s %10d %10d %20d\n", $p->{pool_name}, $p->{size}, $p->{pg_num}, $p->{bytes_used});
+	    printf("%-20s %10d %10d %10d %10.2f %20d\n", $p->{pool_name},
+		    $p->{size}, $p->{min_size}, $p->{pg_num},
+		    $p->{percent_used}, $p->{bytes_used});
 	}
     }],
     createpool => [ 'PVE::API2::Ceph', 'createpool', ['name'], { node => $nodename }],
-- 
2.11.0




More information about the pve-devel mailing list