is there any way to monitor a Antminer S1 via snmp/syslog.
im trying to get the temperature from the Unit.
Yes - I've just done this.
1) log into GUI and go to System --> Software --> [ Update lists ] then wait a bit
2) Under Status, click the /Available Packages\ tab then click the /S\ tab
3) Scroll down to snmpd and click install. You can ignore the snmpd-static and snmpd-utils packages.
4) SSH to your miner and log in as root
5) vi /etc/snmp/snmpd.conf and set it like this
rocommunity Waizphzbp3
exec minerstatus1 /bin/sh /root/cgminer-api-summary
6) vi /root/cgminer-api-summary and set the contents like this
/usr/bin/cgminer-api stats | egrep "temp|fan" | grep -v "Reply was" | tr -d " []><()" | tr "=" ":"
/usr/bin/cgminer-api coin | egrep "Time|Difficulty" | grep -v "Reply was" | tr -d " []><()" | tr "=" ":"7) Back to the web gui, go to System --> Startup and "enable snmpd" then click the start button for snmpd.
8)
FAIL This is the bit I haven't done yet. My miner is not publicly accessible, so I simply disabled its firewall.
If you have an uncontrolled environment, you want to permit port 161 UDP from the monitoring host only.
9) To scan it I did this on my remote host.
snmpwalk -Os -c Waizphzbp3 -v 2c 192.168.1.93 .1.3.6.1.4.1.2021.8 which returns this output:
extIndex.1 = INTEGER: 1
extNames.1 = STRING: minerstatus1
extCommand.1 = STRING: /bin/sh /root/cgminer-api-summary
extResult.1 = INTEGER: 0
extOutput.1 = STRING: fan_num:1
fan1:2820
fan2:0
fan3:0
fan4:0
temp_num:2
temp1:41
temp2:44
temp3:0
temp4:0
temp_avg:42
temp_max:45
temp_hi:44
overheat_temp:0
opt_bitmain_temp:50
opt_bitmain_fan_min:32
opt_bitmain_fan_max:160
PoolAttempts:0
CurrentBlockTime:1405304337.011621
NetworkDifficulty:17336316978.50783100
extErrFix.1 = INTEGER: noError(0)
extErrFixCmd.1 = STRING: So my S1 is at 41 and 44 degrees C, with the front fan doing 2820 RPM . My rear fan is only 3 wire and doesn't report speeds.
To customise, simply edit the shell script in /root/cgminer-api-summary to suit your needs.
There are a heap of different options that cgminer-api takes, the shell script simply formats them.
Some of the ones I've looks at:
/usr/bin/cgminer-api devs Info on attached asics
/usr/bin/cgminer-api pools Info on pools
/usr/bin/cgminer-api switchpool Change to another configured pool
/usr/bin/cgminer-api notify unsure
/usr/bin/cgminer-api devdetails device info, more details
/usr/bin/cgminer-api stats
/usr/bin/cgminer-api summary
/usr/bin/cgminer-api config failover info
/usr/bin/cgminer-api coin stats about current block and difficulty
/usr/bin/cgminer-api usbstats Lots of stuff
/usr/bin/cgminer-api zero reset counters ?
/usr/bin/cgminer-api hotplug ?
/usr/bin/cgminer-api ascset configure asics on the fly
/usr/bin/cgminer-api asccount count attached asics
/usr/bin/cgminer-api lockstats dunno - not compiled
/usr/bin/cgminer-api edevs devs but for devices that are enabled only
/usr/bin/cgminer-api estats stats but for enabled devices only.
/usr/bin/cgminer-api lcd One liner? Not compiled in
Any questions please ask, and if you have fiddled your firewall please let us know the clean tidy way to do that.