Solved

Linux command to stop a process

Posted on 2016-08-01
8
81 Views
Last Modified: 2016-08-02
I had this question after viewing Unix / Linux grid computing.
0
Comment
Question by:taaz
  • 4
  • 3
8 Comments
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 250 total points
Comment Utility
What is the question?

To stop a process, you use the kill command. Give the process ID as parameter.
0
 
LVL 13

Assisted Solution

by:Alexander Eßer [Alex140181]
Alexander Eßer [Alex140181] earned 250 total points
Comment Utility
Yes, use kill (or kill -9) aka SIGTERM or SIGKILL

Just to add:

https://major.io/2010/03/18/sigterm-vs-sigkill/
0
 

Author Comment

by:taaz
Comment Utility
So we can not stop the process and then restart ?
The only option we have is to kill the process?

How we can start the same process if we kill it?
0
 

Author Comment

by:taaz
Comment Utility
The thing is I want to temporary stop the process and then restart
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
What process is this? You want to pause a process, not stop a process right?
0
 

Author Comment

by:taaz
Comment Utility
Right
To pause and then start
0
 
LVL 37

Accepted Solution

by:
Gerwin Jansen earned 250 total points
Comment Utility
To do that you can try SIGSTOP and SIGCONT signals:

SIGCONT - To make processes continue executing after being paused by the SIGTSTP or SIGSTOP signal, send the SIGCONT signal to the paused process. This is the CONTinue SIGnal. This signal is beneficial to Unix job control (executing background tasks).

So:

kill -SIGSTOP <process ID>

and:

kill - SIGCONT <process ID>
0
 

Author Closing Comment

by:taaz
Comment Utility
Thank you!!!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now