In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to install MySQL Innotop for Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
First, go to the URL https://code.google.com/archive/p/innotop/downloads to download innotop-1.9.0.tar.gz. See the figure below, and select innotop-1.9.0.tar.gz to download.
Then upload it to the Linux server for decompression
[root@idb4 ~] # tar zxvf innotop-1.9.0.tar.gz
Innotop-1.9.0/
Innotop-1.9.0/t/
Innotop-1.9.0/t/InnoDBParser.t
Innotop-1.9.0/t/innodb-status-001
Innotop-1.9.0/t/innodb-status-002
Innotop-1.9.0/t/innodb-status-003
Innotop-1.9.0/t/innodb-status-004
Innotop-1.9.0/t/innodb-status-005
Innotop-1.9.0/t/innodb-status-006
Innotop-1.9.0/t/innodb-status-007
Innotop-1.9.0/innotop.spec
Innotop-1.9.0/Makefile.PL
Innotop-1.9.0/INSTALL
Innotop-1.9.0/Changelog
Innotop-1.9.0/innotop
Innotop-1.9.0/COPYING
Innotop-1.9.0/MANIFEST
[root@idb4 innotop-1.9.0] # perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for innotop
The above error is reported and the ReadKey package is missing. Solution:
[root@idb4 innotop-1.9.0] # yum install perl-DBI perl-DBD-MySQL perl-TermReadKey
There is no error after installation and running again:
[root@idb4 innotop-1.9.0] # perl Makefile.PL
Writing Makefile for innotop
[root@idb4 innotop-1.9.0] #
[root@idb4 innotop-1.9.0] #
[root@idb4 innotop-1.9.0] # make install
Cp innotop blib/script/innotop
/ usr/bin/perl-MExtUtils::MY-e 'MY- > fixin (shift)'-- blib/script/innotop
Manifying blib/man1/innotop.1
Installing / usr/local/share/man/man1/innotop.1
Installing / usr/local/bin/innotop
Appending installation info to / usr/lib64/perl5/perllocal.pod
[root@idb4 innotop-1.9.0] #
An error was found after running the innotop command:
[root@idb4 innotop-1.9.0] # innotop- u mdba-p123456
Localhost, 0.00, 0 QPS, 0/0/0 con/run/cac thds,! localhost
Uptime MaxSQL ReplLag Cxns Lock QPS QPS Run Run Tbls Repl SQL
Localhost: Can't connect to local MySQL server through socket'/ var/lib/mysql/mysql.sock' (2)
Check out the help:
[root@idb4 innotop-1.9.0] # innotop--help
Usage: innotop
[no] color-C Use terminal coloring (default)
-- config-c Config file to read
-- count Number of updates before exiting
-- delay-d Delay between updates in seconds
-- help Show this help message
-- host-h Connect to host
[no] inc-i Measure incremental differences
-- mode-m Operating mode to start in
-- nonint-n Non-interactive, output tab-separated fields
-- password-p Password to use for connection
-- port-P Port number to use for connection
-- skipcentral-s Skip reading the central configuration file
-- socket-S MySQL socket to use for connection
-- spark Length of status sparkline (default 10)
-- timestamp-t Print timestamp in-n mode (1: per iter; 2: per line)
-- user-u User for login if not current user
-- version Output version information and exit
-- write-w Write running configuration into home directory if no config files were loaded
You need to add-S before running:
[root@idb4 innotop-1.9.0] # innotop- u mdba-p123456-S / tmp/mysql.sock
Localhost, 44d, 1.53k QPS, 119-6-29 con/run/cac thds, 5.6.27-log
Press? Number display help
Switch to a different mode:
A Dashboard I InnoDB I/O Info Q Query List
B InnoDB Buffers K InnoDB Lock Waits R InnoDB Row Ops
C Command Summary L Locks S Variables & Status
D InnoDB Deadlocks M Replication Status T InnoDB Txns
F InnoDB FK Err O Open Tables U User Statistics
Actions:
D Change refresh interval p Pause innotop
K Kill a query's connection q Quit innotop
N Switch to the next connection x Kill a query
Other:
TAB Switch to the next server group / Quickly filter what you see
! Show license and warranty = Toggle aggregation
# Select/create server groups @ Select/create server connections
$Edit configuration settings\ Clear quick-filters
Press Q to display the following information
When Load Cxns QPS Slow Se/In/Up/De% QCacheHit KCacheHit BpsIn BpsOut
Now 0.16 135 1.53k 0 26 / 1 / 0 / 00.00% 100.00% 174.93k 427.61k
Total 0.00 1000 1.53k 2.09k 29 / 3 / 0 / 0 0.00% 90.42% 156.93k 463.33k
Cmd ID State User Host DB Time Query
Query 3978017 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4051691 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4054981 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4064304 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4083366 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4083368 Sending data ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 select id, SH, KPJH, ZFJH, TYPE, MONTH, STATUS, CREATE_TIME, UPDAT
Query 4083370 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4083372 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4083375 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4139383 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4146551 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4155188 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4157873 init ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 commit
Query 4223328 Sending data ixinnuo_ 172.16.16.10 ixinnuo_sjcj 00:01 select id, SH, KPJH, ZFJH, TYPE, MONTH, STATUS, CREATE_TIME, UPDAT
Where Load is the load
QPS (Query Per Second) represents the query rate per second
Slow represents the number of slow queries
The ratio of adding, deleting, changing and checking Se/In/Up/De%:
QCacheHit: the hit ratio of the query buffer
KCacheHit: hit ratio of the index
Number of bytes entered per second by BpsIn (bytes Per Second in)
Number of bytes output per second by BpsOut (bytes Per Second Out)
The above is all the contents of the article "how to install MySQL Innotop for Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.