Linux Debian support - How to find what processes are running and how to kill one?

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > August 2007 > How to find what processes are running and how to kill one?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to find what processes are running and how to kill one?
Edmund

2007-07-17, 7:13 am

How to find what processes are running and how to kill one?
It seems that an FTP process is running and now the windows from
"Search for Files" doesn't open anymore :-(

As I newbie I need such a Search option all the time.

Edmund
slakmagik

2007-07-17, 7:13 am

On 2007-07-17 Tue 07:21:00, Edmund wrote:
> How to find what processes are running and how to kill one?
> It seems that an FTP process is running and now the windows from
> "Search for Files" doesn't open anymore :-(
>


ps (or pgrep) and kill (or pkill or killall) - read the manuals of each
for details, but a typical usage would be

$ ps auxww | grep MyProcess | grep -v grep
user 22626 blah blah
$ kill 22626

(pgrep is cool because it doesn't match itself and returns only PIDs by
default)

The 'top' command will show you all processes interactively and allow
you to kill them that way, too.

And if you need to find something, the 'find' and 'locate' commands
are available with or without a GUI.
Lew Pitcher

2007-07-17, 1:13 pm

On Jul 17, 7:21 am, Edmund <nom...@hotmail.com> wrote:
> How to find what processes are running and how to kill one?
> It seems that an FTP process is running and now the windows from
> "Search for Files" doesn't open anymore :-(


The most 'global' method (that is, the one that works anywhere) is to
open a console or xterm and enter
ps aux
which will list all running processes.

To kill one of the processes, note down its PID, and (as the
appropriate user), enter
kill <PID>
(replacing <PID> with the PID you noted earlier). This will do a
"nice" kill (a SIGTERM, actually) of the process. If the process
refuses to die, you can
kill -9 <PID>
to kill it dead.

Remember, you can't kill "zombie" (stopped) processes or processes
that are in an Uninteruptable wait state.

HTH
--
Lew



Rodney

2007-07-17, 1:13 pm

On Tue, 17 Jul 2007 13:21:00 +0200, Edmund wrote:

> How to find what processes are running and how to kill one? It seems
> that an FTP process is running and now the windows from "Search for
> Files" doesn't open anymore :-(
>
> As I newbie I need such a Search option all the time.
>
> Edmund


Edmund, it would be a good idea for you to get in the habit of
giving better information. From what you have written, you'll likely get
exactly what you received, brief replies with commands that you aren't
familiar with and from another thread it seems you aren't even familiar
with man pages (manual pages) to look those commands up. Commands like
"man ps" and "man top" would show you what those commands do and "man
kill" would explain the kill command. My guess is that the brief answers
might be of limited use to you at this point, even though they are correct.

In addition, is
this "Search for Files" some GUI program on a menu provided by one of the
desktop environments like Gnome or KDE or something else? Lots of us don't
use either Gnome or KDE and might not be familiar with what's on one of
those menus, you don't want people to ignore your question because they
don't think it's clear. What is it you need to search for "all the time",
take some time to learn about the file system structure. Any files you've
created are in your home directory, that's the only place a user has
permission to write files in a default install.

A site like Debian newbie documentation:
http://newbiedoc.berlios.de/wiki/De...e_documentation might be a
good place for you to look, howto's, tutorials, FAQ's which can
probably get you started on things that you will want to know and help you
to ask questions. A lot of the people reading this group want to help
people who show they have tried to help themselves, rather than someone
who comes here all the time with every question they encounter. I would
guess that is the point Dan C is trying to make to you.

I think chances are good, from your questions that I've seen over the last
while, that you actually want some program with a graphical interface like
gnome system monitor or something like that but that's not likely to be
the first answer that will be provided.

Rodney
Rockinghorse Winner

2007-07-19, 1:14 am

In alt.os.linux.debian, Rodney had the audacity to say that:

> On Tue, 17 Jul 2007 13:21:00 +0200, Edmund wrote:
>
>
> Edmund, it would be a good idea for you to get in the habit of
> giving better information. From what you have written, you'll likely get
> exactly what you received, brief replies with commands that you aren't
> familiar with and from another thread it seems you aren't even familiar
> with man pages (manual pages) to look those commands up. Commands like
> "man ps" and "man top" would show you what those commands do and "man
> kill" would explain the kill command. My guess is that the brief answers
> might be of limited use to you at this point, even though they are correct.
>
> In addition, is
> this "Search for Files" some GUI program on a menu provided by one of the
> desktop environments like Gnome or KDE or something else? Lots of us don't
> use either Gnome or KDE and might not be familiar with what's on one of
> those menus, you don't want people to ignore your question because they
> don't think it's clear. What is it you need to search for "all the time",
> take some time to learn about the file system structure. Any files you've
> created are in your home directory, that's the only place a user has
> permission to write files in a default install.
>
> A site like Debian newbie documentation:
> http://newbiedoc.berlios.de/wiki/De...e_documentation might be a
> good place for you to look, howto's, tutorials, FAQ's which can
> probably get you started on things that you will want to know and help you
> to ask questions. A lot of the people reading this group want to help
> people who show they have tried to help themselves, rather than someone
> who comes here all the time with every question they encounter. I would
> guess that is the point Dan C is trying to make to you.
>
> I think chances are good, from your questions that I've seen over the last
> while, that you actually want some program with a graphical interface like
> gnome system monitor or something like that but that's not likely to be
> the first answer that will be provided.
>
> Rodney


I have found the apropos command useful when you don't know what command to
look up. "apropos 'keyword' will output commands that contain 'keyword' in
their description. GL

*R* *H*

--
The meeting of two personalities is like the contact of two
chemical substances: if there is any reaction, both are transformed.
-- Carl Jung
Rodney

2007-07-19, 7:13 am

On Thu, 19 Jul 2007 03:05:35 +0000, Rockinghorse Winner wrote:

> In alt.os.linux.debian, Rodney had the audacity to say that:
>
>
> I have found the apropos command useful when you don't know what command
> to look up. "apropos 'keyword' will output commands that contain
> 'keyword' in their description. GL
>
> *R* *H*


*R* *H*,
And you're telling *me* this, why? Did you perhaps post this to the
incorrect thread? I'm neither looking for nor confused by any commands,
I'm trying to help Edmmund and asking him to explain better what he wants.

Rodney

Wilbert Smeets

2007-07-22, 1:12 am

Edmund wrote:
> How to find what processes are running and how to kill one?
> It seems that an FTP process is running and now the windows from
> "Search for Files" doesn't open anymore :-(
>
> As I newbie I need such a Search option all the time.
>
> Edmund


Hi Edmund,

Personally I use:

ps -aux

This wil give you a list of all programs on the system.
If you want to show processes which are started by you then I would type:

ps

If you know what you are looking for, I would type:

ps -aux | grep nameoftheprogram

this will give you it's PID

If I wanted to kill it right away, I would do so by:

kill -9 yourPID

The -9 after 'kill' tells your system to kill the process no matter what.

I hope this helps.

Cheers,

Wilbert Smeets
Mark Kent

2007-08-07, 7:13 pm

Wilbert Smeets <smeets.wilbert@home.nl> espoused:
> Edmund wrote:
>
> Hi Edmund,
>
> Personally I use:
>
> ps -aux
>
> This wil give you a list of all programs on the system.
> If you want to show processes which are started by you then I would type:
>
> ps
>
> If you know what you are looking for, I would type:
>
> ps -aux | grep nameoftheprogram
>
> this will give you it's PID
>
> If I wanted to kill it right away, I would do so by:
>
> kill -9 yourPID
>
> The -9 after 'kill' tells your system to kill the process no matter what.
>
> I hope this helps.
>
> Cheers,
>
> Wilbert Smeets


Good suggestion.

Also, yoou could try the top command, and then use the key 'k' to kill a
process by pid. You need to say which signal, but 15 or 9 are good
choices.

--
| Mark Kent -- mark at ellandroad dot demon dot co dot uk |
| Cola faq: http://www.faqs.org/faqs/linux/advocacy/faq-and-primer/ |
| Cola trolls: http://colatrolls.blogspot.com/ |
| My (new) blog: http://www.thereisnomagic.org |
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com