From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2348 Path: news.gmane.org!.POSTED!not-for-mail From: Colin Booth Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6-log run xz compression processor on .u files Date: Fri, 23 Feb 2018 19:50:03 +0000 Message-ID: <20180223195003.2cj2evylcfsnbk2o@cathexis.xen.prgmr.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1519415286 28287 195.159.176.226 (23 Feb 2018 19:48:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2018 19:48:06 +0000 (UTC) User-Agent: NeoMutt/20170113 (1.7.2) To: supervision@list.skarnet.org Original-X-From: supervision-return-1939-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Feb 23 20:48:02 2018 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1epJK5-0006qU-Ks for gcsg-supervision@m.gmane.org; Fri, 23 Feb 2018 20:48:01 +0100 Original-Received: (qmail 9734 invoked by uid 89); 23 Feb 2018 19:50:34 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9727 invoked from network); 23 Feb 2018 19:50:34 -0000 Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2348 Archived-At: 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