Post
Topic
Board Mining (Altcoins)
Re: [Minera] Your next mining dashboard is here.
by
michelem
on 18/05/2014, 08:42:33 UTC
http://pastebin.com/dUZ1CXB9

real    0m0.326s
user    0m0.010s
sys     0m0.040s

Please can you pastebin me also the /var/log/minera/log-2014-05-18.php file?

http://pastebin.com/kUdZmeUn

Something else of note, I just had to bounce cpuminer, it stopped sending shares entirely.

Well, if you cannot see the dashboard stats within this config I think the problem could be related on how much time needs Minera to get the whole stats output. Probably it timeouts before getting everything and so you see {"error": true}.

I can say this because trying to inject directly your stats output into Minera works very fine, so the problem should be on getting it from minerd when there are so large output.

But now debugging this it's quite hard for me, you could do this:

* find the file: application/model/util_model.php
* at the beginning of the file you find the "callMinerd" function
* change it with this:

Code:
// Call minerd to get the stats and retry before give up
public function callMinerd($i = 0)
{
if(!($fp = @fsockopen("127.0.0.1", 4028, $errno, $errstr, 3)))
{
return array("error" => true, "msg" => $errstr);
}

stream_set_blocking($fp, false);

$out = json_encode(array("get" => "stats"))."\n";

fwrite($fp, $out);

usleep(250000);

$out = false;

while(!feof($fp))
{
    if(!($str = fread($fp, 4096))) break;
    $out .= $str;
}

fclose($fp);

return json_decode($out);
}

* save the file and retry the dashboard/stats page