… other than what its name implies.
kill is most often used without an argument or with -9,
to kill a process off. But it can also be used to send various other signals
to a process. Some are variations on process termination, but you can
also get information about or out of processes.
Here are some you may find useful:
- kill -0 pid: This doesn’t actually kill the process, just
returns 0 (success) if the process exists and 1 (failure) if not. The
command itself will not give you any output — you have to look at the
exit code, using echo $? to get the information. So as
a one-liner:kill -0 1685; echo $?will output 0 if process 1685 exists, and 1 if it doesn’t. This can also
be useful in shell scripts if you have a process number recorded and wish
to check if it’s still running. - kill -9 pid: You probably already know that you can terminate the
process WITH EXTREME PREJUDICE. kill -KILL does the same thing
and has the advantage of looking more vicious. The downside is that it is an extra couple ofcharacters to type. - kill -HUP pid: Restarts the process.
- kill -INT pid: Another way of killing the process, this time
by interrupting it. It is a useful halfway house between kill and
kill -9. - kill -ABRT pid: Stops your program and gets it to dump core
if possible/appropriate. (kill -6 is a synonym.)
This can be useful if a process is misbehaving, as it means that you may get debug information.
This article was first published on ServerWatch.com.
RELATED NEWS AND ANALYSIS
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020 -
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020 -
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020 -
FEATURE | By Samuel Greengard,
November 05, 2020 -
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020 -
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020 -
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020 -
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020 -
FEATURE | By Cynthia Harvey,
October 07, 2020 -
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020 -
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020 -
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020 -
Top 10 Machine Learning Companies 2020
FEATURE | By Cynthia Harvey,
September 22, 2020 -
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020 -
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020 -
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020 -
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020 -
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020 -
Anticipating The Coming Wave Of AI Enhanced PCs
FEATURE | By Rob Enderle,
September 05, 2020 -
The Critical Nature Of IBM’s NLP (Natural Language Processing) Effort
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
August 14, 2020
ARTICLES