blob: ac59ad022906c33a799c3b747b7979329470715a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
//$cmd="/usr/bin/dot -Tpng -o $figfile $grfilenametemp";
//system($cmd);
$cmd="top -b -n 2 -u apache|grep ^Cpu|cut -d',' -f1|cut -d':' -f2|cut -d'%' -f1>datafile";
system($cmd);
$cpu=file_get_contents("datafile");
$str_arrmat=array();
$str_arrmat=explode("\n",$cpu);
if($str_arrmat[1]>70.0)
{
?>
<script>
window.open("http://bnw.genenetwork.org",'_self',false);
</script>
<?php
}
else
{
?>
<script>
window.open("http://bnw.genenetwork.org",'_self',false);
</script>
<?php
}
?>
|