Bitcoin Forum

Bitcoin => Mining support => Topic started by: tim-bc on February 12, 2019, 08:30:27 PM



Title: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: tim-bc on February 12, 2019, 08:30:27 PM
Depending on your power costs / cooling situation, it might make sense to have your Antminer S9s running on LPM some days (regular hashrate, 88% energy usage) and on Enhanced LPM on other days (70% hashrate, 53% energy usage). This will reduce heat output and cooling costs when necessary.

If you only have a few miners, you can simply uncheck the "Enhanced Low Power Mode" checkbox in the configuration page when needed.

If you have a lot of miners, you can actually automate this process through SSH. All you have to do is add this line into the config:

Code:
"bitmain-close-low-vol-freq" : true,

There are many tools that allow you to remotely execute commands over SSH. I found the sshpass utility to be the easiest, but you could probably use pssh or ansible as well.

What do you all think?


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: DireWolfM14 on February 12, 2019, 08:33:29 PM
Thanks for the advice, that's new to me.  Will this work on the S9i and S9j models as well?


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: mikeywith on February 13, 2019, 01:01:43 AM
Thanks for the advice, that's new to me.  Will this work on the S9i and S9j models as well?

i see no reason why not , that's an SSH command that should run on all types of miners with those LPM modes.



op, great work as usual, keep bringing these goodies.


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: tim-bc on February 15, 2019, 09:50:18 PM
Thanks for the advice, that's new to me.  Will this work on the S9i and S9j models as well?

Yes, it should work the exact same way, same syntax for every command. It's only a different firmware file when you are initially upgrading to the enhanced firmware.

op, great work as usual, keep bringing these goodies.

Thanks! I hope it helps some of the bigger miners out there ;D


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: tim-bc on March 08, 2019, 04:41:42 PM
Here's a proof of concept shell script that will enhance the miner at IP address $1 unless a second argument is provided, which causes it to do the opposite:

Code:
#!/bin/bash
if [ $# -eq 2 ]
then
  timeout 11 sshpass -p 'admin' ssh -4 -o StrictHostKeyChecking=no root@$1 "sed -i '/bitmain-freq/ a \"bitmain-close-low-vol-freq\" : true,' /config/bmminer.conf && /sbin/reboot" &
else
  timeout 11 sshpass -p 'admin' ssh -4 -o StrictHostKeyChecking=no root@$1 "sed -i '/close-low-vol-freq/d' /config/bmminer.conf && /sbin/reboot" &
fi


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: Lunga Chung on April 27, 2019, 06:25:51 AM
How would this work in Awesome Miner?

I can define a trigger to execute SSH command on scheduled time ex:

from 00:00 AM - 08:00 AM (low tariff)  LPM
from 08:00 AM - 00:00 AM (high tariff) Enhanced LPM

Can someone more experienced with SSH past a full command string?

Thx


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: tim-bc on April 30, 2019, 03:28:22 PM
Can someone more experienced with SSH past a full command string?

You should be able to use the same ssh commands that I posted above to get you started.
For example, if you want to enable enhanced mode you would just use awesome miner to send the part in the double quotes:

Code:
sed -i '/close-low-vol-freq/d' /config/bmminer.conf && /sbin/reboot

That being said, I'm surprised that the Awesome Miner developers haven't added this as a feature yet.


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: NotFuzzyWarm on April 30, 2019, 03:37:18 PM
... That being said, I'm surprised that the Awesome Miner developers haven't added this as a feature yet.

Patrike usually only adds features if someone requests it. Ask him about it in the Awesome Miner support thread (https://bitcointalk.org/index.php?topic=676942.0).


Title: Re: [Antminer S9] Here's how to switch between LPM and Enhanced LPM programmatically
Post by: Lunga Chung on May 01, 2019, 06:29:57 AM
You should be able to use the same ssh commands that I posted above to get you started.
For example, if you want to enable enhanced mode you would just use awesome miner to send the part in the double quotes:

Code:
sed -i '/close-low-vol-freq/d' /config/bmminer.conf && /sbin/reboot

That being said, I'm surprised that the Awesome Miner developers haven't added this as a feature yet.

You can create a trigger in AM which can execute a command under defined circumstances (eg time of the day).

Sending just a command under double quotes does nothing but a full command works.

Which command would be for disabling enhanced mod?