heaje / hiveos-exporter Goto Github PK
View Code? Open in Web Editor NEWHiveOS Prometheus Exporter
HiveOS Prometheus Exporter
Thank you for this work, I think you should post on the read me your ethereum or bitcoin wallet address for donations. I would definitely like to thank you for the work you have done here.
Everything works great with the exporter, except I found 1 corner case. On a mining rig that has some gpu's, like AMD, and one of those USB FPGA cards ( the C1100) the initialization gets all messed up. Because there is no entry for the FPGA in /run/hive/gpu-detect.json, but there is a miner entry for it ( teamredminer)
I've put some debug in and some try except blocks, but not sure how to work around this.
in Class Miner:
log.debug(' return is: %s ',self.stats['bus_numbers'][0])
will say 0. not None, maybe because it's initialized based on the AMD cards that are already there...
2022-07-13 10:06:01,995 - DEBUG - Reading HiveOS configuration from /hive-config/rig.conf
2022-07-13 10:06:01,996 - INFO - Starting HTTP server on port 10101
2022-07-13 10:06:01,998 - DEBUG - Reading GPU details from /run/hive/gpu-detect.json
2022-07-13 10:06:01,998 - DEBUG - setting up GPU {'busid': '03:00.0', 'name': 'Radeon RX 6600 XT', 'brand': 'amd', 'subvendor': 'XFX', 'vbios': '113-123XT145W201222', 'mem': '8176 MB', 'mem_type': 'Samsung GDDR6'}
2022-07-13 10:06:01,998 - DEBUG - setting up GPU {'busid': '07:00.0', 'name': 'Radeon RX 6600 XT', 'brand': 'amd', 'subvendor': 'ASUS', 'vbios': '115-D532BP0-100', 'mem': '8176 MB', 'mem_type': 'Samsung GDDR6'}
2022-07-13 10:06:01,999 - DEBUG - setting up GPU {'busid': '0a:00.0', 'name': 'Radeon RX 6600 XT', 'brand': 'amd', 'subvendor': 'PowerColor', 'vbios': '113-D532XT-D05', 'mem': '8176 MB', 'mem_type': 'Samsung GDDR6'}
2022-07-13 10:06:01,999 - DEBUG - setting up GPU {'busid': '0d:00.0', 'name': 'Radeon RX 6800', 'brand': 'amd', 'subvendor': 'PowerColor', 'vbios': '111', 'mem': '16368 MB', 'mem_type': 'Samsung GDDR6'}
2022-07-13 10:06:01,999 - DEBUG - Reading statistics from /run/hive/last_stat.json
2022-07-13 10:06:01,999 - DEBUG - Adding Miner - teamredminer
2022-07-13 10:06:01,999 - DEBUG - self stats : name is: teamredminer
2022-07-13 10:06:01,999 - DEBUG - stats {}
2022-07-13 10:06:01,999 - DEBUG - return is: 0
2022-07-13 10:06:01,999 - DEBUG - Miner is a gpu miner:
Traceback (most recent call last):
File "hiveos-exporter.py", line 193, in main
cur_gpu = gpu_by_bus_num[bus_number]
KeyError: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hiveos-exporter.py", line 232, in <module>
main()
File "hiveos-exporter.py", line 198, in main
print(exception)
NameError: name 'exception' is not defined
I think the call to Miner.is_gpu_miner (), might have to change, but I'm not sure how... maybe do a cross reference of the busid ...
Not sure how i would fix this. - any suggestions?
json_files.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.