<lbaconfig> <!-- This is a sample configuration file! see doc/configure.txt for more information --> <lbaservice listen="*:8000"/> <specs> <constant name="IP"> <command>hostname -i | tail -1</command> </constant> <constant name="CPU_NUMBER"> <command>cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l</command> </constant> <constant name="CPU_FREQ"> <command>cat /proc/cpuinfo |grep "cpu MHz"|cut -d":" -f2</command> </constant> <constant name="SERVER_CAPACITY"> <eval>($CPU_FREQ*$CPU_NUMBER)/150</eval> </constant> </specs> <status> <variable name="CPULOAD" refresh-delay="60"> <command>cat /proc/loadavg |cut -d" " -f1</command> </variable> <variable name="LOAD" refresh-delay="60"> <eval>int($SERVER_CAPACITY*$CPULOAD)</eval> </variable> </status> </lbaconfig>