aalneyperl has asked for the wisdom of the Perl Monks concerning the following question:
thanks.sub repl { print "********REPLICATION STATUS********\n\n"; my $rs = $dbh->prepare("show status like 'slave_running'"); my $rrdbs = $dbh->prepare("show variables like 'read_rnd_buffer_size'" +); $rs->execute(); $rrdbs->execute(); while(my @vall = $rs->fetchrow_array()) { print "Replication Slave Status: $vall[1]\n"; if($vall[1] eq 'ON') { print "The system is configured as Mysql Replication +SLAVE\n"; print " The following is the Slave Status\n"; my $mas_hos = $dbh->prepare("show slave status"); $mas_hos->execute(); while (my @val = $mas_hos->fetchrow_array()) { print "Slave_IO_State: $val[0]\n"; print "Master_host: $val[1]\n"; print "Slave_IO_Running: $val[10]\n" +; print "Slave_SQL_Running: $val[11]\n +\n"; #print "Seconds_Behind_master: $val[ +33]\n"; } $mas_hos->finish(); } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to implement CSS in perl script.
by marto (Cardinal) on Nov 30, 2007 at 12:28 UTC | |
|
Re: How to implement CSS in perl script.
by tcf03 (Deacon) on Nov 30, 2007 at 13:32 UTC | |
|
Re: How to implement CSS in perl script.
by Gangabass (Vicar) on Nov 30, 2007 at 14:08 UTC | |
by aalneyperl (Acolyte) on Nov 30, 2007 at 14:19 UTC | |
by Gangabass (Vicar) on Dec 01, 2007 at 02:27 UTC | |
|
Re: How to implement CSS in perl script.
by locked_user sundialsvc4 (Abbot) on Nov 30, 2007 at 16:50 UTC |