View previous topic :: View next topic |
Author |
Message |
Circuitsoft Tux's lil' helper
Joined: 14 Jul 2004 Posts: 112
|
Posted: Thu Feb 16, 2012 11:51 am Post subject: Watch what emerge -j is doing |
|
|
I like to watch portage from time to time, and wish emerge -j<number> had more detailed output. The following script, in another terminal, gives me just that.
Code: | #!/bin/bash
cd /vat/tmp/portage
trap 'kill $(pgrep -P $LOGVIEW) $LOGVIEW;exit' SIGINT
while true
do
CURRENT_LOG=$(ls -dut */* | head -1 | sed 's/^.*\t//')/temp/build.log
# Set xterm title
echo -ne "\033]0;$CURRENT_LOG\007"
(for try in $(seq 10)
do
tail -f $CURRENT_LOG
sleep 1
done) & LOGVIEW="$!"
while [[ "$CURRENT_LOG" = "$(du -sk */* | sort -n | tail -1 | sed 's/^.*\t//')/temp/build.log" ]]
do
sleep 1
done
kill $(pgrep -P $LOGVIEW) $LOGVIEW
done
|
|
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 723 Location: /home
|
Posted: Wed Feb 29, 2012 10:02 pm Post subject: |
|
|
Hehe indeed it's very relaxing. Cheers for this one, went immediately into use.
Just one thing: In your script, it says cd /vat/tmp/portage |
|
Back to top |
|
|
kofrad n00b
Joined: 26 Oct 2004 Posts: 38 Location: South Florida
|
Posted: Sat Mar 03, 2012 10:40 pm Post subject: |
|
|
Glad to see this script. I had almost considered disabling multiple jobs on my system just so I could watch emerge progress.. On the other hand I like the cleanliness out the output when it is enabled.
The script seems to work well, but I'm getting a constant error as it runs.
Code: |
/usr/local/bin/watch_emerge: line 16: 22743 Terminated ( for try in $(seq 10);
do
tail -f $CURRENT_LOG; sleep 1;
done )
|
That seems to come up every 10 or so lines and results in a constant barrage of output from emerge repeating itself as new lines are printed. |
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 723 Location: /home
|
Posted: Sat Mar 31, 2012 11:15 am Post subject: |
|
|
Although, --quiet-build n should work now. |
|
Back to top |
|
|
|