9front - general discussion about 9front
 help / color / mirror / Atom feed
From: rgl@antares-labs.eu
To: 9front@9front.org
Subject: Re: [9front] Re: [9front] Re: [9front] Dealing with log files…
Date: Mon, 18 Oct 2021 09:03:08 +0200	[thread overview]
Message-ID: <28C9A8BDB0039016DE60A0FCC1FCBFAF@antares-labs.eu> (raw)
In-Reply-To: <CAFSF3XNoPn9hsYPiGBJxO38JbCkvzg3dDS9dAY2ScUjM=CZSjg@mail.gmail.com>

>what happens to a process that is still having file A open and is
>gonna write() again to it after you renamed A into B?

that's a good question to keep in mind if you have heavy logging services.
the process will keep growing the file, unless you chmod +l it. but then
you'll lose information.

i guess you'll need to restart the service, or force it to reopen the old
path through some note, although that will require patching.

at work we used to have a mysqld with this problem. somebody enabled the
debugging flag and it started throwing logs at a 40GB/day rate or so.
at first we restarted the service during midnight, or rather, stopped it,
truncated the file, then started it back up. in the end we decided it
wasn't worth it since nobody was looking at the logs anyway, so we just
disabled the debugging output.

if you know of a better procedure on plan 9 to handle such a sceneario,
i'd like to learn about it.


-rodri


  reply	other threads:[~2021-10-18  8:04 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
2021-10-17 13:50   ` [9front] " hiro
2021-10-18  7:03     ` rgl [this message]
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=28C9A8BDB0039016DE60A0FCC1FCBFAF@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).