supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "Thiyagarajan, Deva" <Deva_Thiyagarajan2@comcast.com>,
	"supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re: Suspend s6-log writing to log file and resume it back after sometime
Date: Tue, 08 Jun 2021 20:02:51 +0000	[thread overview]
Message-ID: <emb7542202-f4e9-480b-8335-5550e72eeb29@elzian> (raw)
In-Reply-To: <SN6PR11MB26213A6FFE34F40F3E7C5A77B7379@sn6pr11mb2621.namprd11.prod.outlook.com>

>Any pointers on how I can go about this? Is there any hack or tricks that could be done in s6-log to achieve this?

  Sorry, but no, nothing comes to mind - s6-log was not designed for 
this.

  I don't think expecting services to keep running while not logging to
disk, whether or not in standby/sleep mode, is reasonable: if logs keep
coming up, memory fills up. What do you do if the machine doesn't wake
up before the memory is full? The logger will die and you will lose all
your carefully accumulated logs.

  Ideally, you would have dynamic verbosity in the service, and switch
it to zero when going into standby/sleep mode, so it would stop
producing logs, so you'd never wake up the disk. Of course, unless it's
the wakeup event listener, the concept of still having a service running
when in standby mode is weird: it defeats the very purpose of standby
mode, which is saving energy. The best way to not have your disk spin is
to have nothing to make it spin in the first place. :P

  s6-svc -p all your services when entering standby mode! (Except the
wakeup event listener.) :D

  Sorry for being unhelpful, and good luck,

--
  Laurent


       reply	other threads:[~2021-06-08 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SN6PR11MB2621A3BF186AFFE07B28F598B7379@sn6pr11mb2621.namprd11.prod.outlook.com>
     [not found] ` <SN6PR11MB26213A6FFE34F40F3E7C5A77B7379@sn6pr11mb2621.namprd11.prod.outlook.com>
2021-06-08 20:02   ` Laurent Bercot [this message]
     [not found] <SN6PR11MB2621A3BF186AFFE07B28F598B7379@SN6PR11MB2621.namprd11.prod.outlook.com>
2021-06-08 16:42 ` Thiyagarajan, Deva

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=emb7542202-f4e9-480b-8335-5550e72eeb29@elzian \
    --to=ska-supervision@skarnet.org \
    --cc=Deva_Thiyagarajan2@comcast.com \
    --cc=supervision@list.skarnet.org \
    --subject='Re: Suspend s6-log writing to log file and resume it back after sometime' \
    /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

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).