Bitcoin Forum
June 21, 2024, 08:17:36 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 19, 2017, 10:38:58 AM
I wrote a code that check any income messages to telegram bot from you, and answer you.
Save it as separate file and run it at start.
Quote
source ~/wallets #import wallets
source ~/settings.sh #import settings

cd /tmp
while [ 1 ]
do
rm getUpdates
wget https://api.telegram.org/bot$TELEGRAM_API/getUpdates

INCOME=$(cat ./getUpdates | grep $TELEGRAM_CHAT | tail -1 | awk -F ":" '{print $13}' | cut -d \" -f 2)
INCOME_TIME=$(cat ./getUpdates | grep $TELEGRAM_CHAT | tail -1 | awk -F ":" '{print $12}' | cut -c -10)

LAST_INCOME_TIME=$(cat /home/m1/last_inc_time)

if [ $INCOME_TIME != $LAST_INCOME_TIME ]
then
  if [[ $INCOME == "State" || $INCOME == "state" || $INCOME == "STATE" ]]
  then
  echo state of rig
  ~/mail.sh 9
else
  echo invalid msg!
  fi
  echo $INCOME_TIME > /home/m1/last_inc_time #first time you must create this file yourself. put any numbers inside.
else
  echo no new messeges!
fi
sleep 5
done

To change or add new msg: $INCOME is text of message.   ~/mail.sh 9 - is command to do.
Quote
if [[ $INCOME == "State" || $INCOME == "state" || $INCOME == "STATE" ]]
  then
  echo state of rig
  ~/mail.sh 9
else
  echo invalid msg!
  fi

Please add to nvOC .
2  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 18, 2017, 07:47:40 PM
I saw post from BaliMiner. Thanks for your post! I decided to split in with my email notification script.
But I decided ti use original telegram-notify tool.

fullzero, please update this too.

Here is my result:

To install telegram-notification may be added to first boot section (from http://bernaerts.dyndns.org/linux/75-debian/351-debian-send-telegram-notification) thanks
Quote

settings section or file
Quote
EMAIL="YES"
 
TELEGRAM="YES"
TELEGRAM_API="your-api-key"
TELEGRAM_CHAT="your-chat-id"

start onebash section:
Quote
if [ $TELEGRAM == "YES" ]
then
echo "[general]" > ~/telegram-notify.conf
echo "api-key=$TELEGRAM_API" >> ~/telegram-notify.conf
echo "user-id=$TELEGRAM_CHAT" >> ~/telegram-notify.conf
sudo mv /home/m1/telegram-notify.conf /etc/telegram-notify.conf
fi


mail.sh file :
Quote
#!/bin/bash
MSM_NUM=$1
source ~/wallets
source ~/settings.sh

MSG=""
IMG=""
DOC=""

case $MSM_NUM in
     0)
     MSG="System was started"
     IMG="--success"
          ;;
     1)
     MSG="GPU Miner was started"
     IMG="--success"
          ;;
     2)
     MSG="CPU Miner was started"
     IMG="--success"
          ;;
     3)
     MSG="GPU miner was crushed and restarting now"
     IMG="--error"
     DOC="--document "/home/m1/4_restartlog""
          ;;
     4)
     MSG="New setiings arrived. Restart now"
     IMG="--question"
     DOC="--document "/home/m1/wallets.diff""
          ;;
     5)
     MSG="Lost GPU so restarting system"
     IMG="--error"
     DOC="--document "/home/m1/4_restartlog""
          ;;
     6)
     MSG="Utilization is too low: so restarting system"
     IMG="--error"
     DOC="--document "/home/m1/4_restartlog""
          ;;
     7)
     MSG="NICEHASH was started just now!"
     IMG="--success"
          ;;
     Cool
     IP=$(cat /home/m1/last_ip)
     MSG="webUI was started just now http://$IP/"
     IMG="--success"
          ;;
     *)
     TEMP=$(/usr/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv)
     PD=$(/usr/bin/nvidia-smi --query-gpu=power.draw --format=csv)
     FAN=$(/usr/bin/nvidia-smi --query-gpu=fan.speed --format=csv)
     LF=$'\n'
     PROFIT=$(cat /home/m1/current-profit)
     MSG=$TEMP$LF$PD$LF$FAN
     #MSG="$WORKER_NAME Error with subject!"
          ;;
esac
# telegram-notify --success --text "Action *sucessful* with markdown *bold* example"
# telegram-notify --error --title "Error" --text "Error message with a title"
# telegram-notify --question --title "File content display" --text "/tmp/log.txt"
# telegram-notify --icon 1F355 --text "Message with custom icon 1F355 and embedded image" --photo "/tmp/icon.png"
# telegram-notify --text "Result is available in the embedded document" --document "/tmp/result.log"

if [ $EMAIL == "YES" ]
then
sendemail -f $RIG_EMAIL -t $ADMIN_EMAIL -u $WORKER_NAME -m "$MSG" -s $RIG_SMTP -o tls=yes -xu $RIG_EMAIL -xp $RIG_EMAIL_PASS & > /dev/null 2>&1
fi

if [ $TELEGRAM == "YES" ]
then
MSG="<b>"$WORKER_NAME"</b> - "$MSG
telegram-notify ${IMG} --text "${MSG}" ${DOC} --html > /dev/null 2>&1
fi


fullzero, also here is my btc address 1GFTEtLLvvwoa4ogDntD5oaXBgJLYokzTC

Maybe it is time to move with your code to github ? A lot of people what to make some fixes, addons and so on.

3  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 18, 2017, 07:16:10 PM
Also, using separate files for settings and for the code allows you to share the settings in any module with a string "source ~/wallets" or "source ~/settings.sh"
4  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 18, 2017, 12:15:09 PM
I divided the settings into several files, so that it would be possible to set up purses and choose a currency, could be shared across several farms. And the map and system settings were locally configured.

Here is code to send email:
Quote
EMAIL_TEXT=$1 # take argument and put it to $EMAIL_TEXT
sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl sendemail -y
# to send email use command ( ./mail.sh X) where X is N of text message.

case $EMAIL_TEXT in
     0)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="System was started just now!"
          ;;
     1)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="GPU Miner was started just now!"
          ;;
     2)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="CPU Miner was started just now!"
          ;;
     3)
     SUBJECT="Restaring $WORKER_NAME"
     TEXT="GPU miner was crushed and restarting now"
          ;;
     4)
     SUBJECT="Settings update $WORKER_NAME"
     TEXT="New setiings arrived. Restart now"
          ;;
     5)
     SUBJECT="Rebooting $WORKER_NAME"
     TEXT="Lost GPU so restarting system."
          ;;
     6)
     SUBJECT="Rebooting $WORKER_NAME"
     TEXT="Utilization is too low: reviving did not work so restarting system in 10 seconds"
          ;;
     7)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="NICEHASH was started just now!"
          ;;
     Cool
     SUBJECT="Starting $WORKER_NAME"
     TEXT="Gotty was started just now"
          ;;
     *)
     SUBJECT="Error $WORKER_NAME"
     TEXT="Error with subject!"
          ;;
esac

sendemail -f $RIG_EMAIL -t $ADMIN_EMAIL -u $SUBJECT -m "$TEXT" -s $RIG_SMTP -o tls=yes -xu $RIG_EMAIL -xp $RIG_EMAIL_PASS &
It will try to install sendemail every time, but it is not problem. Or you can add apt-get in firstBOOT section of 1bash. All arguments must be loaded from 1bash using files. But I don't have time to do it, for now. I am using another way - I add "source ~/wallets # from this file we take $ADMAIL_EMAIL
source ~/settings.sh # from this file we take $RIG_EMAIL, $WORKER_NAME, $RIG_EMAIL_PASS, $RIG_SMTP
".
5  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 17, 2017, 09:58:33 AM
All once again good afternoon!

I added:
1. email alarms (sendemail),
2. webUI for monitoring (apache2 + go + gotty),  
# All needed apts will install in first boot if $GOTTY="YES" || $EMAIL="YES". in settings.sh
3. auto update pasteBin and restart miner if something changes.
# you need to run crontab -e and add "*/5 * * * * ~/update_wallets.sh" . To check update every 5 minutes.


Completed / redone:
1. Option to set all Target temps and PowerLimits in two strings while using autoFANS
2. add specific PL and CLOCK for some coins
3. output nvidia-smi to screen every 30 sec when check fans, even if the fans are in manual mode. (to see temps, RPMs, memory in gotty, or via SSH, or via local quake)
4. Manual setting WORKER_NAME to use with pools. In settings.sh . If don't set using nvXXX (last digs of ip)
5. WORKER_NAME is hostname of rig, for more useful network search.

I divided the code into several files (start, miner, overclock, e-mail, fans). Settings rendered in 3 separate files:
settings.sh - constant machine settings
gpus_settings.sh - constant settings of video cards
wallets - settings of wallets, miners, machine settings variables.
Unfortunately, I have not yet had a chance to check how it works on the v18, but on v17 all is good. I think I can check in the next couple of days.

All the files are added to the folders as in the archive. Your need to change autostart from "gnome-terminal" to "~/start" (sudo nano ~/.config/autostart/webmob.desktop )
Settings are given in three files in the mnt sub folder. settings, gpus_settings, wallets

I would be happy if someone at least a small part of my work is useful.

fullzero and other developers: I ask for applications for deleted comments and descriptions, maybe even in some places copyright. While working on the code - some parts were in the way.

Of course, I could forget or confuse something, but I seem to remember everything and wrote.

Please do not make alternate releases.

As I have already told you:

https://bitcointalk.org/index.php?topic=1854250.msg20058141#msg20058141

Quote
In general I would like to offer as many options to members as possible and encourage members to share their customizations.

With any contribution, so long as it is not a blatant copy of a prior contribution; I will integrate it and add acknowledgement and BTC donation address to the top of oneBash.

If you use or make an executable; you must provide me with the source code and I will examine and compile it myself.

Your contribution must be free and open source.

I would like to avoid solutions involving the installation of multiple programs or services; to so something that can be done via SSH, SFTP, or a socket.


also see:

https://bitcointalk.org/index.php?topic=1854250.msg20093039#msg20093039


Quote
You can make modules to do distinct operations: like overclocking, miner selection, watchdog, monero mining, etc to make easier to tune/restart some parts.  And I will integrate them with switches to be readinto / not used in oneBash.  In addition they could also be used independently, such as a OC bash could be run while already mining.  A benchmarking bash / py could be made to find and log the opt stable settings ect.  The goal is to provide members with as many options as possible while maintaining ease of use.

Once most of the requested features have been implemented; I will make a github and target oneBash optimization.


It makes no sense to have members downloading multiple versions of the OS when only a few files are changed.  

Also; in such cases: I cannot confirm that the system has not been altered or malware added ( I am not saying you have done this, but that it is always a possibility especially when done by new members).  


If you post the code for each additional file (or send me a pm with it); I will integrate your contributions into 1bash (or selectively in 2unix depending on how different they are) with a single or multiple switches: and add acknowledgement and your BTC donation address to the top of 1bash.

I was not going to make an alternative release.
I posted the code I redesigned so that you could see and add the options you liked to your release.
I can not put it in separate pieces of code, because this is your code divided into different files, plus my code, plus the code of other developers, a little finished. If interested, download the archive and watch. If you want I can lay out the text files without an archive. https://drive.google.com/drive/folders/0B8OLYcDXEG6rVTdIYmtFMndPdXc?usp=sharing If not interesting, do not use and do not add to the release.
6  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 15, 2017, 02:05:32 PM
All once again good afternoon!
Here is a link to my revision of the nvOC v18.  https://drive.google.com/file/d/0B8OLYcDXEG6rcGlndVc5RDhpbFU/view?usp=sharing

I added:
1. email alarms (sendemail),
2. webUI for monitoring (apache2 + go + gotty), 
# All needed apts will install in first boot if $GOTTY="YES" || $EMAIL="YES". in settings.sh
3. auto update pasteBin and restart miner if something changes.
# you need to run crontab -e and add "*/5 * * * * ~/update_wallets.sh" . To check update every 5 minutes.


Completed / redone:
1. Option to set all Target temps and PowerLimits in two strings while using autoFANS
2. add specific PL and CLOCK for some coins
3. output nvidia-smi to screen every 30 sec when check fans, even if the fans are in manual mode. (to see temps, RPMs, memory in gotty, or via SSH, or via local quake)
4. Manual setting WORKER_NAME to use with pools. In settings.sh . If don't set using nvXXX (last digs of ip)
5. WORKER_NAME is hostname of rig, for more useful network search.

I divided the code into several files (start, miner, overclock, e-mail, fans). Settings rendered in 3 separate files:
settings.sh - constant machine settings
gpus_settings.sh - constant settings of video cards
wallets - settings of wallets, miners, machine settings variables.
Unfortunately, I have not yet had a chance to check how it works on the v18, but on v17 all is good. I think I can check in the next couple of days.

All the files are added to the folders as in the archive. Your need to change autostart from "gnome-terminal" to "~/start" (sudo nano ~/.config/autostart/webmob.desktop )
Settings are given in three files in the mnt sub folder. settings, gpus_settings, wallets

I would be happy if someone at least a small part of my work is useful.

fullzero and other developers: I ask for applications for deleted comments and descriptions, maybe even in some places copyright. While working on the code - some parts were in the way.

Of course, I could forget or confuse something, but I seem to remember everything and wrote.
7  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 15, 2017, 10:50:29 AM
Hello. Here is my code to send email when somethings happens:
Quote
EMAIL_TEXT=$1 # take argument and put it to $EMAIL_TEXT

source /media/m1/1263-A96E/wallets # from this file we take $ADMAIL_EMAIL

source /media/m1/1263-A96E/settings.sh # from this file we take $RIG_EMAIL, $WORKER_NAME, $RIG_EMAIL_PASS, $RIG_SMTP

# to install mail tool use ($ apt-get install libio-socket-ssl-perl libnet-ssleay-perl sendemail)
# to send email use command ($ ./mail.sh X) where X is N of text message.

case $EMAIL_TEXT in
     0)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="System was started just now!"
          ;;
     1)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="GPU Miner was started just now & gotty for gpu is starting now!"
          ;;
     2)
     SUBJECT="Starting $WORKER_NAME"
     TEXT="CPU Miner was started just now & gotty for cpu is starting now!"
          ;;
     3)
     SUBJECT="Restaring $WORKER_NAME"
     TEXT="GPU miner was crushed and restarting now"
          ;;
     *)
     SUBJECT="Error $WORKER_NAME"
     TEXT="Error with subject!"
          ;;
esac

sendemail -f $RIG_EMAIL -t $ADMIN_EMAIL -u $SUBJECT -m "$TEXT" -s $RIG_SMTP -o tls=yes -xu $RIG_EMAIL -xp $RIG_EMAIL_PASS &

I use this to send email when starting miner, rebooting, and so on. You can put command anywhere and use it any times. Change  or add SUBJECT, TEXT and go on.

fullzero, I fully support the ideas of open and consolidated software. Naturally, all my additions are free. Later, I will post your v0018 with my changes about which I spoke earlier. (Now I am rewriting form v17 to v18). I will try to make them modular. When the options are turned on, additional packages will be install, and if the options are disabled, they will not install.
If you like some of my options, you can add them to nvOC.

I'm using apache for the web server and gotty to display "screen -x miner" on this web server.
I like this decision more than the RDP. You do not need a client application to view the state of the miner.
 
8  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0017 on: July 10, 2017, 03:32:53 PM
Hi fullzero.
Thanks for your great work.
I am using your bash and I rewrite some parts for my own needs.
I have some suggestions you can use "export INDIVIDUAL_POWERLIMIT_0 ....." instead of using

Quote
echo $INDIVIDUAL_POWERLIMIT_0 > '/home/m1/p0'
and
POWER_LIMIT[0]=$(cat /home/m1/p0 | sed '/ /d')
and
rm /home/m1/p0

Just write "export ALL YOUR variables" that you need in next bash, before running bash file.
IN bash file you can just call them as always.


I added an email notification when certain conditions are being met.
Put all the control code in a separate file, the settings of wallets in a separate file, the settings of the cards are in another file, fans control ins a separate file, emails send is also a separate file.
Also made a web page on which using iframes and gotty https://github.com/yudai/gotty you can watch GPU mining process, CPU mining process and card info (temp, fans, power draw and so on).
If someone is interesting in these features - white, and I will post my code.
9  Alternate cryptocurrencies / Mining (Altcoins) / Re: HOW TO SET UP OVERCLOCKING AND FAN CONTROL ON UBUNTU 16.04 FOR NVIDIA CARDS on: June 18, 2017, 07:16:27 PM
Did you mean 17.04 ? Ubuntu site can't have link to 17.10. Only 17.04

PCH option under the PCI-Express speed works on PCI-E X16 slot 0. But I am using PCI-E X1 slot 2,3.
Does it change anything?
10  Alternate cryptocurrencies / Mining (Altcoins) / Re: HOW TO SET UP OVERCLOCKING AND FAN CONTROL ON UBUNTU 16.04 FOR NVIDIA CARDS on: June 18, 2017, 04:57:36 PM
I did not try 17.10. I will try Ubuntu 17.10.
I have mb Asus Z-270-P, cpu intel celeron G4500, 4gb RAM, now i have two GPUs MSI GTX1070 Gaming X, but I am planing to use 8. Or 6.
Any suggestions?
11  Alternate cryptocurrencies / Mining (Altcoins) / Re: HOW TO SET UP OVERCLOCKING AND FAN CONTROL ON UBUNTU 16.04 FOR NVIDIA CARDS on: June 18, 2017, 02:39:40 PM
I tried one more time.  Tried your oc.sh - the same errors.
I can't set clock or fan speed. The same errors.
Via Nvidia X Server Settings I also can't to set clocks or fans speed. Just read, or set PowerMizer profile. Is it ok?
Maybe special configuration of MB bios? Maybe I must disable internal GPU and use NVIDIA?
I tried to view available clocks via nvidia-smi and see that it is N/A. Is it normal?
I am using MSI GTX1070 8G Gaming X. Maybe I need to flash some "unlocked bios" to change clocks?
12  Alternate cryptocurrencies / Mining (Altcoins) / Re: HOW TO SET UP OVERCLOCKING AND FAN CONTROL ON UBUNTU 16.04 FOR NVIDIA CARDS on: June 18, 2017, 09:34:40 AM
Thanks a lot for answer.
Do i need to install cuda8 or it is already instaleted with Additional Drivers or OS ?
I can use oveclock and fan control using nvidia-settings, right?

I did all you said.
When I try to start nvidia_gpus_oc.sh
Quote
#!/bin/bash
nvidia-settings -a '[gpu:0]/GPUGraphicsMemoryOffset[3]=100'
nvidia-settings -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=100'
nvidia-settings -a '[gpu:0]/GPUFanControlState=1'
nvidia-settings -a '[fan:0]/GPUTargetFanSpeed=80'

I get errors:
Quote
ERROR: Error parsing assignment '[gpu:0]/GPUGraphicsMemoryOffset[3]=100'
       (Unrecognized attribute name).
ERROR: Error assigning value 80 to attribute 'GPUTargetFanSpeed'
       (Rig02:0[fan:0]) as specified in assignment
       '[fan:0]/GPUTargetFanSpeed=80' (Unknown Error).

Then I tryed to change fan:0 to gpu:0, and have no second error. But fan didn't start.

When I add same commands for gpu1 I have one more error ofr gpu1
Quote
ERROR: Error parsing assignment '[gpu:1]/GPUGraphicsMemoryOffset[3]=100'
       (Unrecognized attribute name).

ERROR: Unable to load info from any available system

ERROR: Error assigning value 80 to attribute 'GPUTargetFanSpeed'
       (Rig02:0[fan:1]) as specified in assignment
       '[fan:1]/GPUTargetFanSpeed=80' (Unknown Error).

What is wrong now?
13  Alternate cryptocurrencies / Mining (Altcoins) / Re: HOW TO SET UP OVERCLOCKING AND FAN CONTROL ON UBUNTU 16.04 FOR NVIDIA CARDS on: June 17, 2017, 06:07:47 PM
Thanks a lot, for you guide.
I tryied to do it step by step. Three times. But had no succsesfull.
First difference is - after install Ubuntu (ubuntu-16.04.2-desktop-amd64), when I enable nvidia driver first time, I already have last version of nvidia drivers. I can't install  367.57 . Is it ok?
After install nvidia drivers I can open nvidia settings, but i don't know where to do to "And X Server Configuration and save the configuration file. " I tryed to reboot and after that I can see temps, fans rpm, clock of gpu's.
So then, when I disabled nvidia driver and enabled Nouveau driver, I start to install last nvidia driver one more time. One time I had error that because of enabled Nouveau driver, it can not install nvidia drivers. Is my job right?
After succesfull instalation cuda (without drivers) I tryed to overclock gpu, and have a lot of eerors. Failed to connect to Mir: Failed to connect to server socket: No such file or directory. Unable to init server: Could not connect: Connection refused. I tryed to install mir, but it was a bad idea.
What am I doing wrong? Can you give me some help?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!