From c9a0d2893e44f89f7c8c9450a9d42438eff1404d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felici=C3=A1n=20Hopp=C3=A1l?= Date: Mon, 11 Feb 2019 23:06:57 +0100 Subject: [PATCH] Fix: zpool list output changed, incorrect values (#219) * fix zpool data, output of zpool list -pH changed in freebsd 11 * fix zpool data, output of zpool list -pH changed in freebsd 11 * bump version * version dump to 2 --- snmp/zfs-freebsd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snmp/zfs-freebsd b/snmp/zfs-freebsd index d78658c..12600e1 100755 --- a/snmp/zfs-freebsd +++ b/snmp/zfs-freebsd @@ -51,7 +51,7 @@ use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 1; sub main::VERSION_MESSAGE { - print "FreeBSD ZFS stats extend 0.1.0\n"; + print "FreeBSD ZFS stats extend 0.2.0\n"; } sub main::HELP_MESSAGE { @@ -236,14 +236,14 @@ my $pools_int=0; my @toShoveIntoJSON; while ( defined( $pools[$pools_int] ) ) { my %newPool; - + my $pool=$pools[$pools_int]; $pool =~ s/\t/,/g; - $pool =~ s/\,\-\,/\,0\,/g; + $pool =~ s/\,\-\,\-\,/\,0\,0\,/g; $pool =~ s/\%//g; $pool =~ s/\,([0-1\.]*)x\,/,$1,/; - ( $newPool{name}, $newPool{size}, $newPool{alloc}, $newPool{free}, $newPool{expandsz}, $newPool{frag}, $newPool{cap}, $newPool{dedup} )=split(/\,/, $pool); + ( $newPool{name}, $newPool{size}, $newPool{alloc}, $newPool{free}, $newPool{ckpoint}, $newPool{expandsz}, $newPool{frag}, $newPool{cap}, $newPool{dedup} )=split(/\,/, $pool); push(@toShoveIntoJSON, \%newPool); @@ -253,7 +253,7 @@ $tojson{pools}=\@toShoveIntoJSON; my %head_hash; $head_hash{'data'}=\%tojson; -$head_hash{'version'}=1; +$head_hash{'version'}=2; $head_hash{'error'}=0; $head_hash{'errorString'}='';