Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: lsnrctl cause mail to wait.
Hi Pierre-Andre,
I don't know why you want to redirect your output to mail. If you already
have a script why don't you just change it, so that the /tmp/foo file gets
mailed, once lsnrctl completes.
Also, if your command reads
lsnrctl
start listener &1
, the shell process doesn't know where to get its input from and it will be
hanging forever.
The command
lsnrctl start listener &1
should do
Also, you are misinterpreting the output of the ps command. The "1" means
the process has been created by the root process,
which is quite normal.
Hth,
Sybrand Bakker, Oracle DBA
Pierre-Andre Morin wrote:
> I have a problem:
>
> On Sun computer (OS 5.6) with Oracle 7.3.4.
>
> I have a crontab command that starts a listener. When I redirect the
> output to a file:
> 58 16 * * * /u01/app/oracle/autosys/script/START_ORACLE hrdemo
> 1>/tmp/foo 2>&1
> everything is fine.
>
> This START_ORACLE essentially contains: “lsnrctl start $1”.
>
> If I redirect the output to mail:
> 58 16 * * * /u01/app/oracle/autosys/script/START_ORACLE hrdemo 2>&1
> | /usr/bin/mailx -s "START_ORACLE" Pierre-Andre_Morin_at_japan.ml.com
> the mail process is hanging there and not moving.
>
> Further research shows that “Lsnrctl” create a new process (like below):
>
> oracle 4475 1 0 17:03:45 ? 0:00
> /u01/app/oracle/product/7.3.4/bin/tnslsnr hrdemo -inherit
> which has “1” as a parent id. This is the actual listener “listening”.
>
> If you kill that process 4475 then mail is released but then you have no
> listener… not good!
> If you stop the listener, the mail process also gets release… More
> elegant (no killing) but still not good.
> Of course if the listener is already started, everything goes fine and
> the mail gets through.
>
> My interpretation: It seems that the mail is waiting for every process
> that was created by the script “START_ORACLE” to be finished. On the
> other hand, Oracle has changed the parent id to “1” but mail is not
> aware of it.
>
> Thanks for your attention
Received on Thu Mar 04 1999 - 12:31:11 CST
![]() |
![]() |