Coder Social home page Coder Social logo

mytop's People

Contributors

jzawodn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mytop's Issues

Quoted passwords in .my.cnf won't work

If ~/.my.cnf has a password line like this:

password='mysecretpassword'

The mysql Client will use it without quotes while mytop won't do that.
Tested on version 1.91

utf8mb4 charset error

mytop requires character set to be in Index.xml, even if it's an alias and otherwise accounted for with show charset;

Workarounds appreciated.

$ mytop
Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/local/share/mysql/charsets/Index.xml' file
Cannot connect to MySQL server. Please check the:

  * database you specified "myDB" (default is "test")
  * username you specified "myUser" (default is "root")
  * password you specified "myPass" (default is "")
  * hostname you specified "myServer" (default is "localhost")
  * port you specified "myPort" (default is 3306)
  * socket you specified "mySocket" (default is "")

The options my be specified on the command-line or in a ~/.mytop
config file. See the manual (perldoc mytop) for details.

Here's the exact error from DBI. It might help you debug:

Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/)

$ mysql -u myUser -p -e 'show charset;'
+----------+-----------------------------+---------------------+--------+
| Charset  | Description                 | Default collation   | Maxlen |
+----------+-----------------------------+---------------------+--------+
...
| utf8     | UTF-8 Unicode               | utf8_general_ci     |      3 |
| utf8mb4  | UTF-8 Unicode               | utf8mb4_general_ci  |      4 |
+----------+-----------------------------+---------------------+--------+

No Sorts parameter on documentation

After run command mytop on third line include parameter "Sorts", but on manual not documented what it means. I search description only on CREDITS . Please, correct documentation

Fix warning when gethostbyaddr did not return anything

I get the following error lots of times:
Use of uninitialized value $host in substitution (s///) at ./mytop line 958.

This happens when gethostbyaddr returns null. In that case we should show the IP instead:

From 602d063dbac4ae94b2d2273ceef9fbf01f9ca1d9 Mon Sep 17 00:00:00 2001
From: Christoph Brill <[email protected]>
Date: Tue, 27 Aug 2013 16:11:13 +0200
Subject: [PATCH] If gethostbyaddr return nothing, keep using the IP

---
 mytop | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mytop b/mytop
index fba27fd..8d6bf42 100755
--- a/mytop
+++ b/mytop
@@ -955,8 +955,11 @@ sub GetData()
         {
             $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
-- 
1.8.4

No InnoDB status in mytop 1.7

Running mytop 1.7 with MaridDB 10.0.21 and InnoDB tables. OS: Centos 6.7 x86_64

I have noted that if you press shift-I, a blank scren is displated with a highlighted (END).

InnoDB Status [hit q to exit this mode]
Use of uninitialized value in print at /usr/bin/mytop line 1109.

A little searching the web, I found that MaridDB has removed the "SHOW INNODB STATUS" command, this has been replaced with "SHOW ENGINE INNODB STATUS"

Knowledge Base Reference https://mariadb.com/kb/en/mariadb/show-innodb-status-removed/

I may have a crack at adding a conditional check for this one myself but my perl is not the best.

Cannot connect to mysql when password is quoted

# mytop 
Cannot connect to MySQL server. Please check the:

  * database you specified "" (default is "")
  * username you specified "root" (default is "root")
  * password you specified "'foo'" (default is "")
  * hostname you specified "localhost" (default is "localhost")
  * port you specified "3306" (default is 3306)
  * socket you specified "" (default is "")

The options my be specified on the command-line or in a ~/.mytop or
~/.my.cnf config file. See the manual (perldoc mytop) for details.

Here's the exact error from DBI. It might help you debug:

Access denied for user 'root'@'localhost' (using password: YES)

mytop should trim quotes from the password

InnoDB Status does not work with MySQL 5.6

Just apply the following change:

$ git diff
diff --git a/mytop b/mytop
index fba27fd..5bcb59b 100755
--- a/mytop
+++ b/mytop
@@ -1099,7 +1099,7 @@ sub GetInnoDBStatus()
}
}

  • my @DaTa = Hashes("SHOW INNODB STATUS");
  • my @DaTa = Hashes("SHOW ENGINE INNODB STATUS");

open P, "|$config{pager}" or die "$!";
print keys %{$data[0]};

The old command is deprecated in 5.5 and not supported anymore with 5.6.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.