update handling of inetd and xinetd config files to reflect change to use
[debian/amanda] / server-src / amstatus.pl
index 80f6c231d1822207b33c22b0ac36f223682600d6..be2b8fe40467e647bdb53201dcae2b9d1051ba5a 100644 (file)
@@ -576,8 +576,12 @@ while($lineX = <AMDUMP>) {
                                        $label=$line[8];
                                        $status_taper = "Idle";
                                        $hostpart=$serial{$serial};
-                                       $line[10] =~ /sec (\S+) kb (\d+) kps/;
-                                       $size=$2 / $unitdivisor;
+                                       $line[10] =~ /sec (\S+) (kb|bytes) (\d+) kps/;
+                                       if ($2 eq 'kb') {
+                                               $size=$3 / $unitdivisor;
+                                  } else {
+                                               $size=$3 / ( $unitdivisor * 1024);
+                                       }
                                        $taper_finished{$hostpart}=1;
                                        $busy_time{"taper"}+=($current_time-$taper_time{$hostpart});
                                        $taper_time{$hostpart}=$current_time;
@@ -1563,9 +1567,11 @@ sub busytime() {
 }
 
 sub usage() {
-       print "amstatus [--config] config [--file amdump_file]\n";
+       print "amstatus [--file amdump_file]\n";
        print "         [--summary] [--dumping] [--waitdumping] [--waittaper]\n";
        print "         [--dumpingtape] [--writingtape] [--finished] [--failed]\n";
-       print "         [--estimate] [--gestimate] [--stats] [--date] [--locale-independent-date-format]\n";
+       print "         [--estimate] [--gestimate] [--stats] [--date]\n";
+       print "         [--locale-independent-date-format]\n";
+       print "         [--config] <config>\n";
        exit 0;
 }