Mailinglist Archive: opensuse (5100 mails)
| < Previous | Next > |
Re: [SLE] How to find PID
- From: C Hamel <vgm2@xxxxxxxxxx>
- Date: Wed, 2 Jun 2004 10:07:50 -0500
- Message-id: <200406021007.50244.vgm2@xxxxxxxxxx>
On Wednesday 02 June 2004 08:07, Jostein Berntsen wrote:
> On 01.06.04,11:29, C Hamel wrote:
> > Is there an easy way to check for an application's PID# & kill it using a
> > script?
> > --
>
> I like this way:
>
> #!/bin/sh
> while true
> do
> kill -9 `ps aux | grep -i $1 | awk '{ print $2 }'` sleep 2
> done
>
> put this in a script called kl. And run for ex. 'kl mozilla' when it
> gets to heavy.
>
> - Jostein
>
> --
> Jostein Berntsen <jbernts@xxxxxxxxxxxx>
I like the simplicity, but is the usual test for a pid done beforehand for the
particular application?
--
...CH
SuSE 9 Works
Linux user# 313696
Linux box# 199365
> On 01.06.04,11:29, C Hamel wrote:
> > Is there an easy way to check for an application's PID# & kill it using a
> > script?
> > --
>
> I like this way:
>
> #!/bin/sh
> while true
> do
> kill -9 `ps aux | grep -i $1 | awk '{ print $2 }'` sleep 2
> done
>
> put this in a script called kl. And run for ex. 'kl mozilla' when it
> gets to heavy.
>
> - Jostein
>
> --
> Jostein Berntsen <jbernts@xxxxxxxxxxxx>
I like the simplicity, but is the usual test for a pid done beforehand for the
particular application?
--
...CH
SuSE 9 Works
Linux user# 313696
Linux box# 199365
| < Previous | Next > |