killing processes
David A. Bandel
david.bandel at gmail.com
Thu Dec 4 02:56:07 PST 2008
On Thu, Dec 4, 2008 at 2:19 AM, Machiel Richards
<MachielR at agilitytech.co.za> wrote:
> Hi Guys
>
> Here is the details from the administrator of that system:
>
>
> Processes were spawned by the Oracle backup cron (rman).
>
>
> "Any chance the cron could run a second time while the first is running?"
>
> This is what happened yes. The 2nd cron started while the previous one was still running (took longer than 24 hrs). I then killed the first one, but it left processes behind with parent id 1 (kill -9 doesn't work on them).
OK, you're going to have to write an actual script to run this, write
a pid file when the process starts, but one line above check for the
pid file to see if one already exists and exit if it does. Don't
forget to remove your pid file when you're done.
But if the process is running 24 hours, you still must have contention
with another running process. File deletes don't take that long --
file shreds might, but deletes don't. You'll need to stop trying to
delete files still in use.
>
> Example:
>
> Server:~ # ps -ef | grep 17344
> oracle 17344 1 0 Nov27 ? 00:00:07 /bin/sh -c rm -f /backups/yarona/ARC* 1>/dev/null 2>&1
> root 3302 18699 0 12:55 pts/0 00:00:00 grep 17344
>
> Server:~ # kill -9 17344
>
> Server:~ # ps -ef | grep 17344
> oracle 17344 1 0 Nov27 ? 00:00:07 /bin/sh -c rm -f /backups/yarona/ARC* 1>/dev/null 2>&1
> root 3691 18699 0 12:55 pts/0 00:00:00 grep 17344
>
>
>
>
[snip]
HTH,
David A. Bandel
--
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
More information about the Linux-users
mailing list