{"id":11469,"date":"2019-03-14T08:25:55","date_gmt":"2019-03-14T08:25:55","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11469"},"modified":"2019-03-14T08:25:55","modified_gmt":"2019-03-14T08:25:55","slug":"install-mtop-mysql-database-server-monitoring-in-rhel-centos-7-6-5-4-fedora-17-12","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/install-mtop-mysql-database-server-monitoring-in-rhel-centos-7-6-5-4-fedora-17-12\/","title":{"rendered":"Install Mtop (MySQL Database Server Monitoring) in RHEL\/CentOS 7\/6\/5\/4, Fedora 17-12"},"content":{"rendered":"<p><strong>mtop<\/strong>\u00a0(<strong>MySQL top<\/strong>) is an open source real time\u00a0<strong>MYSQL Server<\/strong>\u00a0monitoring program written in\u00a0<strong>Perl<\/strong>\u00a0language that shows queries which are taking longer time to process and kills those longer queries after certain number of specified time.\u00a0<strong>Mtop<\/strong>\u00a0program enable us to monitor and identify performance and related issues of\u00a0<strong>MySQL Server<\/strong>\u00a0from the command line interface similar to\u00a0<a href=\"https:\/\/www.tecmint.com\/12-top-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">Linux Top Command<\/a>.<\/p>\n<div id=\"attachment_1195\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Mtop-MySQL-Monitoring.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1195\" title=\"Mtop MySQL Monitoring\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Mtop-MySQL-Monitoring-300x189.jpg\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Mtop-MySQL-Monitoring-300x189.jpg 300w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Mtop-MySQL-Monitoring.jpg 493w\" alt=\"Mtop MySQL Monitoring\" width=\"300\" height=\"189\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Install Mtop MySQL Monitoring<\/p>\n<\/div>\n<p><strong>Mtop<\/strong>\u00a0includes zooming feature that display query optimizer information of a running queries and killing queries, it also shows statistics of server, configuration information and some useful tuning tips to optimize and improve\u00a0<strong>MySQL performance<\/strong>.<\/p>\n<p>Please check some of the following features offered by\u00a0<strong>Mtop<\/strong>\u00a0program.<\/p>\n<ol>\n<li>Display real time MySQL server queries.<\/li>\n<li>Provides MySQL configuration information.<\/li>\n<li>Zooming feature to display process query.<\/li>\n<li>Provides query Optimizer information for a query and \u2018killing\u2019 queries.<\/li>\n<li>Provides MySQL tuning tips.<\/li>\n<li>Ability to save output in a\u00a0<strong>.mtoprc<\/strong>\u00a0configuration file.<\/li>\n<li>Provides Sysadmin recommendation page (\u2018<strong>T<\/strong>\u2018).<\/li>\n<li>Added queries\/second to main header.<\/li>\n<li>Added per second info to stats screen.<\/li>\n<\/ol>\n<p>In this article we\u2019re going to show how to install\u00a0<strong>Mtop<\/strong>\u00a0(<strong>MySQL Top<\/strong>) program under\u00a0<strong>RHEL 7\/6.3\/6.2\/6.1\/6\/5.8\/5.6\/4.0<\/strong>,\u00a0<strong>CentOS 7\/6.3\/6.2\/6.1\/6\/5.8\/5.6\/4.0<\/strong>\u00a0and\u00a0<strong>Fedora 17,16,15,14,13,12<\/strong>\u00a0using\u00a0<strong>RPMForge<\/strong>repository via\u00a0<a href=\"https:\/\/www.tecmint.com\/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement\/\" target=\"_blank\" rel=\"noopener\">YUM Command<\/a>.<\/p>\n<h3>Enable RPMForge Repository in RHEL\/CentOS 6\/5\/4 and Fedora 17-12<\/h3>\n<p>First, you need to enable\u00a0<strong>RPMForge<\/strong>\u00a0repository under your\u00a0<strong>Linux<\/strong>\u00a0machine to download and install latest version of\u00a0<strong>MTOP<\/strong>\u00a0program.<\/p>\n<h4>Install RPMForge on RHEL\/CentOS 6<\/h4>\n<p>Select the following links based on your\u00a0<strong>Linux<\/strong>\u00a0architecture to enable\u00a0<strong>RPMforge<\/strong>\u00a0repository under your Linux box. (<strong>Note<\/strong>\u00a0:\u00a0<strong>Fedora user\u2019s don\u2019t need to enable any repository under Fedora box<\/strong>).<\/p>\n<h5>For RHEL\/CentOS 6 32-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el6.rf.i686.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.i686.rpm<\/pre>\n<h5>For RHEL\/CentOS 6 64-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm<\/pre>\n<h4>Install RPMForge on RHEL\/CentOS 5<\/h4>\n<h5>For RHEL\/CentOS 5 32-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el5.rf.i386.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm<\/pre>\n<h5>For RHEL\/CentOS 5 64-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm<\/pre>\n<h4>Install RPMForge on RHEL\/CentOS 4<\/h4>\n<h5>For RHEL\/CentOS 4 32-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el4.rf.i386.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el4.rf.i386.rpm<\/pre>\n<h5>For RHEL\/CentOS 4 64-Bit OS<\/h5>\n<pre># wget http:\/\/packages.sw.be\/rpmforge-release\/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm\r\n# rpm -Uvh rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm<\/pre>\n<h3>Import RPMForge Repository Key in RHEL\/CentOS 6\/5\/4<\/h3>\n<pre># wget http:\/\/dag.wieers.com\/rpm\/packages\/RPM-GPG-KEY.dag.txt\r\n# rpm --import RPM-GPG-KEY.dag.txt<\/pre>\n<h3>Install Mtop in RHEL\/CentOS 6\/5\/4 and Fedora 17-12<\/h3>\n<p>Once you\u2019ve installed and enabled\u00a0<strong>RPMForge<\/strong>\u00a0repository, let\u2019s install\u00a0<strong>MTOP<\/strong>\u00a0using following\u00a0<strong>YUM<\/strong>\u00a0command.<\/p>\n<pre># yum install mtop<\/pre>\n<h5>Sample Output :<\/h5>\n<pre>Loaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\nrpmforge                                                                          | 1.9 kB     00:00\r\nrpmforge\/primary_db                                                                 2.6 MB     00:19\r\nSetting up Install Process\r\nDependencies Resolved\r\n\r\n================================================================================================================\r\n Package                       Arch\t\t\t\tVersion\t\t\t\t\tRepository\t\t\t\tSize\r\n================================================================================================================\r\nInstalling:\r\n mtop                          noarch           0.6.6-1.2.el6.rf        rpmforge                52 k\r\nInstalling for dependencies:\r\n perl-Curses                   i686             1.28-1.el6.rf           rpmforge                156 k\r\n\r\nTransaction Summary\r\n================================================================================================================\r\nInstall       2 Package(s)\r\n\r\nTotal download size: 208 k\r\nInstalled size: 674 k\r\nIs this ok [y\/N]: y\r\nDownloading Packages:\r\n(1\/2): mtop-0.6.6-1.2.el6.rf.noarch.rpm                                           |  52 kB     00:00\r\n(2\/2): perl-Curses-1.28-1.el6.rf.i686.rpm                                         | 156 kB     00:01\r\n-----------------------------------------------------------------------------------------------------------------\r\nTotal                                                                     46 kB\/s | 208 kB     00:04\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\nWarning: RPMDB altered outside of yum.\r\n  Installing : perl-Curses-1.28-1.el6.rf.i686\t\t\t\t\t\t\t\t\t\t\t\t\t1\/2\r\n  Installing : mtop-0.6.6-1.2.el6.rf.noarch                                                     2\/2\r\n  Verifying  : perl-Curses-1.28-1.el6.rf.i686                                                   1\/2\r\n  Verifying  : mtop-0.6.6-1.2.el6.rf.noarch                                                     2\/2\r\n\r\nInstalled:\r\n  mtop.noarch 0:0.6.6-1.2.el6.rf\r\n\r\nDependency Installed:\r\n  perl-Curses.i686 0:1.28-1.el6.rf\r\n\r\nComplete!<\/pre>\n<h3>Starting Mtop in RHEL\/CentOS 6\/5\/4<\/h3>\n<p>To start\u00a0<strong>Mtop<\/strong>\u00a0program, you need to connect to your\u00a0<strong>MySQL Server<\/strong>, using following command.<\/p>\n<pre># mysql -u root -p<\/pre>\n<p>Then you need to create separate user called\u00a0<strong>mysqltop<\/strong>\u00a0and\u00a0<strong>grant privileges<\/strong>\u00a0to him under your\u00a0<strong>MySQL server<\/strong>. To do, this just run the following commands in\u00a0<strong>mysql<\/strong>\u00a0shell.<\/p>\n<pre>mysql&gt; <strong>grant super, reload, process on *.* to mysqltop;<\/strong>\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql&gt; <strong>grant super, reload, process on *.* to mysqltop@localhost;<\/strong>\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql&gt; <strong>flush privileges;<\/strong>\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql&gt; <strong>quit;<\/strong>\r\nBye<\/pre>\n<h3>Running Mtop in RHEL\/CentOS 6\/5\/4<\/h3>\n<p>Let\u2019s start the\u00a0<strong>Mtop<\/strong>\u00a0program by executing below command. You will see sample output similar to below.<\/p>\n<pre># mtop<\/pre>\n<h5>Sample Outpit :<\/h5>\n<pre>load average: 0.01, 0.00, 0.00 mysqld 5.1.61 up 5 day(s), 19:21 hrs\r\n2 threads: 1 running, 0 cached. Queries\/slow: 5\/0 Cache Hit: 71.43%\r\nOpened tables: 0  RRN: 277  TLW: 0  SFJ: 0  SMP: 0  QPS: 0\r\n\r\nID       USER     HOST         DB       TIME   COMMAND STATE        INFO\r\n322081   mysqltop localhost\t\t\t\t\t\tQuery\t\t\t\tshow full processlist<\/pre>\n<h3>Monitor Remote MySQL Server using Mtop<\/h3>\n<p>Simply, type the following command to monitor any remote\u00a0<strong>MySQL Server<\/strong>.<\/p>\n<pre># mtop  \u2013host=remotehost \u2013dbuser=username \u2013password=password \u2013seconds=1<\/pre>\n<h3>Mtop Usage and Functions<\/h3>\n<p>Please use the following keys while\u00a0<strong>mtop<\/strong>\u00a0is running.<\/p>\n<h4>Filtering\/display<\/h4>\n<ol>\n<li><strong>s<\/strong>\u00a0\u2013 change the number of seconds to delay between updates<\/li>\n<li><strong>m<\/strong>\u00a0\u2013 toggle manual refresh mode on\/off<\/li>\n<li><strong>d<\/strong>\u00a0\u2013 filter display with regular expression (user\/host\/db\/command\/state\/info)<\/li>\n<li><strong>F<\/strong>\u00a0\u2013 fold\/unfold column names in select statement display<\/li>\n<li><strong>h<\/strong>\u00a0\u2013 display process for only one host<\/li>\n<li><strong>u<\/strong>\u00a0\u2013 display process for only one user<\/li>\n<li><strong>i<\/strong>\u00a0\u2013 toggle all\/non-Sleeping process display<\/li>\n<li><strong>o<\/strong>\u00a0\u2013 reverse the sort order<\/li>\n<li><strong>q<\/strong>\u00a0\u2013 quit<\/li>\n<li><strong>?<\/strong>\u00a0\u2013 help<\/li>\n<\/ol>\n<p>For more options and usage please see the man pages of\u00a0<strong>mtop<\/strong>\u00a0command by running \u201c<strong>man mtop<\/strong>\u201d on terminal.<\/p>\n<p><strong>Read Also<\/strong>\u00a0:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/mytop-mysql-database-monitoring-in-rhel-centos-fedora\/\" target=\"_blank\" rel=\"noopener\">Mytop Database Monitoring<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/install-innotop-to-monitor-mysql-server-performance\/\" target=\"_blank\" rel=\"noopener\">Innotop to Monitor MySQL Performance<\/a><\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.tecmint.com\/install-mtop-mysql-database-server-monitoring-in-rhel-centos-6-5-4-fedora-17-12\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>mtop\u00a0(MySQL top) is an open source real time\u00a0MYSQL Server\u00a0monitoring program written in\u00a0Perl\u00a0language that shows queries which are taking longer time to process and kills those longer queries after certain number of specified time.\u00a0Mtop\u00a0program enable us to monitor and identify performance and related issues of\u00a0MySQL Server\u00a0from the command line interface similar to\u00a0Linux Top Command. Install Mtop &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/install-mtop-mysql-database-server-monitoring-in-rhel-centos-7-6-5-4-fedora-17-12\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Mtop (MySQL Database Server Monitoring) in RHEL\/CentOS 7\/6\/5\/4, Fedora 17-12&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11469","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11469"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11469\/revisions"}],"predecessor-version":[{"id":11471,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11469\/revisions\/11471"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}