aboutsummaryrefslogtreecommitdiff
path: root/databases/mytop/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2009-10-26 15:56:07 +0000
committerPav Lucistnik <pav@FreeBSD.org>2009-10-26 15:56:07 +0000
commit1af61fa4272b867d22cde66d702fc669295ea1dc (patch)
tree25708f2c7074c3645749bef91a8eb6bbffc9c69b /databases/mytop/files
parente1f251b8a543775b0f6a9d8d5b60a0325d110575 (diff)
downloadports-1af61fa4272b867d22cde66d702fc669295ea1dc.tar.gz
ports-1af61fa4272b867d22cde66d702fc669295ea1dc.zip
Notes
Diffstat (limited to 'databases/mytop/files')
-rw-r--r--databases/mytop/files/patch-mytop76
1 files changed, 44 insertions, 32 deletions
diff --git a/databases/mytop/files/patch-mytop b/databases/mytop/files/patch-mytop
index eb1f1d7bc80e..b2f92386f85b 100644
--- a/databases/mytop/files/patch-mytop
+++ b/databases/mytop/files/patch-mytop
@@ -1,5 +1,14 @@
---- mytop.orig 2007-02-16 20:57:46.000000000 -0800
-+++ mytop 2008-07-06 08:27:54.000000000 -0700
+--- mytop.orig 2007-02-17 05:57:46.000000000 +0100
++++ mytop 2009-10-15 00:19:14.000000000 +0200
+@@ -153,7 +153,7 @@
+ "idle|i" => \$config{idle},
+ "resolve|r" => \$config{resolve},
+ "prompt!" => \$config{prompt},
+- "long|!" => \$config{long_nums},
++ "long!" => \$config{long_nums},
+ "mode|m=s" => \$config{mode},
+ "sort=s" => \$config{sort},
+ );
@@ -193,6 +193,7 @@
*BLUE = sub { };
*WHITE = sub { };
@@ -36,6 +45,24 @@
next;
}
+@@ -710,7 +716,7 @@
+ ##
+ if ($config{header})
+ {
+- my @recs = Hashes("show status");
++ my @recs = Hashes("SHOW /*!50002 GLOBAL */ STATUS");
+
+ ## if the server died or we lost connectivity
+ if (not @recs)
+@@ -819,7 +825,7 @@
+ $lines_left--;
+
+
+- printf " Queries: %-5s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
++ printf " Queries: %-6s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
+ make_short( $STATUS{Questions} ), # q total
+ $STATUS{Questions} / $STATUS{Uptime}, # qps, average
+ make_short( $STATUS{Slow_queries} ), # slow
@@ -889,8 +895,42 @@
make_short(($STATUS{Bytes_received} - $OLD_STATUS{Bytes_received}) / $t_delta ),
make_short(($STATUS{Bytes_sent} - $OLD_STATUS{Bytes_sent}) / $t_delta ))
@@ -80,7 +107,21 @@
$lines_left--;
}
-@@ -1099,8 +1139,8 @@
+@@ -952,8 +992,11 @@
+ {
+ $thread->{Host} =~ s/:\d+$//;
+ my $host = gethostbyaddr(inet_aton($thread->{Host}), AF_INET);
+- $host =~ s/^([^.]+).*/$1/;
+- $thread->{Host} = $host;
++ if ($host)
++ {
++ $host =~ s/^([^.]+).*/$1/;
++ $thread->{Host} = $host;
++ }
+ }
+
+ ## Fix possible undefs
+@@ -1099,8 +1142,8 @@
my @data = Hashes("SHOW INNODB STATUS");
open P, "|$config{pager}" or die "$!";
@@ -91,32 +132,3 @@
close P;
}
---- mytop.orig 2009-09-12 17:20:33.000000000 +0100
-+++ mytop 2009-09-12 20:59:45.000000000 +0100
-@@ -156,7 +156,7 @@
- "idle|i" => \$config{idle},
- "resolve|r" => \$config{resolve},
- "prompt!" => \$config{prompt},
-- "long|!" => \$config{long_nums},
-+ "long!" => \$config{long_nums},
- "mode|m=s" => \$config{mode},
- "sort=s" => \$config{sort},
- );
-@@ -719,7 +719,7 @@
- ##
- if ($config{header})
- {
-- my @recs = Hashes("show status");
-+ my @recs = Hashes("SHOW /*!50002 GLOBAL */ STATUS");
-
- ## if the server died or we lost connectivity
- if (not @recs)
-@@ -828,7 +828,7 @@
- $lines_left--;
-
-
-- printf " Queries: %-5s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
-+ printf " Queries: %-6s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
- make_short( $STATUS{Questions} ), # q total
- $STATUS{Questions} / $STATUS{Uptime}, # qps, average
- make_short( $STATUS{Slow_queries} ), # slow