Post
Topic
Board Mining (Altcoins)
Re: [OS] nvOC easy-to-use Linux Nvidia Mining
by
fullzero
on 10/07/2017, 12:46:07 UTC
How tricky would it be to use the nvidia-settings commands from within oneBash to run the following command recursively for each card that's detected when it runs, rather than setting a specific power limit or clock offset?

Enable PowerMizer (Prefer Maximum Performance)

nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'


essentially this, but with more efficient code because I never was good at foreach loops and such...

if [ $POWERLIMIT == "NO" ]
then
sudo nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'
sudo nvidia-settings -a '[gpu:1]/GPUPowerMizerMode=1'
sudo nvidia-settings -a '[gpu:2]/GPUPowerMizerMode=1'
sudo nvidia-settings -a '[gpu:3]/GPUPowerMizerMode=1'
sudo nvidia-settings -a '[gpu:4]/GPUPowerMizerMode=1'
sudo nvidia-settings -a '[gpu:5]/GPUPowerMizerMode=1'
fi

I was going to rewrite exactly these parts of script since I also don't like such code. But before doing so I asked (in another rxOC thread) to put oneBash files to GitHub repository, so such changes will not be like a monkey work to copy/paste a lot. Until that I feel no motivation since I have only couple of rigs with 1050 running nvOC. It might change when I receive 12 PCIe MOBO (waiting for Biostar board from Aliexpress). But I am pretty sure that git is the best way to handle a lot of change requests and integrate them into this great distro or run just own branch.

PS. I was talking about putting oneBash only to a repository, not about full distribution.


I understood that you meant to add oneBash only for github.  Look at the number of changes in this oneBash alone; and then consider how much more there would be to look at with input from even a few members.  Until most of the features members want have a basic implementation; this is essentially only going to give me another thing I need to pay attention to.  Granted if you have a suggestion, you can always make a post here like you did.

I uploaded the Newest oneBash and versions of additional files; I added a GPUPowerMizerMode implementation.

oneBash is not only an implementation; it is also a learning experience for many members.  This is the primary reason I don't use loops / nested loops; everywhere I could.  I will change them out eventually.