#!/usr/bin/perl

use strict;
use IO::Handle;

my $MirrorFile	= "/server/wwwroot/load.txt";

open(RH,"/proc/loadavg");
	my $load = <RH>;
close RH;

my (@MyLoad) = split(' ', $load);

open(WH,">$MirrorFile") or die;
	flock(WH,2);
	WH->autoflush(1);
	print WH "@MyLoad[0]";
close WH;

print "################ load ################ \n";
print "[@MyLoad[0]] \n";
print "###############################\n";

exit(0);
