[pve-devel] [PATCH storage] pvesm status: add column names at top of output
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu May 18 11:18:48 CEST 2017
> Thomas Lamprecht <t.lamprecht at proxmox.com> hat am 18. Mai 2017 um 11:16 geschrieben:
>
>
> allow easier understanding of what each row means.
>
> I replaced 'activated' with 'ready' for shortness sake
why not "active", like on the web interface and in the hash? ;) it's not the best term, but at least it is consistent..
>
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>
> PVE/CLI/pvesm.pm | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
> index ba2c91b..8dd7cfa 100755
> --- a/PVE/CLI/pvesm.pm
> +++ b/PVE/CLI/pvesm.pm
> @@ -134,13 +134,16 @@ my $print_status = sub {
> }
> $maxlen+=1;
>
> + printf "%-${maxlen}s %10s %6s %13s %15s %15s %5s\n", 'name', 'type',
> + 'ready', 'total', 'available', 'used', '%';
> +
> foreach my $res (sort { $a->{storage} cmp $b->{storage} } @$res) {
> my $storeid = $res->{storage};
>
> my $sum = $res->{used} + $res->{avail};
> my $per = $sum ? (0.5 + ($res->{used}*100)/$sum) : 100;
>
> - printf "%-${maxlen}s %5s %1d %15d %15d %15d %.2f%%\n", $storeid,
> + printf "%-${maxlen}s %10s %4d %15d %15d %15d %.2f%%\n", $storeid,
> $res->{type}, $res->{active},
> $res->{total}/1024, $res->{used}/1024, $res->{avail}/1024, $per;
> }
> --
> 2.11.0
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list