| Computers Forum Index » Computer - Databases - Oracle (Server) » To kill all processes except mine -- Linux... |
|
Page 1 of 1 |
|
| Author |
Message |
| Ram... |
Posted: Fri Nov 06, 2009 8:14 am |
|
|
|
Guest
|
Hi all,
I wanted to kill all process of one user except mine.Normally i use to
kill all the sessions using
this command
kill -9 -1
But this command will also kills even my process too . But i dont this
too happen.
2. How to find parent process and child process .
Regards
Ram |
|
|
| Back to top |
|
|
|
| Mladen Gogala... |
Posted: Fri Nov 06, 2009 1:39 pm |
|
|
|
Guest
|
On Fri, 06 Nov 2009 00:14:18 -0800, Ram wrote:
Quote: Hi all,
I wanted to kill all process of one user except mine.Normally i use to
kill all the sessions using
this command
kill -9 -1
But this command will also kills even my process too . But i dont this
too happen.
2. How to find parent process and child process .
Regards
Ram
ps -fu oracle|awk '{ print $2; }'|grep -v $$|xargs kill -9
--
http://mgogala.freehostia.com |
|
|
| Back to top |
|
|
|
| Mladen Gogala... |
Posted: Fri Nov 06, 2009 2:09 pm |
|
|
|
Guest
|
On Fri, 06 Nov 2009 13:39:13 +0000, Mladen Gogala wrote:
Quote: On Fri, 06 Nov 2009 00:14:18 -0800, Ram wrote:
Hi all,
I wanted to kill all process of one user except mine.Normally i use to
kill all the sessions using
this command
kill -9 -1
But this command will also kills even my process too . But i dont this
too happen.
2. How to find parent process and child process .
Regards
Ram
ps -fu oracle|awk '{ print $2; }'|grep -v $$|xargs kill -9
Alternatively, on Linux:
pgrep -u oracle|grep -v $$
--
http://mgogala.freehostia.com |
|
|
| Back to top |
|
|
|
| bob123... |
Posted: Sat Nov 07, 2009 12:20 pm |
|
|
|
Guest
|
kill -9 -1
kill all you own (including the current)
"Ram" <krishna000 at (no spam) gmail.com> a écrit dans le message de news:
656ba8f0-cc7c-4763-a8ea-fdf94cb82cfe at (no spam) z3g2000prd.googlegroups.com...
Quote: Hi all,
I wanted to kill all process of one user except mine.Normally i use to
kill all the sessions using
this command
kill -9 -1
But this command will also kills even my process too . But i dont this
too happen.
2. How to find parent process and child process .
Regards
Ram |
|
|
| Back to top |
|
|
|
| Mladen Gogala... |
Posted: Sun Nov 08, 2009 3:38 am |
|
|
|
Guest
|
On Sat, 07 Nov 2009 08:20:53 +0100, bob123 wrote:
Quote: kill -9 -1
kill all you own (including the current)
Which is precisely what the OP does not want.
--
http://mgogala.freehostia.com |
|
|
| Back to top |
|
|
|
| Andreas Piesk... |
Posted: Sun Nov 08, 2009 10:01 am |
|
|
|
Guest
|
On 6 Nov., 15:09, Mladen Gogala <gogala.mla... at (no spam) gmail.com> wrote:
Quote: On Fri, 06 Nov 2009 13:39:13 +0000, Mladen Gogala wrote:
On Fri, 06 Nov 2009 00:14:18 -0800, Ram wrote:
Hi all,
I wanted to kill all process of one user except mine.Normally i use to
kill all the sessions using
this command
kill -9 -1
But this command will also kills even my process too . But i dont this
too happen.
2. How to find parent process and child process .
Regards
Ram
ps -fu oracle|awk '{ print $2; }'|grep -v $$|xargs kill -9
Alternatively, on Linux:
pgrep -u oracle|grep -v $$
or just pkill. pkill can send signals to all processes belonging to a
user, group, parent, etc.
-ap |
|
|
| Back to top |
|
|
|
| Loki... |
Posted: Sun Nov 08, 2009 6:55 pm |
|
|
|
Guest
|
On Sun, 08 Nov 2009 02:01:23 -0800, Andreas Piesk wrote:
Quote: or just pkill. pkill can send signals to all processes belonging to a
user, group, parent, etc.
-ap
Unfortunately, you cannot filter out your process with pkill. That was
the requirement, if I remember correctly. |
|
|
| Back to top |
|
|
|
| Andreas Piesk... |
Posted: Sun Nov 08, 2009 9:44 pm |
|
|
|
Guest
|
On 8 Nov., 19:55, Loki <l... at (no spam) asgard.hr.invalid> wrote:
Quote: On Sun, 08 Nov 2009 02:01:23 -0800, Andreas Piesk wrote:
or just pkill. pkill can send signals to all processes belonging to a
user, group, parent, etc.
-ap
Unfortunately, you cannot filter out your process with pkill. That was
the requirement, if I remember correctly.
ah, you're right. i misunderstood that requirement.
-ap |
|
|
| Back to top |
|
|
|
|