summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfran <kahun@scriabin.(none)>2014-06-25 12:32:22 +0200
committerSergei Golubchik <serg@mariadb.org>2018-11-16 13:26:21 +0100
commitc362ea3ffdf2b6def0735492dbec3a72342f7859 (patch)
tree26acfea01b78671b71b5953c9bc9384a52c37e69
parent1956695c69467375fc634ad709f1b32a2daf29b1 (diff)
downloadmariadb-git-c362ea3ffdf2b6def0735492dbec3a72342f7859.tar.gz
Added Master_Host to the Replication information
Closes #3
-rw-r--r--scripts/mytop.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/mytop.sh b/scripts/mytop.sh
index 480805e90b1..b3dbf5508c6 100644
--- a/scripts/mytop.sh
+++ b/scripts/mytop.sh
@@ -438,7 +438,7 @@ while (1)
if ($key eq 'C')
{
- if ( $HAS_COLOR )
+ if ( $HAS_COLOR )
{
$HAS_COLOR = 0;
}
@@ -818,11 +818,11 @@ sub GetData()
if ($config{header})
{
my @recs = "";
- if ( $db_release > 4 )
+ if ( $db_release > 4 )
{
@recs = Hashes("show global status");
- }
- else
+ }
+ else
{
@recs = Hashes("show status");
}
@@ -979,7 +979,7 @@ sub GetData()
# print("q_diff: $STATUS{Questions} - $OLD_STATUS{Questions} / $t_delta = $q_diff\n");
printf(" Sorts: %5.0f qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f\n",
- ( $STATUS{Sort_rows} - $OLD_STATUS{Sort_rows} ) / $t_delta,
+ ( $STATUS{Sort_rows} - $OLD_STATUS{Sort_rows} ) / $t_delta,
( $STATUS{Questions} - $OLD_STATUS{Questions} ) / $t_delta,
( # slow now (qps)
($STATUS{Slow_queries} ) ?
@@ -990,7 +990,7 @@ sub GetData()
$STATUS{Threads_running},
$STATUS{Threads_cached},
- (100 * ($STATUS{Com_select} - $OLD_STATUS{Com_select} +
+ (100 * ($STATUS{Com_select} - $OLD_STATUS{Com_select} +
($STATUS{Qcache_hits}||0) - ($OLD_STATUS{Qcache_hits}||0)
) ) / ($q_diff ),
(100 * ($STATUS{Com_insert} - $OLD_STATUS{Com_insert} +
@@ -1076,7 +1076,7 @@ sub GetData()
$t_delta,
($STATUS{Rows_tmp_read} - $OLD_STATUS{Rows_tmp_read}) /
$t_delta,
- ($STATUS{Handler_tmp_write}
+ ($STATUS{Handler_tmp_write}
-$OLD_STATUS{Handler_tmp_write})/$t_delta,
($STATUS{Handler_tmp_update} -
$OLD_STATUS{Handler_tmp_update})/$t_delta);
@@ -1120,6 +1120,7 @@ sub GetData()
}
}
print " Replication ";
+ print "Master:$data->{Master_Host} ";
print "IO:$data->{Slave_IO_Running} ";
print "SQL:$data->{Slave_SQL_Running} ";
print RESET() if ($HAS_COLOR);
@@ -1226,9 +1227,9 @@ sub GetData()
$thread->{State} ||= "";
$thread->{Progress} ||= 0;
- ## alter double hyphen comments so they don't break
+ ## alter double hyphen comments so they don't break
## the query when newlines are removed - http://freshmeat.net/users/jerjones
- $thread->{Info} =~ s~\s--(.*)$~ /* $1 */ ~mg;
+ $thread->{Info} =~ s~\s--(.*)$~ /* $1 */ ~mg;
## Normalize spaces -- mostly disabled for now. This can
## break EXPLAIN if you try to explain a mangled query. It