supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au>
To: supervision@list.skarnet.org
Subject: Managing difficult log files
Date: Fri, 17 May 2019 11:03:32 +1000	[thread overview]
Message-ID: <2dd0d673-dfbd-f9ff-f5d9-9d2bc4b27464@heuristicsystems.com.au> (raw)

I would appreciate advise as to whether these are acceptable questions
for this list?

I would like to use the s6-log features for applications that have
difficult log management.  In this instance, apache. From
procstat –f `pgrep httpd`
we're advised that each http has write-append to the ErrorLog, and if we
use s6-log then we have locking problems.

So an intermediate reader appears to be a sound workaround.  Does anyone
have a better solution than

ErrorLog “|'execlineb –Pc fdmove 1 0 s6-fdholder-retrieve
/s/live/servicedirs/s6rc-fdholder/s ‘pipe:s6rc-w-final-logger’ fdswap 0
1 sh -c "read X; echo ${X}"

Please note the above is for testing, as this will be moved into a
script where logs are scanned for anomalies.

Previously I tried:
ErrorLog "|/usr/local/bin/s6-log -b n32 s10000 S7000000 T !'/usr/bin/xz
-7q' /var/log/httpd-error"

I'm looking at using a similar approach to samba and others as I dig
into this.

Kind regards, Dewayne
PS Please be tolerant as manipulating descriptors is very new to me, but
a lot of people struggle with managing apache logs and this would be a
nice-to-have use of s6-log.  (Even if the users demand daily logs via
cron & 59 23 * * *  s6-svscan -a apache24-log ;) ).  Now to samba...


             reply	other threads:[~2019-05-17  1:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17  1:03 Dewayne Geraghty [this message]
2019-05-17  9:08 ` Laurent Bercot

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=2dd0d673-dfbd-f9ff-f5d9-9d2bc4b27464@heuristicsystems.com.au \
    --to=dewayne.geraghty@heuristicsystems.com.au \
    --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).