Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a2e0b7b296d5c7cc10d5e293b9ee1dd6 > files > 8

mille-xterm-loadbalancer-common-1.0-0.2137.3mdv2010.0.noarch.rpm

<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>