mariadb-kill for MariaDB Tools

Overview

The mariadb-kill utility.

mariadb-kill Options for MariaDB Tools

Option

Argument

Description

--any-busy-time

time

Match query class if any query has been running for longer than this time. "Longer than" means that if you specify 10, for example, the class will only match if there's at least one query that has been running for greater than 10 seconds. Optional suffix s=seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--ask-pass

Prompt for a password when connecting to MariaDB

--busy-time

time

Match queries that have been running for longer than this time. Optional suffix s=seconds, m=minutes, h= hours, d=days; if no suffix, s is used.

--charset (-A)

string

Default character set

--config

string

Read this comma-separated list of config files; if specified, this must be the first option on the command line

--create-log-table

Create the --log-dsn table if it does not exist

--daemonize

Fork to the background and detach from the shell

--database (-D)

string

The database to use for the connection

--defaults-file (-F)

string

Only read MariaDB options from the given file

--each-busy-time

time

Match query class if each query has been running for longer than this time. "Longer than" means that if you specify 10, for example, the class will only match if each and every query has been running for greater than 10 seconds. Optional suffix s=seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--execute-command

string

Execute this command when a query matches

--filter

string

Discard events for which this Perl code doesn't return true

--group-by

string

Apply matches to each class of queries grouped by this SHOW PROCESSLIST column

--help

Show help and exit

--host (-h)

string

Connect to host (default localhost)

--idle-time

time

Match queries that have been idle/sleeping for longer than this time. Optional suffix s=seconds, m= minutes, h=hours, d=days; if no suffix, s is used.

--ignore-command

string

Ignore queries whose Command matches this Perl regex

--ignore-db

string

Ignore queries whose db (database) matches this Perl regex

--ignore-host

string

Ignore queries whose Host matches this Perl regex

--ignore-info

string

Ignore queries whose Info (query) matches this Perl regex

--ignore-self

Don't kill mariadb-kill's own connection (default yes). Disable using: --noignore-self

--ignore-state

string

Ignore queries whose State matches this Perl regex ( default Locked)

--ignore-user

string

Ignore queries whose user matches this Perl regex

--interval

time

How often to check for queries to kill. Optional suffix s=seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--kill

Kill the connection for matching queries

--kill-busy-commands

string

group: Actions (default Query)

--kill-query

Kill matching queries

--log

string

Print all output to this file when daemonized

--log-dsn

DSN

Store each query killed in this DSN

--match-all

Match all queries that are not ignored

--match-command

string

Match only queries whose Command matches this Perl regex

--match-db

string

Match only queries whose db (database) matches this Perl regex

--match-host

string

Match only queries whose Host matches this Perl regex

--match-info

string

Match only queries whose Info (query) matches this Perl regex

--match-state

string

Match only queries whose State matches this Perl regex

--match-user

string

Match only queries whose User matches this Perl regex

--password (-p)

string

Password to use when connecting

--pid

string

Create the given PID file

--port (-P)

integer

Port number to use for connection

--print

Print a KILL statement for matching queries; does not actually kill queries

--query-count

integer

Match query class if it has at least this many queries

--query-id

Prints an ID of the query that was just killed

--rds

Denotes the instance in question is on Amazon RDS

--replication-threads

Allow matching and killing replication threads

--run-time

time

How long to run before exiting. Optional suffix s= seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--sentinel

string

Exit if this file exists (default /tmp/mariadb-kill- sentinel)

--set-vars

string

Set the MariaDB variables in this comma-separated list of variable=value pairs

--slave-password

string

Sets the password to be used to connect to the slaves

--slave-user

string

Sets the user to be used to connect to the slaves

--socket (-S)

string

Socket file to use for connection

--stop

Stop running instances by creating the --sentinel file

--strip-comments

Remove SQL comments from queries in the Info column of the PROCESSLIST (default yes). Disable using: --nostrip-comments

--test-matching

string

Files with processlist snapshots to test matching options against

--user (-u)

string

User for login if not current user

--verbose (-v)

Print information to STDOUT about what is being done

--version

Show version and exit

--victims

string

Which of the matching queries in each class will be killed (default oldest)

--wait-after-kill

time

Wait after killing a query, before looking for more to kill. Optional suffix s=seconds, m=minutes, h= hours, d=days; if no suffix, s is used.

--wait-before-kill

time

Wait before killing a query. Optional suffix s= seconds, m=minutes, h=hours, d=days; if no suffix, s is used.