Bitcoin Forum
June 21, 2018, 12:45:58 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Asicminer Blade API  (Read 465 times)
dzindra
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile WWW
September 25, 2013, 09:29:31 AM
 #1

I was wondering if there is some way to get machine-friendly data (json, xml) from asicminer blade.

Also is there any way of discovering the blade on the network (such as UDP broadcast packet)?

BTC: 14ABuhZP7UnZQjwtyWrL19DUiof2jw5ykt
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1529585158
Hero Member
*
Offline Offline

Posts: 1529585158

View Profile Personal Message (Offline)

Ignore
1529585158
Reply with quote  #2

1529585158
Report to moderator
1529585158
Hero Member
*
Offline Offline

Posts: 1529585158

View Profile Personal Message (Offline)

Ignore
1529585158
Reply with quote  #2

1529585158
Report to moderator
elemental
Jr. Member
*
Offline Offline

Activity: 49
Merit: 0


View Profile
September 25, 2013, 12:12:24 PM
 #2

Not that I know of, but there isn't much to the html so that might give you what you need.
Otherwise, depending on how you want things set up, I'd suggest running bfgminer as a getwork proxy with your blade(s) pointed to that.  Then, you can use bfgminer's api.
dzindra
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile WWW
September 26, 2013, 11:48:28 AM
 #3

I did not know that bfgminer has getwork proxy Smiley I removed slush's python proxy and installed bfgminer and now I have low cpu usage, API access and pool switching. Thanks!

BTC: 14ABuhZP7UnZQjwtyWrL19DUiof2jw5ykt
zhongfu
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 26, 2013, 02:23:07 PM
 #4

For the API part, I wrote a simple bash script that just parses the info and exposes them as variables. Not exactly that polished though, but works well:
Code:
#!/bin/bash
## script for getting beblade stats
## usage: beblade.sh [options to pass to curl]

## config
ip=192.168.1.2
port=80

## code
beblade_raw=$(curl -s $ip:$port ${@})
status=$?
if [[ $status == 0 ]]; then
        beblade_active=1
        beblade_errors=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep Chip | sed -e "s|Chip: ||" | grep -o "X" | wc -l)
        beblade_mhps=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep MHS -A 4 | tail -n 1 | sed 's/^0*//')
        beblade_received=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep "Received" -A 4 | tail -n 1 | sed 's/^0*//')
        beblade_accepted=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep "Accepted" -A 4 | tail -n 1 | sed 's/^0*//')
        beblade_perminute=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep "Per Minute" -A 4 | tail -n 1)
        beblade_efficiency=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep "Efficiency" -A 4 | tail -n 1)
        beblade_uptime=$(echo $beblade_raw | sed -e "s|<|\n|g" -e "s|>|\n|g" | grep "Up Time" -A 4 | tail -n 1)
else
        beblade_active=0
        beblade_errors=0
        beblade_mhps=0
        beblade_received=0
        beblade_accepted=0
        beblade_perminute=0
        beblade_efficiency=0
        beblade_uptime=0
fi
I could also write one that allows you to change the settings too.

sharecoin:ShTJktch2H3jnXQZiBgMJogrYMTvubhDqP
dzindra
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile WWW
October 01, 2013, 11:55:30 AM
 #5

Thanks for the script - it will definitely come to use.

I wrote simple parser for bfgminer api - check it out at https://github.com/dzindra/bfg-stats

BTC: 14ABuhZP7UnZQjwtyWrL19DUiof2jw5ykt
b!z
Legendary
*
Offline Offline

Activity: 1582
Merit: 1006



View Profile
October 02, 2013, 02:11:22 PM
 #6

You could try to pipe the info from cgminer, or whatever mining software you're using. Good luck!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!