Actually just spotted a tiny prob with bfgminer...
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 :-
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.