diff --git a/Ceph/Script/cephUsage.pl b/Ceph/Script/cephUsage.pl index 703a773f4d8ff0da7e724e362a4b3b923d0f01a3..cb94238f83893fce61728a5afad966c3f33274fc 100755 --- a/Ceph/Script/cephUsage.pl +++ b/Ceph/Script/cephUsage.pl @@ -167,9 +167,13 @@ foreach my $_line (@_data) $poolHash{'GLOBAL'}{'size'} = convertNumber($fields[7].$fields[8],'size'); $poolHash{'GLOBAL'}{'frac'} = $fields[9]; ### In Nautilus, total number of objects is not available + my @_tmpDfOut = `$cephCmd -s | grep objects:`; + my $tmpLine = $_tmpDfOut[0]; + $tmpLine =~ s/^\s*//; + my @tmpArr = split(/\s+/, $tmpLine); + $poolHash{'GLOBAL'}{'objs'} = convertNumber($tmpArr[1],'count'); # $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); + print "GLOBAL: ".$poolHash{'GLOBAL'}{'size'}." ".$poolHash{'GLOBAL'}{'frac'}." ".$poolHash{'GLOBAL'}{'objs'}."\n" if (defined $opt_debug); $inGlobal = 0; next; } diff --git a/DiskIO/Script/queryTotDisks.pl b/DiskIO/Script/queryTotDisks.pl index 6f7b18ea971d464d151c21855d9a50bebc67a55e..62d0e1ffef49bd7c843c053e69c74ec046f26844 100755 --- a/DiskIO/Script/queryTotDisks.pl +++ b/DiskIO/Script/queryTotDisks.pl @@ -72,7 +72,7 @@ if ( -e $_multipathd && $checkMultipath ) { } } -my @_lsblk = `lsblk | grep disk | cut -d' ' -f1 | grep -v -e ^fd -e ^sr0 `; +my @_lsblk = `lsblk 2>/dev/null | grep disk | cut -d' ' -f1 | grep -v -e ^fd -e ^sr0 `; chomp @_lsblk; my @_data = `cat $_proc`; s{^\s+|\s+$}{}g foreach @_data;