Installing innotop to monitor innodb

June 23, 2023 | by dbsnoop

innotop in innodb

Innotop

Reading these tables can be a thankless and innocuous task for those who don’t have much experience with MySQL. Even worse would be trying to use the show engine InnoDB status. I confess that in the early years of MySQL the result of this command, to me, looked a lot like the alien signal hidden in the satellite frequencies during the terrestrial invasion of the movie “Independence Day”. Some things intrigued me in this film: 1) Why the name of the film was never translated; b) How the “flyman” (Jeff Goldblum) connected to the invaders’ system: Bluetooth or wi-fi?; c) Guys, for J.Cristo’s sake, the invaders didn’t have a firewall and still wanted to dominate the Earth? not alligator here?

I’ve already stalled you up a lot, let’s get back to what matters: installation of innotop!

I will assume that we will use a Linux, for the sake of passion: CentOS. What are the dependencies, the prerequisites for installing innotop?

  • PERL
  • – Run the command below to find out if Perl is installed:

# perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or theGNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found onthis system using “man perl” or “perldoc perl”. If you have access to theInternet, point your browser at http://www.perl.org/, the Perl Home Page. http://www.perl.org/, a Página Inicial do Perl.

In my case, I have Perl v5.8.8 installed. No matter the version, if you receive a message similar to the one I received, you are ready to continue.

  • – Execute o comando abaixo para instalar Perl, caso não tenha ele instalado:

yum install perlLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileSetting up Install ProcessPackage 4:perl-5.8.8-32.el5_5.2.x86_64 already installed and latest versionResolving Dependencies–> Running transaction check—> Package perl.i386 4:5.8.8-32.el5_5.2 set to be updated–> Finished Dependency Resolution Dependencies Resolved =========================================================== Package Arch Version Repository Size =========================================================== Installing: perl i38 4:5.8.8-32.el5_5.2 extras 12 M Transaction Summary =========================================================== Install 1 Package(s)Upgrade 0 Package(s) Total download size: 12 MIs this ok [y/N]: y

Just confirm with yes and get down the wood in the installation. It’s never too much to remember that yum is an installation command inherent in Red Hat-based distributions, as in my case, CentOS. Other distributions may use apt-get, aptitude, urpmi, pkg-get, etc.

Once Perl is installed, now it is time to install the add-ons needed for innotop to work. There are two ways to do this, I’ll do the simplest and least expensive:

Run the following commands in order, and, be patient, some will take a while, as they download packages and install them:

perl -MCPAN -eshell

If this is your first time running this command, be prepared to answer a series of questions to configure your Perl properly.

This command will take you inside Perl, once there, run the following commands:

cpan> install Term::ReadKey

cpan> install DBI

cpan> install DBD::mysql

If everything went well, we have Perl installed and properly configured so that innotop can play its role correctly.

Next step! Get innotop, let’s download it:

#wget http://sourceforge.net/projects/innotop/files/innotop/1.6.0/innotop-1.6.0.tar.gz/download

  • Note: I’m downloading version 1.6.0, but when you go to install yours, it doesn’t hurt to check the project page and see if there’s a newer version.

Now, let’s unzip and install the directory where I like the most, in /opt. Each one installs in the directory you like:

#cd /opt

#gunzip innotop-1.6.0.tar.gz

#tar -xvf innotop-1.6.0.tar

There you go! You have innotop installed and ready to use.

For more articles like this one, check out our blog!

Give it a try for 14 days, no burocracy, no credit card

Learn more about Flightdeck!

 

Share

Read more