supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: ypserv
@ 2004-07-21 21:39 Tim Philips
  2004-07-21 22:34 ` ypserv Paul Jarc
  2004-07-23 10:44 ` ypserv Gerrit Pape
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Philips @ 2004-07-21 21:39 UTC (permalink / raw)


Hi,

I have had a good look on the http://smarden.org/runit/ site for a run 
script to get ypserv running under (djb) supervise.  I have done many 
google searches and found nothing of interested, we are using an RPM 
installation of ypserv version 2.8-0.72E.  

The man page for ypserv doesn't show it as being able to be run in the
foreground so I used fghack without luck to attempt to run in.

I have also tried many different ways of putting things in the run file
without luck either.

Any ideas?

Cheers.

-- 
Tim Philips

-----------------------------------------------------
iSERVE - You're in Business
www.iserve.co.nz |  info@iserve.co.nz  | 0800 144 737
=====================================================


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ypserv
  2004-07-21 21:39 ypserv Tim Philips
@ 2004-07-21 22:34 ` Paul Jarc
  2004-07-30 23:24   ` ypserv Tim Philips
  2004-07-23 10:44 ` ypserv Gerrit Pape
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Jarc @ 2004-07-21 22:34 UTC (permalink / raw)
  Cc: supervision

Tim Philips <timp@iserve.co.nz> wrote:
> I have also tried many different ways of putting things in the run file
> without luck either.

Extreme overkill, but it should work for anything: run it under a
system call tracer, following forks.  E.g., for Linux:
#!/bin/sh
exec 2>&1
exec strace -f -o /dev/null ypserv ....

There should be a better way, though - have you tried closing stdin
when using fghack, or does ypserv close that too?
exec fghack ypserv ... <&-


paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ypserv
  2004-07-21 21:39 ypserv Tim Philips
  2004-07-21 22:34 ` ypserv Paul Jarc
@ 2004-07-23 10:44 ` Gerrit Pape
  1 sibling, 0 replies; 4+ messages in thread
From: Gerrit Pape @ 2004-07-23 10:44 UTC (permalink / raw)


On Thu, Jul 22, 2004 at 09:39:27AM +1200, Tim Philips wrote:
> I have had a good look on the http://smarden.org/runit/ site for a run 
> script to get ypserv running under (djb) supervise.  I have done many 
> google searches and found nothing of interested, we are using an RPM 
> installation of ypserv version 2.8-0.72E.  
> 
> The man page for ypserv doesn't show it as being able to be run in the
> foreground so I used fghack without luck to attempt to run in.

The ypserv program from ypserv-2.13 provides a -d option to run it in
debug mode, also preventing it from backgrounding.  This is not optimal
as, according to the documentation, lots of debug output will be printed
to standard error.

It may be worth to request a ``run in foreground'' switch independently
from running in debug mode; shouldn't be that hard to implement, look
for debug_flag in ypserv/ypserv.c:main().  It might help to point
upstream to this page

 http://homepages.tesco.net/~J.deBoynePollard/FGA/unix-daemon-design-mistakes-to-avoid.html

Regards, Gerrit.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ypserv
  2004-07-21 22:34 ` ypserv Paul Jarc
@ 2004-07-30 23:24   ` Tim Philips
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Philips @ 2004-07-30 23:24 UTC (permalink / raw)
  Cc: supervision

On Wed, 21 Jul 2004, Paul Jarc wrote:

Hi Paul,

Sorry for the delay in my reply, I attempted to run it closing stdin but 
it didn't work :-(  In the short term as this is quite a heavy used server 
I have written a script which just checks to see if the process is running 
and if not restarts it, seems to be working fine (no idea why its failing, 
doesn't return enough information).

Cheers for your help.

> Tim Philips <timp@iserve.co.nz> wrote:
> > I have also tried many different ways of putting things in the run file
> > without luck either.
> 
> Extreme overkill, but it should work for anything: run it under a
> system call tracer, following forks.  E.g., for Linux:
> #!/bin/sh
> exec 2>&1
> exec strace -f -o /dev/null ypserv ....
> 
> There should be a better way, though - have you tried closing stdin
> when using fghack, or does ypserv close that too?
> exec fghack ypserv ... <&-
> 
> 
> paul
> 

-- 
Tim Philips

-----------------------------------------------------
iSERVE - You're in Business
www.iserve.co.nz |  info@iserve.co.nz  | 0800 144 737
=====================================================


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-30 23:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21 21:39 ypserv Tim Philips
2004-07-21 22:34 ` ypserv Paul Jarc
2004-07-30 23:24   ` ypserv Tim Philips
2004-07-23 10:44 ` ypserv Gerrit Pape

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).