diff --git a/Ceph/Script/cephUsage.pl b/Ceph/Script/cephUsage.pl index c2eb7cccb87c67ca9a4e22bb29956ae063586e62..91211fa042432c49ebace201ff8807ae08389ea1 100755 --- a/Ceph/Script/cephUsage.pl +++ b/Ceph/Script/cephUsage.pl @@ -159,12 +159,13 @@ foreach my $_line (@_data) $skipNext = 1; next; } + my @fields = split(/\s+/, $_line); if ($_line =~ m/TOTAL/) { $skipNext = 1; - my @fields = split(/\s+/, $_line); if ($inGlobal) { $poolHash{'GLOBAL'}{'size'} = convertNumber($fields[8].$fields[9],'size'); $poolHash{'GLOBAL'}{'frac'} = $fields[10]; +### In Nautilus, total number of objects is not available # $poolHash{'GLOBAL'}{'objs'} = convertNumber($fields[5],'count'); # print "GLOBAL: ".$poolHash{'GLOBAL'}{'size'}." ".$poolHash{'GLOBAL'}{'frac'}." ".$poolHash{'GLOBAL'}{'objs'}."\n" if (defined $opt_debug); print "GLOBAL: ".$poolHash{'GLOBAL'}{'size'}." ".$poolHash{'GLOBAL'}{'frac'}."\n" if (defined $opt_debug);