MyTop is one of the best MySQL monitoring tools available, written by a MySQL guru, Jeremy Zawodny. Its vital for monitoring your MySQL health, especially in a shared hosting environment. Installation on a CentOS (for cPanel) server is quite straight forward with this guide.
First off, we need a few perl modules, cPanel’s realperlinstaller comes in handy, if you aren’t on cPanel, you’ll need to CPAN or manually install these modules.
/scripts/perlinstaller --force Getopt::Long
/scripts/perlinstaller --force DBI
/scripts/perlinstaller --force DBD::mysql
/scripts/perlinstaller --force Term::ReadKey
Now, we download and install mytop.
wget http://fossies.org/linux/privat/mytop-1.9.1.tar.gz
tar zxpfv mytop-1.9.1.tar.gz
cd mytop-1.9.1
perl Makefile.PL && make && make install
A problem I have run across with MyTop is the following error: MyTop Error: Error in option spec: “long|!” – which keeps MyTop from starting at all.
This can be easily fixed:
- You will want to connect to your system via SSH or console as root and perform the following.
- Open mytop with your favorite editor, in this case we will use nano:
nano /usr/local/bin/mytop
- Do a search for the following:
(With nano it would be ctrl + w to bring up the search.)
long|!
- Locate the line that looks like:
"long|!" => \$config{long_nums},
- You will want to completely remove the above line and replace it with the following:
"long|long_nums|l!" => \$config{long_nums},
- Save your edits and exit.
(With nano it would be ctrl + x to begin the exit phase and you will want to save it on exit.) - Once you have done the above you will be set to run mytop and it should start up without issue for you by running the following command.
mytop
Check out our web hosting service hoganhost.com.ng