Artifact 7fc27f8b199d70d045cb80d75c810cc07e756c08:
- File utils/nbfind — part of check-in [ffc00147ea] at 2012-03-26 20:49:44 on branch trunk — Removed debug switches from nbfind (user: matt, size: 479) [annotate] [blame] [check-ins using]
#!/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 [[ $lperc -lt 100 ]];then # echo "Load percent: $lperc < 100, using nbfake" nbfake "$@" # $(*) else # echo "Load percent: $lperc > 100, using NBLAUNCHER" $NBLAUNCHER "$@" fi