<div dir="ltr">Hi Thomas,<div><br></div><div>Have you seen the following?<br></div><div><br></div><div>- <a href="https://lists.ubuntu.com/archives/upstart-devel/2014-February/003036.html">https://lists.ubuntu.com/archives/upstart-devel/2014-February/003036.html</a></div><div>- <a href="https://github.com/pivotalsoftware/newrelic_pivotal_agent">https://github.com/pivotalsoftware/newrelic_pivotal_agent</a> (includes an example upstart job configuration file)</div><div><br></div><div>It appears that the plugin is forking more than twice which is why you are experiencing the issues. This may be a bug in the plugin, or possibly it is spawning off multiple "worker processes" once it has finished initialising. If the latter, ideally, it would send itself SIGSTOP when ready which would allow the upstart job to specify 'expect stop' (see <a href="http://upstart.ubuntu.com/cookbook/#expect-stop">http://upstart.ubuntu.com/cookbook/#expect-stop</a>).</div><div><br></div><div>Regards,</div><div><br></div><div>James.</div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-04 19:05 GMT+00:00 Thomas Berry <span dir="ltr"><<a href="mailto:thom.berry@gmail.com" target="_blank">thom.berry@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>I am new to upstart and having quite a bit of trouble debugging a script that I am trying to write that will manage Nginx's New Relic Plugin.</div><div><br></div><div>I believe the issue is that Upstart is tracking the wrong PID. When I start the process with `initctl start nginx-nr-agent` the process starts and a PID is assigned - for example 27131.</div><div><br></div><div>Then when I check using ps aux, I see the PID for that process I just started has incremented by 3 - i.e. 27134.</div><div><br></div><div>I have `expect daemon`, but from what I understand expect daemon only works if the process forks twice.</div><div><br></div><div>Any help on this problem would be greatly appreciated.</div><div><br></div><div>Thanks,</div><span class=""><font color="#888888"><div><div><br></div>-- <br><div>Thomas Berry<br>Web: <a href="http://thomasberry.ca" target="_blank">thomasberry.ca</a><br>Twitter: <a href="http://twitter.com/thomasreidberry" target="_blank">twitter.com/thomasreidberry</a><br></div>
</div></font></span></div>
<br>--<br>
upstart-devel mailing list<br>
<a href="mailto:upstart-devel@lists.ubuntu.com">upstart-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br>
<br></blockquote></div><div><pre>Kind regards,
James.
--
James Hunt
____________________________________
#upstart on freenode
<a href="http://upstart.ubuntu.com/cookbook">http://upstart.ubuntu.com/cookbook</a></pre></div>
</div></div>