Post
Topic
Board Mining software (miners)
Re: Cacti template for CGMINER monitoring
by
evilscoop
on 12/06/2013, 16:05:36 UTC
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.....