From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Tailing compressed build logs
Date: Tue, 07 Mar 2023 09:01:34 +0000 [thread overview]
Message-ID: <12165531.O9o76ZdvQC@lenovo.localdomain> (raw)
In-Reply-To: <CAG1=SYRdYLYpFCxVpJnchhP7tB2iUo0YyouPohggTgbxyujUQQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
On Tuesday, 7 March 2023 07:52:01 GMT Mickaël Bucas wrote:
> Le mar. 7 mars 2023 à 05:36, Bryan Gardiner <bog@khumba.net> a écrit :
> > Hi folks,
> >
> > How can I follow Portage's compressed build logs in real time as they
> > are generated?
> >
> > I keep build logs and use FEATURES=compress-build-logs so that they
> > don't get too large. I can peek at how a build is going with zless on
> > build.log.gz, which doesn't update (understandably), but I would
> > really like to be able to watch a log with some "tail -f" equivalent.
> > I get streaming output with
> >
> > tail -c +1 -f build.log.gz | od -t x1
> >
> > but the following hangs with no output:
> > tail -c +1 -f build.log.gz | gunzip
> >
> > even with a build log that is 72KB compressed (2.4MB uncompressed),
> > which should be larger than any pipe buffers... Any idea why gunzip
> > can't handle this, or what I should I should be doing instead?
> >
> > Thanks,
> > Bryan
>
> Hi
>
> Reading the man page, "zless" is just a wrapper around "less".
> You can check with:
> $ file $(which zless)
> /usr/bin/zless: POSIX shell script, ASCII text executable
> $ less $(which zless)
>
> So it should support the same options including typing "F" at the end
> of a file to keep trying to read when the end of file is reached.
>
> I made a small test, but it didn't work:
> # Create a growing file
> $ yes | nl | gzip > zless-test.gz &
> # Try to follow at the end
> $ zless zless-test.gz
>
> With ">" to go to the end and "F" to continue, I didn't get the
> expected behavior, it stood still at the point I was viewing.
> I don't know if it's really a bug or if I made a mistake...
> (Don't forget to stop the growing file :) )
>
> Best regards
>
> Mickaël Bucas
You could try:
tail -c +1 -f build.log.gz | gunzip | less
I think it should work, but I haven't tried it.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-03-07 9:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 4:35 [gentoo-user] Tailing compressed build logs Bryan Gardiner
2023-03-07 7:52 ` Mickaël Bucas
2023-03-07 9:01 ` Michael [this message]
2023-03-09 7:43 ` Bryan Gardiner
2023-03-08 13:13 ` Andreas Stiasny
2023-03-09 7:46 ` Bryan Gardiner
2023-03-09 14:31 ` Andreas Stiasny
2023-03-09 15:49 ` Peter Humphrey
2023-03-09 15:57 ` Matt Connell
2023-03-09 16:01 ` Dale
2023-03-09 17:07 ` Peter Humphrey
2023-03-10 4:13 ` Bryan Gardiner
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=12165531.O9o76ZdvQC@lenovo.localdomain \
--to=confabulate@kintzios.com \
--cc=gentoo-user@lists.gentoo.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