diff --git a/external/__init__.py b/external/__init__.py deleted file mode 100644 index 693737f..0000000 --- a/external/__init__.py +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/python \ No newline at end of file diff --git a/external/amdgpu_stats.py b/external/amdgpu_stats.py deleted file mode 100644 index 7e1406e..0000000 --- a/external/amdgpu_stats.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python - -import re - -def read_watts(num): - - gpu_watts = [] - - for i in range(num): - - file = '/sys/kernel/debug/dri/%s/amdgpu_pm_info' % str(i) - - with open(file, 'r') as data_file: - data=data_file.read() - - try: - match_watts = re.search( r'(.*) W \(average GPU\)', data).group(1) - gpu_watts.append(match_watts.strip()) - - except: - gpu_watts.append('0') - - return gpu_watts \ No newline at end of file diff --git a/main.py b/main.py old mode 100644 new mode 100755 diff --git a/miners/claymores.py b/miners/claymores.py index 3d9af03..e44a4b9 100644 --- a/miners/claymores.py +++ b/miners/claymores.py @@ -5,7 +5,6 @@ import sys from stats import Stats from pprint import pprint -from external import amdgpu_stats class Claymores(object): @@ -72,8 +71,6 @@ def getStats(self): data.hashrates = summary_response[3].split(';'); # ETH hashrates data.dcr_hashrates = summary_response[5].split(';'); # DCR Hashrates - data.power_usage = amdgpu_stats.read_watts(len(data.hashrates)) # Watts used by AMD / WIP - # Temps and fan speeds temp = summary_response[6].split(';') i = 0 @@ -81,10 +78,9 @@ def getStats(self): data.temps.append(temp[i]) data.fan_speeds.append(temp[i + 1]) i += 2 - data.online = self.connected except Exception, e: print("Parsing error: " + str(e)) - return data.toJSON() \ No newline at end of file + return data.toJSON() diff --git a/settings.json b/settings.json index b720c58..cc9a4f5 100644 --- a/settings.json +++ b/settings.json @@ -1,10 +1,10 @@ { "hosts": [{ "host": "localhost", - "port": 3333, + "port": 4068, "name": "rig1", - "type": 0, + "type": 1, "password": null }], "accessToken": "" -} +} \ No newline at end of file