9front - general discussion about 9front
 help / color / mirror / Atom feed
From: "Rodrigo G. López" <rgl@antares-labs.eu>
To: 9front@9front.org
Subject: [9front] Re: [9front] Dealing with log files…
Date: Sun, 17 Oct 2021 12:29:35 +0000	[thread overview]
Message-ID: <D4B65D76-A15B-4D87-AA86-06F0BE9BB295@antares-labs.eu> (raw)
In-Reply-To: <F6799A80ADC1AAA74E9DCEE123080793@9lab.org>

as others mentioned, chmod +t and a cron task with your own rotation would do it. if you want them stored along with the worm, with cwfs dumps usually happen at 5am, so you could compress, move and truncate them, just before this happens, and with whatever resolution you want— daily, weekly, etc.—for the .log.gz files.

i used to do this on an rc-httpd serving machine, but i no longer keep any logs.

something like:
#!/bin/rc

mv /sys/log/^(www www.wip)
>/sys/log/www
chmod +t /sys/log/www
</sys/log/www.wip gzip -9 >/sys/log/archive/www.`{date -n}.gz
rm /sys/log/www.wip


-rodri

On October 16, 2021 8:06:24 PM UTC, igor@9lab.org wrote:
>What is the Plan9 way of dealing with growing log files such as
>/sys/log/www and others?  Is there something similar to multilog¹ or
>logrotate²?
>
>Thanks in advance for any advice.
>
>Cheers,
>Igor
>
>¹…(https://cr.yp.to/daemontools/multilog.html)
>²…(https://github.com/logrotate/logrotate)
>

  parent reply	other threads:[~2021-10-17 12:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16 20:06 igor
2021-10-16 20:52 ` umbraticus
2021-10-16 21:01 ` [9front] " Stanley Lieber
2021-10-17  8:29 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-10-17  9:06   ` umbraticus
2021-10-17 10:30   ` igor
2021-10-17 14:19   ` [9front] " Stanley Lieber
2021-10-17 12:29 ` Rodrigo G. López [this message]
2021-10-17 13:50   ` [9front] " hiro
2021-10-18  7:03     ` rgl
2021-10-18  8:51       ` sirjofri
2021-10-18 18:49         ` Steve Simon
2021-10-18 19:40           ` cinap_lenrek
2021-10-17 18:15 ` smj
2021-10-18  7:35   ` [9front] " Silas McCroskey

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=D4B65D76-A15B-4D87-AA86-06F0BE9BB295@antares-labs.eu \
    --to=rgl@antares-labs.eu \
    --cc=9front@9front.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).