LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2006, 05:57 PM   #1
jojojo
Member
 
Registered: Feb 2005
Location: Kuala Lumpur, Malaysia
Distribution: Fedora Core 5
Posts: 121

Rep: Reputation: 15
How to know which process can be stop


I want to stop a process from running but I dont know which process is suitable to be killed cause I'm afraid that if I stop the wrong process, it might make the system unstable. Any suggestion on stopping a process? Is it wise to stop a process from the /usr or /sbin directory which is runned by root?
 
Old 06-15-2006, 06:42 PM   #2
Russell Griffiths
LQ Newbie
 
Registered: May 2006
Location: Sydney, Australia
Distribution: Red Hat 7.3
Posts: 27

Rep: Reputation: 15
If you know the name of the process, eg sendmail, just type ps -aux | sendmail, and that will list all processes with sendmail in the name, along with their PIDs (process id's).
then just kill the process by number. ie if it's pid 567, just kill 567 will do it.
if you want to get a list of al the processes runing, and then sit down and pore over it, type 'ps -aux > processes.txt
That will send a detailed list of all the processes to the file processes.txt
then you can print it, and try to work out what each is/does.
if you see a process called xyz, look for a man page for that program . 'man xyz' will do that. That will get you info on most of the stuff that's running, and you can decide which ones you need/don't.

Anything you want to stop from loading at bootup, remove the S* file from /etc/rc.d.rc3.d (to see the names of the files kicked off at startup, type 'ls -l /etc/rc.d/rc3.d/S*' ie list all the files, that start with S, in that directory.
Or if you are running X, use the services program to select which ones you want/don't want.

Does this help?

Griffo
 
Old 06-15-2006, 08:04 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If you don't know WHICH process you want to stop, then how do you know that you want to stop something?? What problem are you trying to solve......

if you do "ps" you will see all the processes. (see man ps) If you don't know what something is, then you can bet that killing it might not be good. On the other hand, you probably won't do irreversible damage by experimenting (After backing up all your data, of course... )
 
Old 06-16-2006, 12:40 AM   #4
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 399

Rep: Reputation: 87
How about this for a notion.....

If you are a Good Guy, you are not running as super user (root), right!?

Thus you can kill all and every process in sight.

And the system will keep running.

Since the kernel won't allow you to kill any process that is not your user process.


Your window manager may die, your editor may get killed, the panel may vanish but who cares, the system keeps chugging along.

Logout and login again and all is fine.


Useful commands relating to processes....

ps auxw | less
List all processes


pstree -pal
List process tree structure.

top
See which process is hogging

killall -9 firefox-bin
Tries to kill all firefox instances.

su
/etc/init.d/httpd restart
exit
Kills and restarts the web server.
 
  


Reply

Tags
kill, process, processes, ps, restart, top


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop Startup Process easyE Linux - General 2 05-03-2005 06:37 PM
how to stop a process? frostmagic Programming 14 12-05-2003 12:02 PM
How to stop LP process at bootup? britishnemesis Linux - Software 1 10-27-2003 02:04 AM
rc.d with K to stop the process... psyklops Linux - General 1 10-18-2003 02:14 PM
How to stop SSHD process???? adamrau Linux - Security 2 12-07-2001 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration