if you have a pid, then kill -0 $PID will verify that the process is there;
returning 0 on success, 1 on failure.

it doesn't handle pid recycling though


On 24 July 2014 00:07, Sumit Mohanty <[email protected]> wrote:

> status() is checked at certain intervals to check if the daemon started is
> up. The scenario being "slider-agent" is a process that starts your daemon
> - e.g. HBASE_REGIONSERVER. For example, you can use the PID of the daemon
> you started to see if the daemon is still running. So if a daemon goes down
> then the agent can kill itself.
>
> Rather than commenting out status you can have it not return any error in
> which case agent will always think that the daemon is up and running. For
> testing its OK but for production you need to implement status so that
> agent can take corrective actions if the daemon is not up. We are adding
> some library capability that status() can be made to monitor the PID of the
> daemon by default.
>
>
> On Wed, Jul 23, 2014 at 3:40 PM, Rui Zhang <[email protected]> wrote:
>
> > I have checked the agent.log. It is not a failure of Status. It's a
> > failure when start each role. But they actually have started normally
> > without any error.
> >
> >
> >
> > On 07/23/2014 06:13 PM, Rui Zhang wrote:
> >
> >> And actually my application has already been started and runs perfectly.
> >>
> >> On 07/23/2014 06:02 PM, Rui Zhang wrote:
> >>
> >>> Hi,
> >>>
> >>> I have commented out the status code in the python agents. But the
> >>> status action will always lead to a failure after a couple of of IN
> >>> PROGRESS.
> >>>
> >>> What does the status used for? How can I avoid the failure?
> >>>
> >>> Thanks,
> >>>
> >>>
> >>
> > --
> > Rui Zhang
> > Software engineer Intern
> > Vertica, an HP Company
> > [email protected]
> >
> >
>
>
> --
> thanks
> Sumit
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to