On Monday, 24 July 2023 16:39:19 BST Peter Humphrey wrote:
> On Monday, 24 July 2023 15:46:07 BST Jack wrote:
> > Pure guess, but the & may be getting attached to something less than the
> > entire command on that line.  Try enclosing the command (but not the &)
> > in something.  I leave it as an exercise to determine whether () or {}
> > or some other closure is the right one.
> 
> Actually, the useless cat seems to have been the problem. This is running
> now:
> 
> # cat /usr/local/bin/emerj
> #!/bin/bash
> #
> # Run emerge while logging the load average every 10 seconds.
> #
> merging=true
> echo "" > /var/log/local0.log
> while [ $merging ] ; do ( logger -p local0.info < /proc/loadavg; sleep 10 )
> done &
> /usr/bin/emerge "$@"; merging=false
> 
> I had 'tail -f /var/log/local0.log' running in another Konsole; it showed:
> 
> Jul 24 16:28:20 wstn root[13710]: 11.94 18.43 19.70 3/1419 13710
> Jul 24 16:28:30 wstn root[13740]: 10.26 17.85 19.50 2/1421 13740
> Jul 24 16:28:40 wstn root[13762]: 8.75 17.28 19.29 1/1423 13762
> Jul 24 16:28:50 wstn root[17142]: 7.65 16.76 19.10 2/1424 17142
> Jul 24 16:29:00 wstn root[20037]: 6.54 16.23 18.90 2/1428 20037
> Jul 24 16:29:10 wstn root[25726]: 5.77 15.74 18.71 2/1430 25726
> Jul 24 16:29:20 wstn root[2504]: 5.41 15.34 18.55 2/1427 2504
> ...
> 
> The last job is to parse local0.log to extract the values I want and plot
> them. LibreOffice Calc might do for that.

Just to round off, I think I've found a good compromise between making the most 
of the available computing power on the one hand, and jeopardising memory 
limits on the other.

Today's update included 76 kde-frameworks packages, and the system load didn't 
exceed 29. This should be safe with 64GB RAM.

$ grep '\-j' /etc/portage/make.conf
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=32 --autounmask=n --keep-going  
--nospinner"
MAKEOPTS="-j12"

The small --jobs value slows the emerging of small jobs, but in at least one 
case those can only be run a few at a time anyway; that's in the early part of 
an emerge -e @world.

So, I now have the instrumentation I needed.

> Thanks to all for the help.

-- 
Regards,
Peter.




Reply via email to