Pages:
Author

Topic: Cacti template for CGMINER monitoring (Read 9902 times)

newbie
Activity: 7
Merit: 0
March 02, 2014, 12:14:47 PM
#31
Thanks for your scripts, especially the Perl one. I had some issues with templates but i was able to start from your perl script and get to nice and beautiful graphs.

Finally I know what the hell is happening in those damn rigs! Cheesy

I have a question, which can be a suggestion.

Using cgminer's own miner.php, I can see a parameter in the summary tab called "Weighted Utility". It's an important parameter which is calculated from "total Diff1 works accepted per minute".
This is simply what pool sees and can give us the hash rates we see on pool's page.

As it's available on miner.php means it is readable via cgminer's API. now, can I ask you to implement it in your perl file, so I can use it for the final graph? Unfortunately I have no knowledge of scripting and API's.

And again, thanks for sharing this script, you made a lazy miner, learn how to use cacti!
newbie
Activity: 60
Merit: 0
January 27, 2014, 04:24:06 AM
#30
Hey guys, I am trying this out on cgminer 3.7.2 but am running into this problem:

rig@home:/usr/local/share/cacti/scripts$ ./query_cgminer_stats.pl 192.168.1.110 summary
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./query_cgminer_stats.pl line 65

does anyone know what might be wrong here?

Be sure to start cgminer with below parameters:

 --api-listen --api-network --api-allow "your_server_ip"
newbie
Activity: 1
Merit: 0
January 26, 2014, 05:03:45 AM
#29
Hey guys, I am trying this out on cgminer 3.7.2 but am running into this problem:

rig@home:/usr/local/share/cacti/scripts$ ./query_cgminer_stats.pl 192.168.1.110 summary
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./query_cgminer_stats.pl line 65

does anyone know what might be wrong here?
full member
Activity: 133
Merit: 100
September 08, 2013, 01:35:53 PM
#28

hoping there's an update or two soon to recognize ASIC miners...my individual miner graphs have gone blank since I pulled out the GPU's and plugged in the ASIC.



I have seen some abnormalities with the individual miner stats as well, but they show some data. You aren't seeing anything at all?

sr. member
Activity: 467
Merit: 250
September 06, 2013, 07:44:13 PM
#27

hoping there's an update or two soon to recognize ASIC miners...my individual miner graphs have gone blank since I pulled out the GPU's and plugged in the ASIC.

newbie
Activity: 57
Merit: 0
June 13, 2013, 07:42:08 AM
#26
Then the issue on my end should be seen on bfgminer thread.
Thanks for everything though! Grin
sr. member
Activity: 350
Merit: 250
June 13, 2013, 07:39:23 AM
#25
yeah, cacti is just gonna use the same val tbh....

mine comes out fine :-
Reply was 'STATUS=S,When=1371127189,Code=11,Msg=Summary,Description=bfgminer 3.0.99|SUMMARY,Elapsed=17012,MHS av=878.277

v. v. odd
newbie
Activity: 57
Merit: 0
June 13, 2013, 07:19:33 AM
#24
If you notice the rpc output i put its around 1433. So ther could be something wierd with my bfhminer.
sr. member
Activity: 350
Merit: 250
June 13, 2013, 07:16:31 AM
#23
yeah its a good one, I followed that too..
it has the spine how-to as well...but tbh its not saving much on task speed
newbie
Activity: 57
Merit: 0
June 13, 2013, 07:15:07 AM
#22
Im not using spine.
I used this install guide for the pi
http://n00blab.com/cacti-pi/
sr. member
Activity: 350
Merit: 250
June 13, 2013, 07:11:49 AM
#21
mmm only dynamic clocker is voodoo then...how v. odd
My avg hash rate on the cacti sits happy at 878.2M
I did get a huge spike on pga1 this am to 14.24M, but id guess that was a silly easy nounce Cheesy and I am on 220 overclock bitstream...

shaw are you using cmd.php or have you added spine to cacti...
Im asking as im using spine on the pi, wondering if it makes a diff Cheesy
newbie
Activity: 57
Merit: 0
June 13, 2013, 07:00:50 AM
#20
Im also using 1 cm1
sr. member
Activity: 350
Merit: 250
June 13, 2013, 02:30:23 AM
#19
Quote
root@raspberrypi:~/cm1/cgminer# php api-example.php devs pga0
devs returned 'STATUS=S,When=1371108071,Code=9,Msg=0 GPU(s) - 2 PGA(s),Description=bfgminer 3.0.99|PGA=0,Name=ICA,ID=0,ProcID=0,Enabled=Y,Status=Alive,MHS av=397.310,MHS 5s=473.026,Accepted=8,Rejected=0,Hardware Errors=0,Utility=2.081,Last Share Pool=0,Last Share Time=1371108049,Total MH=91629.2762,Diff1 Work=8,Difficulty Accepted=8.00012207,Difficulty Rejected=0.00000000,Last Share Difficulty=1.00001526,Last Valid Work=1371108049|PGA=1,Name=ICA,ID=1,ProcID=0,Enabled=Y,Status=Alive,MHS av=398.541,MHS 5s=472.715,Accepted=8,Rejected=0,Hardware Errors=0,Utility=2.081,Last Share Pool=0,Last Share Time=1371108055,Total MH=91913.1709,Diff1 Work=8,Difficulty Accepted=8.00012207,Difficulty Rejected=0.00000000,Last Share Difficulty=1.00001526,Last Valid Work=1371108055|'


cgminer api php against bfgminer running

raw json is beyond my understanding....if you can give me a quick script ill run it.

I do feel this is a minor issue, and should be fixable without having to make another template, as bfgminer and cgminer are v.v.v. similar...tbh, truncating the replay to 3 decimals should fix this, we dont need that much precision on fpga Cheesy

no ive not seen this on cgminer....yet


Quote
Av. Hash Rate is double to the real one. minning with FPGA. Should be aprox 800 MH/s but reads 1400 MH/s

Now thats interesting, what fpga are you using....

I can spike to 1.5G/s due to bfgminer doing its auto overclocking spread and going to 220mhz.....cgminer does not have this ability...
Probably why fpga users tend to prefer bfgminer Wink
I know ztex can regularly push this on over clock....im only using cm1's
newbie
Activity: 57
Merit: 0
June 12, 2013, 08:19:45 PM
#18
how do i do this? bfgminer-rpc call? or in cacti?


edit:

remove the .. on the Code label.
Code:
~/bfgminer $ bfgminer-rpc
Reply was 'STATUS=S,When=1371086607,Code=11,Msg=Summary,Description=bfgminer 3.0.99|SUMMARY,Elapsed=73273,MHS av=1433.28,Found Blocks=0,Getworks=1598,Accepted=13654,Rejected=40,Hardware Errors=39,Utility=11.18,Discarded=3184,Stale=27,Get Failures=1,Local Work=80381,Remote Failures=0,Network Blocks=182,Total MH=105021094.3176,Work Utility=11.27,Difficulty Accepted=13654.20834668,Difficulty Rejected=40.00061036,Difficulty Stale=27.00041199,Best Share=8641|'
[STATUS] =>
(
   [STATUS] => S
   [When] => 1371086607
   [..Code] => 11
   [Msg] => Summary
   [Description] => bfgminer 3.0.99
)
[SUMMARY] =>
(
   [0] => SUMMARY
   [Elapsed] => 73273
   [MHS av] => 1433.28
   [Found Blocks] => 0
   [Getworks] => 1598
   [Accepted] => 13654
   [Rejected] => 40
   [Hardware Errors] => 39
   [Utility] => 11.18
   [Discarded] => 3184
   [Stale] => 27
   [Get Failures] => 1
   [Local Work] => 80381
   [Remote Failures] => 0
   [Network Blocks] => 182
   [Total MH] => 105021094.3176
   [Work Utility] => 11.27
   [Difficulty Accepted] => 13654.20834668
   [Difficulty Rejected] => 40.00061036
   [Difficulty Stale] => 27.00041199
   [Best Share] => 8641
)
full member
Activity: 133
Merit: 100
June 12, 2013, 06:42:27 PM
#17
how can i help?
also doing it with bfgminer. Av. Hash Rate is double to the real one. minning with FPGA. Should be aprox 800 MH/s but reads 1400 MH/s

As with the previous issue, I need the JSON output to see if it is in fact a parsing issue with the script, or something in bfgminer.
newbie
Activity: 57
Merit: 0
June 12, 2013, 06:39:06 PM
#16
how can i help?
also doing it with bfgminer. Av. Hash Rate is double to the real one. minning with FPGA. Should be aprox 800 MH/s but reads 1400 MH/s
full member
Activity: 133
Merit: 100
June 12, 2013, 01:00:00 PM
#15
Actually just spotted a tiny prob with bfgminer...

Quote
perl /var/www/cacti/scripts/query_cgminer_stats.pl 127.0.0.1 devs get MHS_5s PGA1, output: 400.77840077.8

I figure this is related to :-
 print shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);

Might be an idea to add a check for second . and drop anything after it...
Think that way it should work for both miners

Ive done a temp hack (im no coder, just a sys admin) and added :-
Quote
elsif (($ARGV[3] eq "Utility") || ($ARGV[3] eq "MHS_5s") || ($ARGV[3] eq "MHS_av") || ($ARGV[3] eq "Temperature")) {
              #print shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);
               my $thingy = shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);
               print substr $thingy, 0, 4;
            }

This has fixed the graphing for now, but its dirty.....

Hmm, that's not good. Can you send me an excerpt of the original JSON from the cgminer/bfgminer API for MHS_5s on PGA1? I need to see if it has something to do with how the number is being parsed by my script or is something inherent in cgminer/bfgminer. Also, it would be good to know if the issue only manifests in bfgminer and not cgminer.

sr. member
Activity: 350
Merit: 250
June 12, 2013, 11:05:36 AM
#14
Actually just spotted a tiny prob with bfgminer...

Quote
perl /var/www/cacti/scripts/query_cgminer_stats.pl 127.0.0.1 devs get MHS_5s PGA1, output: 400.77840077.8

I figure this is related to :-
 print shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);

Might be an idea to add a check for second . and drop anything after it...
Think that way it should work for both miners

Ive done a temp hack (im no coder, just a sys admin) and added :-
Quote
elsif (($ARGV[3] eq "Utility") || ($ARGV[3] eq "MHS_5s") || ($ARGV[3] eq "MHS_av") || ($ARGV[3] eq "Temperature")) {
              #print shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);
               my $thingy = shiftdec($json_text->{uc($command)}->[$pga{$ARGV[4]}]->{add_spaces($ARGV[3])}, 2);
               print substr $thingy, 0, 4;
            }

This has fixed the graphing for now, but its dirty.....
full member
Activity: 133
Merit: 100
June 12, 2013, 10:19:54 AM
#13
Just wanted to add this works v. nicely on an rPi running fpga rigs too...

Nice work Wink


[edit]
Just tested this it works for bfgminer too Wink

Good to know. Thanks for the update!
sr. member
Activity: 350
Merit: 250
June 12, 2013, 06:46:10 AM
#12
Just wanted to add this works v. nicely on an rPi running fpga rigs too...

Nice work Wink


[edit]
Just tested this it works for bfgminer too Wink
Pages:
Jump to: