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
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
but the following hangs with no output:
tail -c +1 -f build.log.gz | gunzip
On 07.03.23 05:35, Bryan Gardiner wrote:
but the following hangs with no output:
tail -c +1 -f build.log.gz | gunzip
I think you should either use gunzip -f --stdout instead of just
gunzip or use zcat.
Andreas
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?
...
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
Reading the man page, "zless" is just a wrapper around "less".
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 :) )
You could try:
tail -c +1 -f build.log.gz | gunzip | less
I think it should work, but I haven't tried it.
Hi, thanks! --force and --stdout don't seem to help in this case.
You could try gztool
https://github.com/circulosmeos/gztool/
"gztool -T" should work like "tail -f".
Fetching a Debian compiled version and running deb2targz on it ends up with a
.so file, which where to put?
On Thursday, 9 March 2023 14:31:32 GMT Andreas Stiasny wrote:
You could try gztoolThat looks very handy. But:
https://github.com/circulosmeos/gztool/
"gztool -T" should work like "tail -f".
Compiling it from the github source fails because I haven't found all the prerequisites.
Fetching a Debian compiled version and running deb2targz on it ends up with a .so file, which where to put?
I haven't found it in any Gentoo overlays.
How can I get hold of a version for Gentoo?
Peter Humphrey wrote:
On Thursday, 9 March 2023 14:31:32 GMT Andreas Stiasny wrote:
You could try gztool
https://github.com/circulosmeos/gztool/
"gztool -T" should work like "tail -f".
That looks very handy. But:
Compiling it from the github source fails because I haven't found all the prerequisites.
Fetching a Debian compiled version and running deb2targz on it ends up
with a .so file, which where to put?
I haven't found it in any Gentoo overlays.
How can I get hold of a version for Gentoo?
I found it in a overlay. At least google and github page says it is
there.
https://github.com/gentoo-mirror/slonko
It appears to be called gztool.
Hope that helps.
Peter Humphrey wrote:
On Thursday, 9 March 2023 14:31:32 GMT Andreas Stiasny wrote:
You could try gztoolThat looks very handy. But:
https://github.com/circulosmeos/gztool/
"gztool -T" should work like "tail -f".
Compiling it from the github source fails because I haven't found
all the prerequisites.
Fetching a Debian compiled version and running deb2targz on it ends
up with a .so file, which where to put?
I haven't found it in any Gentoo overlays.
How can I get hold of a version for Gentoo?
I found it in a overlay. At least google and github page says it is there.
https://github.com/gentoo-mirror/slonko
It appears to be called gztool.
Hope that helps.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 302 |
Nodes: | 16 (2 / 14) |
Uptime: | 99:38:45 |
Calls: | 6,767 |
Calls today: | 5 |
Files: | 12,295 |
Messages: | 5,376,413 |
Posted today: | 1 |