From: Raymond Barlow <rbarlow@raymanoz.com>
To: Jameson Graef Rollins <jrollins@finestructure.net>
Cc: supervision <supervision@list.skarnet.org>
Subject: Re: runit logging questions
Date: Wed, 1 May 2013 13:41:32 +0100 [thread overview]
Message-ID: <CAJz2U6aLfpLRQa37WKEzMzLkgjAR8omZO0O9P5VVLRAHFGKV4A@mail.gmail.com> (raw)
In-Reply-To: <87vc73g22v.fsf@servo.finestructure.net>
[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]
Hi guys,
Thanks both of you for your help. I finally found out what the root cause
of problems was.
I did this in this order:
1. Created the service directory
2. Symlink it to tell runit about the new service
3. Created the log directory
At this point, no matter how many times I started/stopped the service,
logging was not kicking in.
I needed to remove the symlink created in (2), and recreate it. Then, hey
presto, it was all working beautifully!
FWIW--I didn't understand the key concept that runit was monitoring the
service directory and looking for new symlinks to be created.
Also, as a side note, in the FAQ for logging, it seems that the service
that is being started is another logging tool (socklog-klog). This in
itself was confusing for me, as it wasn't clear if this logging was part of
the runit logging, or if it was just the service. So I guess what I'm
saying here is maybe the documentation should be changed to log a different
kind of process so it is clear what part of the script is required for
logging and what is just other stuff.
Cheers,
Raymond
On 30 April 2013 22:07, Jameson Graef Rollins <jrollins@finestructure.net>wrote:
> On Tue, Apr 30 2013, Raymond Barlow <rbarlow@raymanoz.com> wrote:
> > Logging:
> >
> > * Do you need to create 2 run scripts (/etc/sv/myservice/run,
> > /etc/sv/myservice/log/run)? Or does the log/run supersede the
> myservice/run
> > script?
>
> The run and log/run scripts are completely distinct. The run script is
> for exec'ing the actual supervised process, and the log/run script is
> for exec'ing the corresponding svlogd process.
>
> > * The directory specified in the log run script to svlogd (eg
> ./main)--does
> > this live in the log directory?
>
> Yes: log/main/
>
> > * Do I need to create the log directory or does the svlogd directory do
> > that for me
>
> Usually the log/run script creates it if it doesn't exist.
>
> Pretty much all of my services use this same log/run script:
>
> #!/bin/sh
> set -e
> LOG=$(readlink -f ./main)
> test -d "$LOG" || mkdir -p -m0750 "$LOG"
> exec svlogd -tt "$LOG"
>
> jamie.
>
next prev parent reply other threads:[~2013-05-01 12:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 19:43 Raymond Barlow
2013-04-30 21:01 ` Alex Efros
2013-04-30 21:07 ` Jameson Graef Rollins
2013-05-01 12:41 ` Raymond Barlow [this message]
2013-05-01 13:08 ` Alex Efros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJz2U6aLfpLRQa37WKEzMzLkgjAR8omZO0O9P5VVLRAHFGKV4A@mail.gmail.com \
--to=rbarlow@raymanoz.com \
--cc=jrollins@finestructure.net \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).