Solved

Linux command to stop a process

Posted on 2016-08-01
8
94 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 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 250 total points
ID: 41737483
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
ID: 41737526
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
ID: 41737570
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:taaz
ID: 41737630
The thing is I want to temporary stop the process and then restart
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41737664
What process is this? You want to pause a process, not stop a process right?
0
 

Author Comment

by:taaz
ID: 41737707
Right
To pause and then start
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 250 total points
ID: 41737917
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
ID: 41739254
Thank you!!!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux 13 99
EXCHANGE. LINUX, SYMANTEC MESSAGING GATEWAY 2 49
Internal CA server 6 88
check the file dates in unix 14 20
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

685 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