Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
killing a process
06-11-2018, 03:23 PM (This post was last modified: 07-13-2018 07:00 PM by cchen.)
Post: #1
killing a process
When a program crashes, let's say we've got our browser running and all of a sudden it locks up, it may become completely unresponsive. In this case, we can easily kill Firefox and then reopen it, without rebooting the machine. To start off we need to identify the process id:
Code:
[cchen@cchen ~]$ ps aux | grep 'firefox'
cchen     2674  8.4  7.1 2567520 286860 ?      Sl   14:51   1:18 /usr/lib64/firefox/firefox
We can also use the following command to print all the running processes:
Code:
ps -eaf | grep <your ppid> | grep -v grep
Note that you can use "ps -f" to know your ppid

the number next to the owner is the PID (Process ID). We can use this to identify which process to kill. To do so we use:
Code:
kill [signal] pID

Sometimes this does not work however. the process may still be running. Then we can run kill again but this time supply a signal of 9 which makes sure the process is well and truly gone.
Code:
kill -9 6978

On rare occassions, when a process crashes and locks up, it can lock up the entire desktop. If the GUI has locked up, and we are in luck, we can get to another console and kill the offending process from there. To switch between consoles:
Code:
CTRL + ALT + F<Console>
So CTRL + ALT F2 will get you to a console where you can run the commands as above to identify process ids and kill them. Then CTRL + ALT F7 will get you back to the GUI to see if it has been fixed.
Find all posts by this user
Quote this message in a reply
07-13-2018, 06:56 PM
Post: #2
RE: killing a crashed process
@cchen

When you writing something like a turtorial, please make sure the content is correct or let someone to review it first.

Also, what is the purpose of this tutorial? The title is "killing a crashed process" but I saw du, stat in it.

Please also read the man page of 'free' , I don't think it free memories.

pvdisplay got a specific usage bug not for a general purpose.
Find all posts by this user
Quote this message in a reply
07-13-2018, 06:59 PM
Post: #3
RE: killing a crashed process
I also realized many of the contents are not related to the topic. Already removed the irrelevant contents. Sorry for this

(07-13-2018 06:56 PM)rayluk Wrote:  @cchen

When you writing something like a turtorial, please make sure the content is correct or let someone to review it first.

Also, what is the purpose of this tutorial? The title is "killing a crashed process" but I saw du, stat in it.

Please also read the man page of 'free' , I don't think it free memories.

pvdisplay got a specific usage bug not for a general purpose.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: