Kill and kill processes in CentOS
After collecting and sorting out the relevant linux killing process materials, I would like to recommend this article to you here. I hope you will see a lot of gains in the future.
1. kill
Purpose: kill a process based on the process number.
Usage:
Use pt-kill to kill the connection method according to certain rules, pt-killkill
Pt-kill is an excellent tool for kill MySQL connection and is part of percona toolkit, when the maximum number of connections is exceeded due to a large number of idle connections and a problematic SQL statement causes a high mysql load,
[Linux Study Notes] usage of kill and kill-9 and how to exit the process elegantly 1. kill and signals the kill we mentioned here refers to the kill used as the shell command (in contrast, there is a system call called kill in the
Tutorial directory:G-1. The end source analysis of the big kill-find the character information base offset.G-2. Kill character Information base game exit will change the issue.G-3. Other related information offsets are easily mined by an offset of the character information.G-4. Ultra-strong tips for fast analysis of the characters needed to upgrade experience offset.G-5. Devil Hook inject fast
Pt-kill is a good kill MySQL connection tool, is a part of Percona Toolkit, in the due to more idle connections cause more than the maximum number of connections, a problem of SQL causes MySQL load is high, you need to kill some connections, This tool is mainly used for this purpose.
Parameters
–busy-time
Run time
–idle-time
Free time
–victims
All matching
Shell Trojan Kill is the first specifically designed for online games anti-theft number tailored to the completely free Trojan kill software, pure green, installation-free, volume only 373 KB, very lightweight, suitable for users to download the use of fast. It is produced by Jinshan's Shell Internet (Beijing) Security Technology Co., Ltd., founded in 2009, is a professional Internet Security Service and pr
Remotely and quickly kill a session !, Remotely kill a session!Today, A developer called A (not to mention the information) asked in the group:The table is stuck when a large amount of data is inserted. I found that the table is locked and the session has been killed, but it cannot be unlocked. The status is killed. The table cannot be released and deleted, no. The system prompts that the resource is busy.A
Python uses pid to kill the corresponding process, and pythonpid to kill the process
Using the python language to kill the corresponding process based on the pid
The kill_process.py code is as follows:
#! /Usr/bin/python #-*-coding: UTF-8-*-import osimport sysimport signaldef kill (pid): try: a = OS.
The quickest way to kill the lock process is to restart MySQL, like in your case, with more than 1000 SQL locked, preferably a rebootIf I do not allow a restart, I provide a shell script that generates a Kill ID command to kill the lock thread, as follows:------------------------------------#!/bin/bashMysql-u root-e "Show processlist" |grep-i "Locked" >> locked.t
A process is a symbol of the execution of a program in the computer, and the corresponding process terminates when the program is finished executing. But in reality many processes do not die at the end of the execution of the program, so they become zombies, and a small number of zombies do not affect the performance of the server, but no server can provide good performance in many processes.
Sometimes, because of some special circumstances, you need to kil
Let's say we're going to kill Tomcat:So we first need Tomcat's process number PID:Ps-aux | grep TomcatAfter writing down Tomcat's PID, execute: Kill PID (Tomcat)All right, here we go.Passers-by: the little ones, the guy who cheated people's feelings!Me: Cough! Everybody calm and calm, I this will give everyone to add vegetables ...—————————————————————————————————————————————————Study is not to become lazy,
"My goodness! , the page editor does not have the ability to automatically save drafts. I didn't write anything yesterday. Forget it, don't care about this. I didn't write much anyway.Hee HeeYou must be very familiar with kill-9 and often use it in your work. Especially if you're going to restart Tomcat. But for the most part, our understanding of-9 is only superficial.Very few people (including me) take a serious look at what
1, PS-EF | grep Firefox | Grep-v grep | Cut-c 9-15 | Xargs Kill-s 9DescriptionThe result of "grep Firefox" is that all processes that contain the keyword "Firefox".Grep-v grep removes the process that contains the keyword "grep" in the listed process."Cut-c 9-15" is the 9th character to the 15th character of the input line, which is exactly the process number PID.The Xargs command in "Xargs kill-s 9" is use
[Email protected]:~$ killall-h Usage: killall [options] ... [--] Process name ... killall-L,--List Killall-V,--version-e,--exact require exact match forVeryLongnames-I.,--ignore- Case Caseinsensitive process name Match-G,--process-group Kill Process Group instead of process-Y,--younger-than kill processes younger than time-O,--older-than kill processes older
Php code exec (kill $ pid, $ op, $ returns) cannot kill processes under the linux virtual machine. for example, I write the php code exec ("kill $ pid ", $ op, $ returns). after a pid is run to kill a process, "1" is always returned, which means that the execution fails and the process id remains. I have granted the ma
On the homepage of the past two days, the post-doctoral and migrant workers' differences have attracted the attention of many people, the author, Ji Yu, then published the story "", and Lao Zhao also wrote the story about postdoctoral and migrant workers. aaron looked at him and he looked at him and said that he had some opinions on the small work that he was looking. Aaron took a closer look and found that the employee's practice is very similar to the chicken knife that he used now. However, A
found the server was black, decisively put IP to the ban,but the process of finding black me has been in Sleeping , with what Kill , Pkill It doesn't work .650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/AA/wKioL1WCbdPz-rWaAAJ6xAeXTCI069.jpg "title=" a.jpg " alt= "Wkiol1wcbdpz-rwaaaj6xaextci069.jpg"/>[emailprotected]:/proc#ps-ef|grepzlroot22229 1019:19?00:00:00 sh-c (chmod-r777/tmp) ; (rm-f/tmp/.lz*) ; ( echoyes|cp-p/etc/.zl/tmp/.lz14296
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.