Artifact f0e3e0c4ea0b63a4b7f4b649a497548948d72c79:
- File utils/nbfind — part of check-in [4cf18277f3] at 2012-03-20 23:28:57 on branch trunk — Got nbfind working on ubuntu (user: matt, size: 482) [annotate] [blame] [check-ins using]
#!/bin/bash -ex # 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