From e6ddaa7e3a12d5d0a51a5e9ceacb9969c24888c3 Mon Sep 17 00:00:00 2001 From: dormando Date: Sun, 19 Sep 2010 06:22:17 +0000 Subject: [PATCH] remove deprecated stats code from mogadm git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@1488 f67b2e87-0811-0410-a7e0-dd94e48410d6 --- mogadm | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/mogadm b/mogadm index 74ad67b..dd010a3 100755 --- a/mogadm +++ b/mogadm @@ -13,7 +13,7 @@ my $usage = { des => "Check the state of the MogileFS world.", }, stats => { - des => "Show MogileFS system statistics. (DEPRECIATED: use mogstats instead)", + des => "Show MogileFS system statistics. (DEPRECATED: use mogstats instead)", }, settings => { des => "Change/list server settings.", @@ -513,49 +513,6 @@ sub cmd_check { sub cmd_stats { fail("mogadm stats is deprecated by new 'mogstats' utility"); - print "Fetching statistics...\n"; - my $stats = stats() - or fail("Can't fetch stats"); - - print "\nStatistics for devices...\n"; - printf " %-10s %-10s %10s %10s\n", "device", "host", "files", "status"; - printf " ---------- ----------- ---------- ----------\n"; - foreach my $device (sort { $a <=> $b } keys %{$stats->{devices}}) { - my $value = $stats->{devices}->{$device}; - printf " %-10s %-10s %10s %10s\n", "dev$device", $value->{host}, $value->{files}, $value->{status}; - } - printf " ---------- ----------- ---------- ----------\n"; - - print "\nStatistics for file ids...\n"; - printf " Max file id: %s\n", $stats->{fids}->{max} || 'none'; - - print "\nStatistics for files...\n"; - printf " %-20s %-10s %10s\n", 'domain', 'class', 'files'; - printf " -------------------- ----------- ----------\n"; - foreach my $domain (sort keys %{$stats->{files}}) { - my $classes = $stats->{files}->{$domain}; - foreach my $class (sort keys %$classes) { - my $files = $classes->{$class}; - printf " %-20s %-10s %10s\n", $domain, $class, $files; - } - } - printf " -------------------- ----------- ----------\n"; - - print "\nStatistics for replication...\n"; - printf " %-20s %-10s %10s %10s\n", 'domain', 'class', 'devcount', 'files'; - printf " -------------------- ----------- ---------- ----------\n"; - foreach my $domain (sort keys %{$stats->{replication}}) { - my $classes = $stats->{replication}->{$domain}; - foreach my $class (sort keys %$classes) { - my $devcounts = $classes->{$class}; - foreach my $devcount (sort { $a <=> $b } keys %$devcounts) { - my $files = $devcounts->{$devcount}; - printf " %-20s %-10s %10s %10s\n", $domain, $class, $devcount, $files; - } - } - } - printf " -------------------- ----------- ---------- ----------\n"; - ok(); } sub cmd_host_list {