In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about what the pt-kill in percona-tools is. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Option
-- config specifies the profile
-- daemonize runs in the background
-- database-D specifies the database to which to connect
-- group-by by default, query results are not grouped; group-by can group classes with similar query results, grouping conditions: user,host,command,state, etc.
-- the interval between repeated execution of pt-kill by interval. If-- busy-time is not provided, it defaults to 30s, otherwise it is half of-- busy-time time; if both are provided,-- interval prevails.
Log prints the results to the specified log location (absolute path) when running as a daemon
-- login-dsn pt-kill allows the backend to schedule kill and store the results of kill in the specified table; it provides the corresponding target connection instance information to be stored
-- password or-p password
-- pid specifies pid file
-- port-P port
-- query-id prints the specified id
-- run-time sets the run time. If it is not specified, it will run forever.
-- user or-u user name
-- after victims matches except the query, victims will determine which query will be selected by kill
Oldest: only the query with the longest KILL time
All: kill all matching queries
All-but-oldest: in contrast to oldest, only the longest query in each category is retained; KILL removes all other queries
Query matching options
-- busy-time=x matches queries with run time greater than x
-- idle-time=x matches queries with idle/sleeping time greater than x
-- ignore-command ignores matching queries
-- ignore-db ignores the matching DB
-- ignore-host ignores the matching HOST
-- [no] ignore-self does not KILL pt-kill its own links
-- ignore-user ignores the matching user
-- match-all matches everything except replication and ignore, different from-- vectims all
-- match-command matches the corresponding Command
Optional values:
Query
Sleep
Binlog Dump
Connect
Delayed insert
Execute
Fetch
Init DB
Kill
Prepare
Processlist
Quit
Reset stmt
Table Dump
-- match-db matches according to the library name
-- match-host matches according to host
-- match-info matches according to the INFO column in PROCESSLIST
-- match-state matches according to status. Everything displayed in the state column in PROCESSLIST can be matched.
Locked
Login
Coping to tmp table
Executing
Creating tmp table
Sending data
Table lock
Updating
-- match-user matches according to user
-- replication-threads allows matching replication threads, which are ignored by default
-- test-matching test matching option; to avoid misoperation in the online environment, you can put SHOW PROCESSLIST in a file to specify the match. This option disables-- run-time,-- interval and-- ignore-self
If any-busy-time is specified as 10s, then in the query result class, as long as one query exceeds 10s, it will be matched to the
If each-busy-time is specified as 10s, then in the query result class, only if all the results in the class exceed 10s will it be matched to the
-- query-count:
If-- group-by is specified, only query entries in this class that exceed-- query-count will be matched to the
If-- group-by is not specified, it will be matched according to the entire large class
-- verbose or-v screen printing
ACTION
-- the connection to which kill KILL matches
-- the query request matched by kill-query kill, which is different from-- kill. It only kill queries, not kill links.
-- print prints the KILL command to be executed and does not perform the KILL operation
This is what the pt-kill in the percona-tools shared by the editor is. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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.