Author

Topic: Monitor your mining with Cacti! (Read 4671 times)

hero member
Activity: 531
Merit: 505
May 19, 2011, 04:12:31 AM
#8
I've attached a single Graph Template exported from my Cacti. Please note that I never exported nor imported templates, so I cannot guarrantie it will work from scratch. Remember to place your deepbit_hashrate.php into cacti/scripts/ folder of your Cacti installation.

EDIT: can't attach here, reports full upload dir. So, use this link instead: http://www.2shared.com/file/N8ZQ3RN9/cacti_graph_template_deepbit_m.html
hero member
Activity: 560
Merit: 517
May 18, 2011, 07:03:04 PM
#7
Thank you for sharing this! I'm gonna poke at it later today and see if I can get it working  Cool Just got my little multitail setup working last night, so this will be another nice improvement.
legendary
Activity: 800
Merit: 1001
May 18, 2011, 06:09:31 PM
#6
Use this link: http://docs.cacti.net/manual:088:3a_advanced_topics.1_data_input_methods#data_input_methods
from Cacti documentation to help you to do this:

1. Place the above mentioned script into cacti installation scripts folder .. name it deepbit_hashrate.php, test it if it dumps the rate
2. Create Data Input Method attached to this script (input this: /usr/bin/php /scripts/deepbit_hashrate.php)
3. Create Data Template using the given Data Input Method, use GAUGE for hashrate, set range from 0 to 1000 or higher if you need
4. Create a Graph Template and add the Data Template as AREA graph type and also as GPRINT type of LAST VALUE
5. Go to Devices and add the Graph Template to your localhost graphs
6. Click on the link at the top to Create Graphs, check the box of graph and click Create
7. After a 5-minute poll interval, check in Graphs tab if the graph shows
8. Go to Graph Templates and fine-tune the template, add AVERAGE, MIN, MAX, etc.

Seems awkward at first, but thats the way Cacti is designed.


Any way you can export your template?  I seem to be having issues...

-EP
sr. member
Activity: 256
Merit: 250
May 18, 2011, 05:10:18 PM
#5
Yeah, cacti is a nice idea. I am currently working on a zabbix-based solution for my personal use, but both should have the same functionality - I am just not quite into cacti stuff.
hero member
Activity: 531
Merit: 505
May 18, 2011, 04:34:32 PM
#4
Use this link: http://docs.cacti.net/manual:088:3a_advanced_topics.1_data_input_methods#data_input_methods
from Cacti documentation to help you to do this:

1. Place the above mentioned script into cacti installation scripts folder .. name it deepbit_hashrate.php, test it if it dumps the rate
2. Create Data Input Method attached to this script (input this: /usr/bin/php /scripts/deepbit_hashrate.php)
3. Create Data Template using the given Data Input Method, use GAUGE for hashrate, set range from 0 to 1000 or higher if you need
4. Create a Graph Template and add the Data Template as AREA graph type and also as GPRINT type of LAST VALUE
5. Go to Devices and add the Graph Template to your localhost graphs
6. Click on the link at the top to Create Graphs, check the box of graph and click Create
7. After a 5-minute poll interval, check in Graphs tab if the graph shows
8. Go to Graph Templates and fine-tune the template, add AVERAGE, MIN, MAX, etc.

Seems awkward at first, but thats the way Cacti is designed.
legendary
Activity: 800
Merit: 1001
May 18, 2011, 04:06:34 PM
#3
Seems cool. How do we replicate what you're seeing? Cheesy

Yes.  Please do tell.  I have Cacti installed just fine, but need to know what data to link to and what graph to work with... Please let me know what you're doing to get the Deepbit hasrate graph working.  Thank you!  (+tip)

-EP
hero member
Activity: 886
Merit: 500
May 18, 2011, 02:42:08 PM
#2
Seems cool. How do we replicate what you're seeing? Cheesy
hero member
Activity: 531
Merit: 505
May 18, 2011, 02:29:40 PM
#1
I wanted to monitor several mining variables during the time. After trying, I went the Cacti (http://www.cacti.net/) way. This tools generates a very nice graphs with various scaling of time. The software is a bit complex and hard for newbie, but after trying few data inputs, templates, graphs, etc. you get accustomed to it and can fine-tune the output.

Here is sample of today's output of some graphs. Note that one of cards crashed due to overheating (getting hotter here each day, have to increase fan speeds), later the other gave up too. Lost about 0.4 BTC, DAMN.



For getting the data, simple PHP script parsing the JSON from web services will do its work. For example, to get your current deepbit hashrate, use:

Code:

$text 
file_get_contents("http://deepbit.net/api/");
$json json_decode($text);
print 
$json->hashrate;

?>


For fetching GPU temperatures, I had to write a simple console program which works like http server returning JSON data about temperature. Used ATI ADL SDK to access card temperatures. I had to write this myself because on Windows there is no such software. In Linux, you can probably run aticonfig and grep/sed/awk for the temperatures. On the Linux, where the cacti runs, the poller uses similar PHP script to fetch the JSON data and print them.
Jump to: