supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* s6-log run xz compression processor on .u files
@ 2018-02-23 16:40 Brad Grissom
  2018-02-23 19:50 ` Colin Booth
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Grissom @ 2018-02-23 16:40 UTC (permalink / raw)
  To: supervision

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

Hi I'd like to re-run my xz compression processor on .u files, maybe during
the next rotation.  My problem is that I'm running an embedded Linux system
and it gets unplugged all the time, so I end up with .u log files that are
uncompressed by the s6-log processor.

I am using this to log:

s6-log -b n30 s5242880 S15728640 !xz /appdata

This is an issue because I have limited flash storage space and would love
to be able to store as many (compressed) logs as possible.  I figure I must
be missing something because this is probably a common occurrence for many
people.

If anybody has any ideas, I would love to hear it! Thanks!

~~Brad Grissom

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

* Re: s6-log run xz compression processor on .u files
  2018-02-23 16:40 s6-log run xz compression processor on .u files Brad Grissom
@ 2018-02-23 19:50 ` Colin Booth
  0 siblings, 0 replies; 2+ messages in thread
From: Colin Booth @ 2018-02-23 19:50 UTC (permalink / raw)
  To: supervision

On Fri, Feb 23, 2018 at 09:40:37AM -0700, Brad Grissom wrote:
> Hi I'd like to re-run my xz compression processor on .u files, maybe during
> the next rotation.  My problem is that I'm running an embedded Linux system
> and it gets unplugged all the time, so I end up with .u log files that are
> uncompressed by the s6-log processor.
> 
> I am using this to log:
> 
> s6-log -b n30 s5242880 S15728640 !xz /appdata
> 
> This is an issue because I have limited flash storage space and would love
> to be able to store as many (compressed) logs as possible.  I figure I must
> be missing something because this is probably a common occurrence for many
> people.
> 
> If anybody has any ideas, I would love to hear it! Thanks!
Lots of ways to fix this. If you have a cron-alike, an @reboot trigger
can do it:
@reboot sleep SOMEPERIOD find /path/to/dirs -name '*.u' -exec xz "{}" \;

If you don't mind polling, something similar but as an s6 service works,
though you can use s6-pause from s6-portable-utils to stop it from
refiring (and as such no longer polling). If you don't have that, a
finish script that puts the service down works, but that's kinda ugly.
> 
> ~~Brad Grissom

Cheers!
-- 
Colin Booth


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

end of thread, other threads:[~2018-02-23 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 16:40 s6-log run xz compression processor on .u files Brad Grissom
2018-02-23 19:50 ` Colin Booth

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