Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if( $command == ":@replag" ) {
- $link = mysql_connect('localhost', 'root', '') or msg( mysql_error() );
- $query = 'SHOW SLAVE STATUS';
- $result = mysql_query($query) or msg( mysql_error() );
- $line = mysql_fetch_array( $result, MYSQL_ASSOC );
- msg( "Current Status: " . $line['Slave_IO_State'] );
- msg( "Replicating from: " . $line['Master_Host'] );
- msg( "Replication Lag (in seconds): " . $line['Seconds_Behind_Master'] );
- mysql_free_result($result);
- mysql_close($link);
- }
- ?>
Add Comment
Please, Sign In to add comment