Bitcoin Forum
May 05, 2024, 01:53:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  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 21, 2017, 09:27:05 PM
The following can be handy for ppl using ssh for their rig. Add to your .bashrc file the following lines:
Code:
#Alias for the screens
alias miner='screen -x miner'
alias temp='screen -x temp'
alias wdog='screen -x wdog'

After the command 'exec bash' or logging out and in again you can type miner / temp / wdog to go to the respective screens directly.

It is better to add in .bash_aliases

There are lots of ways to do things in linux; but yes I agree its putting a square in the rectangle.  Is there any functional difference _Parallax_?

Agree, there is no difference.
Developers are advised to make user settings in a separate file.
2  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 21, 2017, 03:48:57 PM
There is an idea how to more standartize the logs of programs for further processing them in scripts, notifications and monitoring:

I propose to do:

1) Create file  .screenrc in /home/m1 with content:
#
acladd root
multiuser on
logfile flush 1
log on
logfile /tmp/miner.output.tmp
caption always
caption string "%{= RW} $STY | host: %H | For return to terminal press: Ctrl+a d | %m/%d/%y %c:%s | go go to the mooooooon Smiley "
#

2) In the 1bash file, replace the line of the
screen -dmS miner $HCD -S $ETH_POOL -O $ETHADDR:x -U
on
/usr/bin/screen -c /home/m1/.screenrc -l -L -dmS miner $HCD -S $ETH_POOL -O $ETHADDR:x -U

For genoil, I use this script:
telegram.sh
#====================
#!/bin/bash

PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

/usr/bin/tee /tmp/totalhash.log < /dev/null
/usr/bin/tail -n 1 /tmp/miner.log | awk '{print $2}' >> /tmp/totalhash.log

TOKEN=YOU_TELEGRAM_BOT_TOKEN
TOTALHASH="$(/bin/cat /tmp/totalhash.log)"
TARGET="$(/bin/cat /home/m1/target.log)"

FAN=$(/usr/bin/nvidia-smi --query-gpu=fan.speed --format=csv | awk '{print $1}' | tr '\n' ','|sed -e 's/,/  /g' -e 's/, $/\n/')
WATT=$(/usr/bin/nvidia-smi --query-gpu=power.draw --format=csv | awk '{print $1}' | tr '\n' ','|sed -e 's/,/  /g' -e 's/, $/\n/')
TEMP=$(/usr/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv | awk '{print $1}' | tr '\n' ','|sed -e 's/,/  /g' -e 's/, $/\n/')
UPTIME=$(/usr/bin/uptime -p)
sleep 2

if [[ $TARGET > $TOTALHASH ]]; then
    wget -O /dev/null "http://crierbot.appspot.com/${TOKEN}/send?message=Warning!!!
host $(cat /etc/hostname) too slow hash
ip: $(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.1 | cut -d: -f2 | awk '{printf $1}')
$UPTIME
$FAN
$WATT
$TEMP
Total Hash: $TOTALHASH"
    else
        echo > /dev/null
fi

/usr/bin/tee /tmp/miner.log < /dev/null
/usr/bin/tail -n 10 /tmp/miner.output.tmp | grep MH/s | awk '{print $3, $9}' | tr -d MH/s >> /tmp/miner.log
/usr/bin/tee /tmp/miner.output.tmp < /dev/null
#=====================

I created the /home/m1/target.log file and entered the approximate value of HASH for RIG
In crontab, I added the line that is executed every 3 minutes
*/3 *   * * *    m1      /home/m1/telegram.sh

The script compares the value from the /home/m1/target.log file with the value that
the /tmp/totalhash.log receives from the file and if there is a difference, sends me a notification.

I hope that our community optimizes this script and writes more universal, which wil work with all mining programs.



3  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 21, 2017, 02:47:01 PM
The following can be handy for ppl using ssh for their rig. Add to your .bashrc file the following lines:
Code:
#Alias for the screens
alias miner='screen -x miner'
alias temp='screen -x temp'
alias wdog='screen -x wdog'

After the command 'exec bash' or logging out and in again you can type miner / temp / wdog to go to the respective screens directly.

It is better to add in .bash_aliases
4  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0018 on: July 18, 2017, 09:43:09 PM
Hi All,
i made a telegram script to report hash rates and other stats using telegram bot, the stats consists of power draw, temperature and fan speed on my little mining rig.


Hope this script helps...
any suggestion is appreciated Smiley


I use telegram bot for sending allerts from zabbix monitoring system - @crierbot
For using it you need to add @crierbot in to your telegramm  
(if you use android smart phone go to google  play or if use iPhone go to app store, download and install telegram and send command /start )
in replay you will get TOKEN for using in your scripts

My script  /home/m1/telegram.sh  (need to have chmod +x 755)

#!/bin/bash

PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


/usr/bin/curl -s http://localhost:3333 | sed '/ETH/!d; /Total/!d; /Speed/!d;' | awk {'print $6'} | tail -n 1 >> /tmp/totalhash.log

TOKEN=YOUR-TOKEN
TOTALHASH="$(/bin/cat /tmp/totalhash.log)"
TARGET="$(/bin/cat /home/m1/target.log)"

FAN=$(/usr/bin/nvidia-smi --query-gpu=fan.speed --format=csv)
WATT=$(/usr/bin/nvidia-smi --query-gpu=power.draw --format=csv)
TEMP=$(/usr/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv)
GPUHASH=$(curl -s http://localhost:3333  | sed '/GPU/!d; /Mh/!d' | tr -d font'></="#'brcl | awk 'NR==5')

sleep 2

if [[ $TARGET > $TOTALHASH ]]; then
        wget -O /dev/null "http://crierbot.appspot.com/${TOKEN}/send?message=Warning!!!
        host $(cat /etc/hostname) too slow hash
        ip: $(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.1 | cut -d: -f2 | awk '{printf $1}')
            $FAN
            $WATT
            $TEMP
            $GPUHASH
Total Hash: $TOTALHASH"
    else
        echo > /dev/null
fi

tee /tmp/totalhash.log < /dev/null
#

Also in directory /home/m1 you need to create file target.log and put in average value - hash your rig.
Then you need to add the record in /etc/crontab
0-59 *  * * *   m1      /home/m1/telegram.sh

This script fullfils once in a minute and checks the descriase of total hash.  
If it descriases it sends message where hostname, IP adress, fan speed, watt, temp and hash of every GPU is shown.
5  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0017 on: July 14, 2017, 04:34:05 AM
I will release v0018 soon.  Currently you must reimage to upgrade; I will add an updater in a later version.

Hi fullzero, add please to v0018 a monitoring agent for zabbix.
Here https://pastebin.com/raw/pXDwWiS3 is the configuration file zabbix_agentd.conf

I created the necessary metrics for 10 GPUs.
The agent will send the metrics to the server with the IP Address 192.168.10.100
I'll try to add a customization guide.

Briefly: I take the Temrature and the hash from the Claymore
The power consumption of the GPU from the utility nvidia-smi

The result of the metrics is this:
curl -s http://localhost:3333 | sed '/GPU/!d; /Mh/!d;' | awk '{print $13}' | awk 'NR == 1'
curl -s http://localhost:3333 | sed '/Total/!d; /Speed/!d;' | awk '{print $6}' | awk 'NR == 3'
curl -s  http://localhost:3333 | awk '/t=/ {print $12}' | tr -d t=C | awk 'NR == 1'
nvidia-smi | grep % | awk '{print $5}' | tr -d W | awk 'NR==4'


My dashboard: https://photouploads.com/image/Bv1


PS: You need to install the latest package zabbix_agentd 3.2.6

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb

sudo apt-get update
sudo apt-get install zabbix-agent

Thank you, and sorry for my english.


Was already 50% complete with v0018 upload when I saw this.  Can you give me the link to the zabbix source code?

This looks interesting.

https://www.zabbix.com/download
https://github.com/zabbix
6  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0017 on: July 14, 2017, 01:34:46 AM
I will release v0018 soon.  Currently you must reimage to upgrade; I will add an updater in a later version.

Hi fullzero, add please to v0018 a monitoring agent for zabbix.
Here https://pastebin.com/raw/pXDwWiS3 is the configuration file zabbix_agentd.conf

I created the necessary metrics for 10 GPUs.
The agent will send the metrics to the server with the IP Address 192.168.10.100
I'll try to add a customization guide.

Briefly: I take the Temrature and the hash from the Claymore
The power consumption of the GPU from the utility nvidia-smi

The result of the metrics is this:
curl -s http://localhost:3333 | sed '/GPU/!d; /Mh/!d;' | awk '{print $13}' | awk 'NR == 1'
curl -s http://localhost:3333 | sed '/Total/!d; /Speed/!d;' | awk '{print $6}' | awk 'NR == 3'
curl -s  http://localhost:3333 | awk '/t=/ {print $12}' | tr -d t=C | awk 'NR == 1'
nvidia-smi | grep % | awk '{print $5}' | tr -d W | awk 'NR==4'


My dashboard: https://photouploads.com/image/Bv1


PS: You need to install the latest package zabbix_agentd 3.2.6

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb

sudo apt-get update
sudo apt-get install zabbix-agent

Thank you, and sorry for my english.
7  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0017 on: July 12, 2017, 12:14:36 PM

Please provide me with:

# IAmNotAJeep BTC address:  <not yet provided>
# Maxximus007 BTC address:  <not yet provided>
# _Parallax_ BTC address:  <not yet provided>



It's great to see everyone get involved and speaking for myself, to feel like it's OK to contribute once in a while as well.
Hats off to fullzero, Maxximus007 and _Parallax_!

Here you go:
# IAmNotAJeep BTC address:  <13PnEKpfVzNseWkrm6LoueKcCMPj74zPv7>


First of all I want to thank Fullzero and our community.
Thank you for all your reviews. I'm very pleased.
# _Parallax_ BTC address:  <329k8rDgxHHcHAEXfwznqv25Go5LERGWLp>
8  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining on: June 30, 2017, 08:39:13 PM
Fullzero thanks for detailed instruction of my idea and including it into nvOS v0017

here are some operations for image space releasing:

sudo apt update
sudo apt upgrade

===skip===

it allows to desсrease size image on 2++Gb


PS:I would like to add monitoring system into your project.
Now, I'm choosing from zabbix, munin and cacti. What would you advice?

@_Parallax_

Code:
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
will do all of that in a single line
or install byobu then you can run `sudo purge-old-kernels`

I use zabbix with grafana. Gives me telegram alerts and pretty graphs
 
*edit, forgot the closing )
Excellent example, thanks!

Could you show how did you install setting  of zabbix and grafana?
9  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining on: June 29, 2017, 10:00:31 PM
Fullzero thanks for detailed instruction of my idea and including it into nvOS v0017

here are some operations for image space releasing:

sudo apt update
sudo apt upgrade

sudo du -sh /var/cache/apt/archives
sudo apt-get clean

sudo apt-get autoremove
if after such operation we have such mistake as:
===
Errors were encountered while processing:
 linux-image-extra-4.4.0-65-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
===
we need to delete all failes manually:
ls /var/lib/dpkg/info/ | grep linux-image | grep 4.4.0-65

exactly:
====
linux-image-4.4.0-65-generic.list
linux-image-4.4.0-65-generic.postrm
linux-image-extra-4.4.0-65-generic.list
linux-image-extra-4.4.0-65-generic.md5sums
linux-image-extra-4.4.0-65-generic.postinst
linux-image-extra-4.4.0-65-generic.postrm
====

cd /var/lib/dpkg/info/
sudo rm linux-image-4.4.0-65-generic.list
sudo rm linux-image-4.4.0-65-generic.postrm
sudo rm linux-image-extra-4.4.0-65-generic.list
sudo rm linux-image-extra-4.4.0-65-generic.md5sums
sudo rm linux-image-extra-4.4.0-65-generic.postinst
sudo rm linux-image-extra-4.4.0-65-generic.postrm

repeat the command:

sudo apt-get autoremove

have to delete non usable linux-image in system

dpkg --list | grep linux-image

sudo apt-get purge linux-image-4.4.0-{31,59,62,64,65,66,72,75,78,79}
sudo apt-get purge linux-image-extra-4.4.0-31-generic
sudo apt-get purge linux-image-extra-4.4.0-31-generic
sudo apt-get purge linux-image-extra-4.4.0-59-generic
sudo apt-get purge linux-image-extra-4.4.0-62-generic
sudo apt-get purge linux-image-extra-4.4.0-64-generic
sudo apt-get purge linux-image-extra-4.4.0-66-generic
sudo apt-get purge linux-image-extra-4.4.0-72-generic
sudo apt-get purge linux-image-extra-4.4.0-75-generic
sudo apt-get purge linux-image-extra-4.4.0-78-generic
sudo apt-get purge linux-image-extra-4.4.0-79-generic

then exsecute

sudo apt-get -f install
sudo dpkg --configure -a

it allows to desсrease size image on 2++Gb


PS:I would like to add monitoring system into your project.
Now, I'm choosing from zabbix, munin and cacti. What would you advice?
10  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining on: June 26, 2017, 11:11:23 AM
EDIT: Also, is there a way for remote controlling all rigs on nvOC? Like if I update oneBash to update it on all rigs at the same time?

Quite a newbie with Linux Smiley

go to web site https://pastebin.com/ and create paste

edit "2unix" file on every mining rig    (nano  /home/m1/2unix)
paste this line: (see raw link on your pastebin service)

#!/bin/bash

cd /tmp
wget https://pastebin.com/raw/JkzeVvZS (change_this)
cp JkzeVvZS(change_this) /home/m1/oneBash

sudo dos2unix /home/m1/oneBash
sleep 2
sudo ldconfig /usr/local/cuda/lib64
bash '/home/m1/oneBash'

and reboot your rig

ps: sorry, my english is bad (

So that will help me update oneBash on all rigs at once?
Yep
11  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining on: June 26, 2017, 10:53:20 AM
I have more than 10+ rigs
I made some changes in to file oneBash


#!/bin/bash

HOSTNAME=$(cat /etc/hostname)
worker=$(echo ${HOSTNAME:0:2})


# nvOC v0016 by fullzero
#
#==================
#
# set YOUR ADDRESSES, WORKERS, POOL and PORT:
ZEC_WORKER=$worker
#
#==================
#
ZCL_WORKER=$worker
#
#==================
#
ZEN_WORKER=$worker"
#
#==================
#
VTC_WORKER=$worker"
#
#==================
#
NICE_WORKER=$worker
#
#==================
#
LBC_WORKER=$worker"
#

etc

These changes allow to bind hostname to workers.
In order it to work, you need to change 2 files 'hostname' and 'hosts'


/etc/hosts
#
127.0.0.1       localhost
127.0.1.1       m5-desktop


/etc/hostname
#
m5-desktop



The resulte of this changes, on LBC expamle:

/home/m1/SPccminer/ccminer -a lbry -o stratum+tcp://lbry.suprnova.cc:6256 -u fullzero22.m5 -p x


PS: Fullzero, thanks for your work, it is an amazing project!!!
12  Alternate cryptocurrencies / Mining (Altcoins) / Re: [OS] nvOC easy-to-use Linux Nvidia Mining on: June 26, 2017, 10:14:20 AM
EDIT: Also, is there a way for remote controlling all rigs on nvOC? Like if I update oneBash to update it on all rigs at the same time?

Quite a newbie with Linux Smiley

go to web site https://pastebin.com/ and create paste

edit "2unix" file on every mining rig    (nano  /home/m1/2unix)
paste this line: (see raw link on your pastebin service)

#!/bin/bash

cd /tmp
wget https://pastebin.com/raw/JkzeVvZS (change_this)
cp JkzeVvZS(change_this) /home/m1/oneBash

sudo dos2unix /home/m1/oneBash
sleep 2
sudo ldconfig /usr/local/cuda/lib64
bash '/home/m1/oneBash'

and reboot your rig

ps: sorry, my english is bad (
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!