Duke's utils
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
478 B

#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
use JSON::Any;
my $j = JSON::Any->new;
my $PORT = 13895;
my $json = get("http://127.0.0.1:$PORT/mining_status");
my $mining = $j->decode($json);
my $speed = $mining->{speed};
my $threads = $mining->{threads_count};
my $uptime = qx{cat /proc/loadavg};
my ($load) = split / /, $uptime;
chomp(my $hostname= qx{hostname});
print "$hostname: BLUR $speed H/s, $threads threads, load $load\n";
#print $json;