miner.php add a sample group pool report
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
diff --git a/miner.php b/miner.php
index b8bf247..8c393ac 100644
--- a/miner.php
+++ b/miner.php
@@ -103,9 +103,42 @@ $statssum = array(
'Rejected', 'Utility', 'Hardware Errors',
'Work Utility'));
#
+$poolspage = array(
+ 'DATE' => null,
+ 'RIGS' => null,
+ 'SUMMARY' => array('Elapsed', 'MHS av', 'Found Blocks=Blks', 'Accepted', 'Rejected=Rej',
+ 'Utility', 'Hardware Errors=HW Errs', 'Network Blocks=Net Blks',
+ 'Work Utility'),
+ 'POOL+STATS' => array('STATS.ID=ID', 'POOL.URL=URL', 'POOL.Difficulty Accepted=Diff Acc',
+ 'POOL.Difficulty Rejected=Diff Rej',
+ 'POOL.Has Stratum=Stratum', 'POOL.Stratum Active=StrAct',
+ 'POOL.Has GBT=GBT', 'STATS.Times Sent=TSent',
+ 'STATS.Bytes Sent=BSent', 'STATS.Times Recv=TRecv',
+ 'STATS.Bytes Recv=BRecv'));
+#
+$poolssum = array(
+ 'SUMMARY' => array('MHS av', 'Found Blocks', 'Accepted',
+ 'Rejected', 'Utility', 'Hardware Errors',
+ 'Work Utility'),
+ 'POOL+STATS' => array('POOL.Difficulty Accepted', 'POOL.Difficulty Rejected',
+ 'STATS.Times Sent', 'STATS.Bytes Sent',
+ 'STATS.Times Recv', 'STATS.Bytes Recv'));
+#
+$poolsext = array(
+ 'POOL+STATS' => array(
+ 'where' => null,
+ 'group' => array('POOL.URL', 'POOL.Has Stratum', 'POOL.Stratum Active', 'POOL.Has GBT'),
+ 'calc' => array('POOL.Difficulty Accepted' => 'sum', 'POOL.Difficulty Rejected' => 'sum',
+ 'STATS.Times Sent' => 'sum', 'STATS.Bytes Sent' => 'sum',
+ 'STATS.Times Recv' => 'sum', 'STATS.Bytes Recv' => 'sum'),
+ 'having' => array(array('STATS.Bytes Recv', '>', 0)))
+);
+
+#
# customsummarypages is an array of these Custom Summary Pages
$customsummarypages = array('Mobile' => array($mobilepage, $mobilesum),
- 'Stats' => array($statspage, $statssum));
+ 'Stats' => array($statspage, $statssum),
+ 'Pools' => array($poolspage, $poolssum, $poolsext));
#
$here = $_SERVER['PHP_SELF'];
#
@@ -604,6 +637,7 @@ function fmt($section, $name, $value, $when, $alldata)
}
break;
case 'SUMMARY.Elapsed':
+ case 'STATS.Elapsed':
$s = $value % 60;
$value -= $s;
$value /= 60;
@@ -804,6 +838,14 @@ function fmt($section, $name, $value, $when, $alldata)
case 'GPU.Diff1 Work':
case 'PGA.Diff1 Work':
case 'total.Diff1 Work':
+ case 'STATS.Times Sent':
+ case 'STATS.Bytes Sent':
+ case 'STATS.Times Recv':
+ case 'STATS.Bytes Recv':
+ case 'total.Times Sent':
+ case 'total.Bytes Sent':
+ case 'total.Times Recv':
+ case 'total.Bytes Recv':
$parts = explode('.', $value, 2);
if (count($parts) == 1)
$dec = '';