supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Suspend s6-log writing to log file and resume it back after sometime
       [not found] <SN6PR11MB2621A3BF186AFFE07B28F598B7379@SN6PR11MB2621.namprd11.prod.outlook.com>
@ 2021-06-08 16:42 ` Thiyagarajan, Deva
  0 siblings, 0 replies; 2+ messages in thread
From: Thiyagarajan, Deva @ 2021-06-08 16:42 UTC (permalink / raw)
  To: supervision

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

Hello,



I am running s6 on an embedded platform and use s6-log for logging processes’ output to hard disk.


I have a requirement where I need to pause logging to hard disk when the device is put to standby/sleep mode (basically to reduce hard disk usage and spin it down) and once the device is back UP from sleep, I want the logging to resume since the point it paused.

Basically during the sleep, s6-log should just hold the logs in memory and when device is UP it should start dumping the logs as usual.



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?



Thanks in advance


--

Deva

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suspend s6-log writing to log file and resume it back after sometime
       [not found] ` <SN6PR11MB26213A6FFE34F40F3E7C5A77B7379@sn6pr11mb2621.namprd11.prod.outlook.com>
@ 2021-06-08 20:02   ` Laurent Bercot
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Bercot @ 2021-06-08 20:02 UTC (permalink / raw)
  To: Thiyagarajan, Deva, supervision

>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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-08 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <SN6PR11MB2621A3BF186AFFE07B28F598B7379@SN6PR11MB2621.namprd11.prod.outlook.com>
2021-06-08 16:42 ` Suspend s6-log writing to log file and resume it back after sometime Thiyagarajan, Deva
     [not found] <SN6PR11MB2621A3BF186AFFE07B28F598B7379@sn6pr11mb2621.namprd11.prod.outlook.com>
     [not found] ` <SN6PR11MB26213A6FFE34F40F3E7C5A77B7379@sn6pr11mb2621.namprd11.prod.outlook.com>
2021-06-08 20:02   ` Laurent Bercot

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/supervision

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 supervision supervision/ https://inbox.vuxu.org/supervision \
		subscribe@list.skarnet.org
	public-inbox-index supervision

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git