{"id":15372978,"url":"https://github.com/rs/mysql-genocide","last_synced_at":"2025-10-03T22:51:49.231Z","repository":{"id":533041,"uuid":"162147","full_name":"rs/mysql-genocide","owner":"rs","description":"Parallel operations on MySQL processlist","archived":false,"fork":false,"pushed_at":"2015-11-18T08:16:15.000Z","size":16,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T14:13:34.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/mysql-genocide/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rs.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-03-29T01:16:03.000Z","updated_at":"2019-08-13T14:13:14.000Z","dependencies_parsed_at":"2022-07-07T14:10:15.559Z","dependency_job_id":null,"html_url":"https://github.com/rs/mysql-genocide","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rs/mysql-genocide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2Fmysql-genocide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2Fmysql-genocide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2Fmysql-genocide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2Fmysql-genocide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rs","download_url":"https://codeload.github.com/rs/mysql-genocide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs%2Fmysql-genocide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278239970,"owners_count":25954097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T13:53:52.090Z","updated_at":"2025-10-03T22:51:49.215Z","avatar_url":"https://github.com/rs.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    mysql-genocide - Parallel operation on MySQL processlist\n\nSYNOPSIS\n    mysql-genocide [OPTIONS] [FILTER]\n\n     Options:\n       -h, --help               Show help.\n\n       Connection:\n       -h, --host=name          Connect to host.\n       -P, --port=#             Port number to use for connection.\n       -D, --database=name      Database to use.\n       -u, --user=name          User for login if not current user.\n       -p, --password=name      Password to use when connecting to server.\n\n       Filters:\n       -e, --exclude            Exclude queries by different criteria\n       -s, --selects-only       Exclude everything but selects\n       -t, --min-time=#         Exclude queries with exec time lower than #\n       -T, --timeout            Exclude queries with exec time lower than query time hint\n       -l, --limit=#            Only take first # lines\n       -g, --placeholder        Replace values in queries by placeholders\n       -d, --distinct           Only keep the first occurence of the same query\n       --sort                   Sort result\n\n       Actions:\n       -L, --list               Output list of queries\n       -K, --kill               Kill every matched threads\n       -S, --stats              Show some stats about processlist\n\n       -i, --interval[=#]       Repeat the command at regular interval\n\nOPTIONS\n    --help  Print a brief help message and exits.\n\n    --host, --port, --database, --user, --password\n            See mysql cli help for more information on those parameters.\n\n    --exclude=[!]name\n            Exclude from the running thread list queries matching the\n            argument. This parameter can be repeated several times to\n            exclude different kinds of queries. If you prefix the argument\n            with an exclamation mark (!), all thread not matching this\n            argument will be excluded. Allowed parameters are:\n\n            select, insert, replace, update, delete, create, drop, alter\n\n            Exclude SQL query which command is of the same name.\n\n            write\n\n            Exclude every SQL query doing write operation (insert, replace,\n            update, delete).\n\n            other\n\n            Exclude SQL query which are none of the above type.\n\n            sleep\n\n            Exclude all sleeping threads\n\n            system\n\n            Exclude thread ran by the system (often used for replication\n            threads)\n\n            user=\u003cuser\u003e\n\n            Exclude threads ran by given mysql username.\n\n            db=\u003cdb\u003e\n\n            Exclude threads using given database.\n\n            state=\u003cstate\u003e\n\n            Exclude threads in given state.\n\n            See\n            \u003chttp://dev.mysql.com/doc/refman/5.0/en/general-thread-states.ht\n            ml\u003e for the list of possible states\n\n            command=\u003ccommand\u003e\n\n            Exclude threads using given command.\n\n            See\n            \u003chttp://dev.mysql.com/doc/refman/5.0/en/thread-commands.html\u003e\n            for the list of possible commands.\n\n    --selects-only\n            This is equivalent to: --exclude=write --exclude=other\n            --exclude=sleep --exclude=system.\n\n    --min-time=#\n            Exclude queries with execution time lower than given parameter.\n\n    --timeout\n            Keep only queries with a timeout provided and with an execution\n            time which exceeded this timeout. The timeout can be provided\n            with the query in a comment like this:\n\n              SELECT /* timeout:40 */ * FROM table;\n\n            Timeout is expressed in second.\n\n    --limit=#\n            Take first # threads and excludes others.\n\n    --placeholder\n            Will try to make queries more generic by replacing all values by\n            either \"i\" for numbers or \"s\" for strings.\n\n    --distinct\n            Keep only the first query from group of identical queries and\n            exlude others.\n\n            Note: If you use this option with --placeholder, queries that\n            would differ only by values used will become identical. This is\n            useful to distinct big type of queries.\n\n    --sort[=name]\n            Sort matched queries by parameter given as argument.\n\n            Allowed parameters are as follow:\n\n            concurrency or c\n\n            Sort queries by most repeated ones.\n\n            time or t\n\n            Sort queries by longer execution time.\n\n    --list[=template]\n            Output the result to the terminal.\n\n            The default output format can be changed by supplying a template\n            with desired field.\n\n            Available fields are: Id, User, Command, State, Db, Host, Time,\n            Info, Group, Concurrency, QType, Timeout\n\n            Default template is: \u003cId\u003e \u003cUser\u003e \u003cDb\u003e \u003cTime\u003e \u003cInfo\u003e\n\n    --kill  Kill every threads that match the given filters.\n\n    --stats Show statistics about queries matched by filters.\n\n    --interval[=#]\n            Repeat the command at regular interval. Interval in second can\n            be specified as argument. If not specified, default interval is\n            5 seconds.\n\nDESCRIPTION\n    mysql-genocide helps you play with big MySQL processlists. It can filter\n    it using different criterias like execution time, query type, user or\n    regexp matching of the SQL query etc. Actions can then be peformed on\n    the result like killing, sorting or generating statistics.\n\nEXAMPLES\n    Kill all selects with execution time geater than 60 seconds:\n\n        mysql-genocide --selects-only --min-time 60 --kill\n\n    Same as before but limited on queries matching a pattern:\n\n        mysql-genocide -s -t 60 -K 'FROM user '\n\n    Kill all queries timed out:\n\n        mysql-genocide --timeout --kill\n\n    Replace queries values by placeholders and group identical queries\n    together, sort them by most concurrent and keep only the 10 most\n    concurent ones:\n\n        mysql-genocide --placeholder --group --sort concurrency --limit 10 --list\n\nSCRIPT CATEGORIES\n    Unix/System_administration\n\nPREREQUISITES\n    This script requires the \"DBD::mysql\", \"Getopt::Long\" and \"Pod::Usage\"\n    modules.\n\nOSNAMES\n    any\n\nAUTHOR\n    Olivier Poitrey \u003crs@dailymotion.com\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs%2Fmysql-genocide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frs%2Fmysql-genocide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs%2Fmysql-genocide/lists"}