So....long story short, I have a total of Eighteen S3+ Antminers that are in a building that for most of the time is not used. Every once in a while, however, it is used, so I want to be able to easily drop the fan noise down via a scripted approach. I have Teamviewer access to a live system there and I've used Putty to SSH into individual miners to change frequency on individual units. What would be a good scripted approach to change them en masses from say 250M to 212.5M and back? Sequential IPs and all same username/PW...
Thanks in advance!
I would setup a script on each one and then modify the web interfaces adding another page like 192.168.1.99/slowdown and 192.168.99/speedup that runt he scripts
then you could just do it all over port 80 via lynx.
assuming you know how to code etc...
web interfaces root is /www by the way...
Well, I used to program my TRS-80 many years ago and do some work in PowerShell automation, but I wouldn't say I'm proficient at all. Was hoping there was a fairly easy way to automate, but I can research what you noted above, thanks!
basically you need 2 copies of /etc/config/asic-freq one with the higher frequency and one with the lower frequency. and of course in the script copying one over the other and issuing a /etc/init.d/cgminer restart command. or maybe a /etc/init.d/cgminer stop slight wait then /etc/init.d/cgminer start. as I have observed the restart command sometimes does not restart cgminer
the hardest part is most likely getting html or cgi script to run the script, but im sure if u looked over the cgi of how the web client issues the reboot command that code could be copied and modified to run your script
actually after looking at it, it is simpler than i thought...
just put your script in /www/cgi-bin
low.sh
#!/bin/sh -f
----script code here---
echo "Content-type: text/html"
echo ""
echo ""
echo "
"
echo "
low executed
"
echo ""
dont forget chmod 777 low.sh
execute that with
http://antminersiphere/cgi-bin/low.shand it will execute that script.
then do the same for adjusting back to hi hi.sh
then if using windows or unix you can just install lynx and run a batch file that executes the 19 lynx url requests to each miner
Thanks for the detailed response...this may be beyond my current coding abilities but I've been meaning to learn this stuff more so I may take it on as a challenge anyway. I'll post if I can get it working...
Well it is pretty much complete cept for the script here which would be this
cp /etc/config/asic-freq.low /etc/config/asic-freq
/etc/init.d/cgminer stop
wait
/etc/init.d/cgminer start
so low.sh would be
low.sh
#!/bin/sh -f
cp /etc/config/asic-freq.low /etc/config/asic-freq
/etc/init.d/cgminer stop
wait
/etc/init.d/cgminer start
echo "Content-type: text/html"
echo ""
echo ""
echo "
"
echo "
low executed
"
echo ""
hi.sh would be
#!/bin/sh -f
cp /etc/config/asic-freq.hi /etc/config/asic-freq
/etc/init.d/cgminer stop
wait
/etc/init.d/cgminer start
echo "Content-type: text/html"
echo ""
echo ""
echo "
"
echo "
hi executed
"
echo ""
and of course before this you would edit /etc/config/asic-freq to use the overclocked values then cp asic-freq to asic-freq.hi. then modify it for the lower ones and cp asic-freq asic-freq.low
this all wont work on the newer firmware though because they changed how the frequencies are changed. it is in the gui interface. but I bet there is an easy way to modify it too.
I just threw the antminer logo in there for the hell of it.
then I guess u can run a batch file that executes
lynx -dump
http://antminerup/cgi-bin/low.sh > null