Post
Topic
Board Майнеры
Re: Удаленный мониторринг нескольких ферм в l
by
mins777
on 15/01/2014, 14:57:30 UTC
чем копаться в miner.php мудифицировал под себя штатный api-example.php

1) закоментил строку: #print "$cmd returned '$line'\n"; в function request($cmd,$addr)
2) в конец после функций переписал/добавил код:
Code:
$addrs = array('192.168.0.201', '192.168.0.202', '192.168.0.203', '192.168.0.204', '192.168.0.205');
$text = "";
$text .= "\n";
$text .= "\n";
$text .= "\n";
$text .= "\n";
$text .= "\n";
$text .= "\n";
$text .= "\n";
for($i=0; $i{
$gpus = request('gpucount',$addrs[$i]);
$text .= "\n";
$igpu=0;
for($ii=0; $ii<$gpus['GPUS']['Count']; $ii++)
{
$ia=0;
$r = request("gpu|$ii",$addrs[$i]);
$textKey = "\n";
$textValue = "\n";
foreach($r["GPU$ii"] as $key => $value)
{
if($ia>17) break;
$textKey .= "\n";
$textValue .= "\n";
$ia++;
}
$textKey .= "\n";
$textValue .= "\n";
if($igpu==0) { $text .= $textKey; $igpu++; }
$text .= $textValue;
}
}
$text .= "
{$gpus['STATUS']['Description']} / ip:{$addrs[$i]} / GPUS:{$gpus['GPUS']['Count']}
{$key}{$value}
\n";
$text .= "\n";
$text .= "\n";
print $text;
- мне хватает. для себя можете лучше сделать.