Hi everyone,I have a script that I normally run (called "extract.sh") but can't seem to run it today because everytime I run it, it says that it's already running :| , but if I do "ps -ef | grep extract", nothing shows up. The log file, however, tells a different story:
Fri Jan 12 08:03:01 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already running, pid: 29669Fri Jan 12 08:05:29 EST 2007, >>>>>>>>>>>>>>>>>>>>
extract.sh is already running, pid: 270Fri Jan 12 08:05:53 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already running, pid: 277Fri Jan 12 08:08:09 EST 2007, >>>>>>>>>>>>>>>>>>>>
extract.sh is already running, pid: 1054Fri Jan 12 08:16:41 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already running, pid: 2154Every time I try to run the script, a new entry shows up in the log file telling me that
extract.sh is already running, each time with a different pid. I've tried "kill -9 PID" with the PIDs that showed up in the log file, but it doesn't help. Does anybody know what to do in such a situation? (btw, a reboot is the very very very last thing we want to do here as it's on a production machine and it would cause a lot of problems)
Thanks in advance!Cheers,-Glen
Bookmark/Search this post with:
Killing a process that doesn't exist!?
On Fri, Jan 12, 2007 at 09:52:00AM -0400, Glen Yu wrote:
> I have a script that I normally run (called "extract.sh") but can't seem
> to run it today because everytime I run it, it says that it's already
> running :| , but if I do "ps -ef | grep extract", nothing shows up. The
> log file, however, tells a different story:
>
> Fri Jan 12 08:03:01 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 29669
It has a process ID, is that process ID running? Is it the script?
If not you'll need to post a short *extract* of the script and maybe
somebody will point out the bug in it.
Steve
--
--
Killing a process that doesn't exist!?
Hi,It's a shell script. Even though the log file says the script is running with a particular pid, that pid doesn't exist in the process table.Cheers,-Glen
On 1/12/07, Steve Kemp <skx@debian.org> wrote:
On Fri, Jan 12, 2007 at 09:52:00AM -0400, Glen Yu wrote:> I have a script that I normally run (called "extract.sh") but can't seem> to run it today because everytime I run it, it says that it's already
> running :| , but if I do "ps -ef | grep extract", nothing shows up. The> log file, however, tells a different story:>> Fri Jan 12 08:03:01 EST 2007, >>>>>>>>>>>>>>>>>>>>
extract.sh is already> running, pid: 29669 It has a process ID, is that process ID running? Is it the script? If not you'll need to post a short *extract* of the script and maybe somebody will point out the bug in it.
Steve----To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.orgwith a subject of "unsubscribe". Trouble? Contact
Killing a process that doesn't exist!?
On Fri, Jan 12, 2007 at 10:10:46AM -0400, Glen Yu wrote:
> It's a shell script. Even though the log file says the script is running
> with a particular pid, that pid doesn't exist in the process table.
Well without seeing the script we can't help you much more. You
will need to see where in the script it writes that log entry, then
see what it tests against to get the idea it is already running - and
fix it to work properly.
Steve
--
--
Killing a process that doesn't exist!?
On Fri, 12 Jan 2007 15:00:26 +0100, Glen Yu wrote:
> Hi everyone,
>
> I have a script that I normally run (called "extract.sh") but can't seem to
> run it today because everytime I run it, it says that it's already running
> :| , but if I do "ps -ef | grep extract", nothing shows up. The log file,
> however, tells a different story:
>
> Fri Jan 12 08:03:01 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 29669
> Fri Jan 12 08:05:29 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 270
> Fri Jan 12 08:05:53 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 277
> Fri Jan 12 08:08:09 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 1054
> Fri Jan 12 08:16:41 EST 2007, >>>>>>>>>>>>>>>>>>>> extract.sh is already
> running, pid: 2154
I've run into this sort of thing before and it turned out to be tripping
over the grep process. Does your script also 'ps -ef | grep extract'
or something similar? If so, the PIDs might be those of the grep process.
Good luck,
Reid
--