Solved

Linux command to stop a process

Posted on 2016-08-01
8
90 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, 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

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

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 37

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

803 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