Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r20309: LJSUP-9747: Update admin tools

Committer: gariev
LJSUP-9747: Update admin tools
U   trunk/bin/dbcheck.pl
Modified: trunk/bin/dbcheck.pl
===================================================================
--- trunk/bin/dbcheck.pl	2011-10-13 15:19:43 UTC (rev 20308)
+++ trunk/bin/dbcheck.pl	2011-10-13 22:08:12 UTC (rev 20309)
@@ -225,18 +225,41 @@
     }
 
     #print "$dbid of $d->{masterid}: $d->{name} ($roles)\n";
-    printf("%4d %-18s %4s repl:%7s %4s conn:%4d/%4d  $dtg $tzone \%s ($roles)\n",
-           $dbid,
-           $d->{name},
-           $d->{masterid} ? $d->{masterid} : "",
-           $diff,
-           $log_count ? sprintf("<%2s>", $log_count) : "",
-           $pcount_busy, $pcount_total,
-       $extra_version) unless $opt_err;
+    unless ($opt_err) {
+        printf("%4d %-18s %4s %7s %4s %4d/%4d %5s %3s %10s (%s)\n",
+            $dbid,
+            $d->{name},
+            $d->{masterid} ? $d->{masterid} : "",
+            $diff, ## repl
+            $log_count ? sprintf("<%2s>", $log_count) : "", ## log count
+            $pcount_busy, 
+            $pcount_total,
+            $dtg,
+            $tzone,
+            $extra_version,
+            $roles
+        )
+    }
 };
 
 $check_master_status->($_) foreach (sorted_dbids());
 
+printf("%4s %-18s %4s %7s %4s %9s %5s %3s %10s (%s)\n",
+    "id", 
+    "name", 
+    "mid",
+    "repl",
+    "logs",
+    "conns",
+    "time",
+    "tz",
+    "version",
+    "roles"
+);
+printf("%4s %-18s %4s %7s %4s %9s %5s %3s %10s %s\n",
+    "-"x4, "-"x18, "-"x4, "-"x7, "-"x4, "-"x9, "-"x5, "-"x3, "-"x10, "-"x10
+);
+
 $check->($_) foreach (sorted_dbids());
 
 if (@errors) {

Tags: gariev, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments