-
Notifications
You must be signed in to change notification settings - Fork 0
/
valkyrie.mako
145 lines (127 loc) · 3.63 KB
/
valkyrie.mako
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html>
<head>
<title>Valkyrie</title>
<meta http-equiv="refresh" content="300" />
</head>
<body>
<h1>Farm Status</h1>
<%
import datetime
displaytime = datetime.datetime.strptime(utctime, '%Y-%m-%d %H:%M:%S.%f').strftime('%H:%M UTC on %b %d')
%>
<h2>Overall Status at ${displaytime}</h2>
<p>
Hashrate: ${total_hashrate} <br/>
Active Miners: ${total_miners} <br/>
Active GPUs: ${total_gpus} <br/>
Temperature: ${temperature}
</p>
<h2>Devices</h2>
<table border="1">
<tr>
<th>Miner</th>
<th>Device</th>
<th>Status</th>
<th>Hashrate (KH/s)</th>
<th>Temperature</th>
<th>Fan %</th>
<th>Intensity</th>
<th>GPU Act.</th>
<th>GPU Clock</th>
<th>Mem Clock</th>
<th>Powertune</th>
<th>GPU Volt.</th>
<th>HW Errors</th>
<th>Rej %</th>
</tr>
% for minername in miners:
%for dev in miners[minername]['devs']:
<% dev_hashrate = dev['MHS 5s'] * 1000 %>
<tr>
<td>${minername}</td>
<td>Dev ${dev['GPU']}</td>
<td>${dev['Status']}</td>
<td>${dev_hashrate}</td>
<td>${dev['Temperature']}</td>
<td>${dev['Fan Percent']}</td>
<td>${dev['Intensity']}</td>
<td>${dev['GPU Activity']}</td>
<td>${dev['GPU Clock']}</td>
<td>${dev['Memory Clock']}</td>
<td>${dev['Powertune']}</td>
<td>${dev['GPU Voltage']}</td>
<td>${dev['Hardware Errors']}</td>
<td>${dev['Device Rejected%']}</td>
</tr>
%endfor
% endfor
</table>
<h2>Miners</h2>
<table border="1">
<tr>
<th>Miner</th>
<th>Hashrate</th>
<th>Avg. Hashrate</th>
<th>Accepted</th>
<th>Rejected %</th>
</tr>
% for minername in miners:
<% summary = miners[minername]['summary'] %>
<tr>
<td>${minername}</td>
<td>${summary['MHS 5s']}</td>
<td>${summary['MHS av']}</td>
<td>${summary['Accepted']}</td>
<td>${summary['Device Rejected%']}</td>
</tr>
% endfor
</table>
<h2>Pools</h2>
<table border="1">
<tr>
<th>Miner</th>
<th>URL</th>
<th>User</th>
<th>Active</th>
<th>Status</th>
<th>Priority</th>
<th>Accepted</th>
<th>Rej %</th>
</tr>
% for minername in miners:
%for pool in miners[minername]['pools']:
<tr>
<td>${minername}</td>
<td>${pool['URL']}</td>
<td>${pool['User']}</td>
<td>${pool['Stratum Active']}</td>
<td>${pool['Status']}</td>
<td>${pool['Priority']}</td>
<td>${pool['Accepted']}</td>
<td>${pool['Pool Rejected%']}</td>
</tr>
%endfor
% endfor
</table>
<h2>Configurations</h2>
<table border="1">
<tr>
<th>Miner</th>
<th>OS</th>
<th>GPUs</th>
<th>Strategy</th>
</tr>
% for minername in miners:
%for config in miners[minername]['config']:
<tr>
<td>${minername}</td>
<td>${config['OS']}</td>
<td>${config['GPU Count']}</td>
<td>${config['Strategy']}</td>
</tr>
%endfor
% endfor
</table>
<p>This page refreshes every five minutes.</p>
</body>
</html>