Overview
Comment: | Added ability to override max load in nbfind, default is 50% of avail. cpus |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a684b5f022f436b5bb94a27c0728ad5e |
User & Date: | matt on 2012-03-26 21:05:47 |
Other Links: | manifest | tags |
Context
2012-03-27
| ||
18:03 | Added experimental support for #{...} check-in: e6bdd79d6f user: mrwellan tags: trunk | |
2012-03-26
| ||
21:05 | Added ability to override max load in nbfind, default is 50% of avail. cpus check-in: a684b5f022 user: matt tags: trunk | |
20:49 | Removed debug switches from nbfind check-in: ffc00147ea user: matt tags: trunk | |
Changes
Modified utils/nbfind from [7fc27f8b19] to [03c58ee4f1].
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/bash # load=`uptime|awk '{print $10}'|cut -d, -f1` load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'` if which cpucheck > /dev/null;then numcpu=`cpucheck|tail -1|awk '{print $6}'` else numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'` fi lperc=`echo "100 * $load / $numcpu"|bc` | | > > > > | < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/bin/bash # load=`uptime|awk '{print $10}'|cut -d, -f1` load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'` if which cpucheck > /dev/null;then numcpu=`cpucheck|tail -1|awk '{print $6}'` else numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'` fi lperc=`echo "100 * $load / $numcpu"|bc` if [[ "x$MAX_ALLOWED_LOAD" == "x" ]]; then max_load=50 else max_load=$MAX_ALLOWED_LOAD fi if [[ $lperc -lt $max_load ]];then nbfake "$@" else $NBLAUNCHER "$@" fi |