]> git.proxmox.com Git - pve-manager.git/commitdiff
Add %-used and min_size to "pveceph lspools" command
authorAlwin Antreich <a.antreich@proxmox.com>
Mon, 30 Oct 2017 16:48:53 +0000 (17:48 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 31 Oct 2017 07:21:32 +0000 (08:21 +0100)
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
PVE/CLI/pveceph.pm

index 422ac709e99271adfd5bc8bf7a36696f7683d7df..a5a049494891414d58120facb0c64f6b68681919 100755 (executable)
@@ -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 }],