Random Project

Problem with solaris 11

Good check, but the script has problems checking zpools with solaris 11, as a new column has been added: DEDUP.

I’ve made a change into get_zpool_data() and it worked.

next if (/^NAMEs+SIZEs+USEDs+AVAILs+CAPs+DEDUPs+HEALTHs+ALTROOT/);
my ( $pool, $size, $used, $avail, $cap, $dedup, $health, $altroot ) = split( /s+/, $_ );

#@{$pools{$pool}} = ($pool, $size, $used, $avail, $cap, $health, $altroot);
$zpools{$pool} = {
size => “$size”,
used => “$used”,
avail => “$avail”,
cap => “$cap”,
dedup => “$dedup”,
health => “$health”,
altroot => “$altroot”,
};

I expect it could be useful for others.