From 3352f847704718c43f346b781725e4ff8b2112de Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 18 Jun 2011 17:06:11 +0200 Subject: mining/: added all mining scripts and configs mining/Makefile: format - how to format the usb stick (or hard drive) install - installs all necessary components, writes ati_license, copies files in home dir configure - how to configure the miner mining/user/*: files to be dumped in the miners home directory --- mining/user/.config/autostart/startup.desktop | 6 ++++++ mining/user/mining.odvr | 16 ++++++++++++++++ mining/user/startup.sh | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 mining/user/.config/autostart/startup.desktop create mode 100644 mining/user/mining.odvr create mode 100644 mining/user/startup.sh (limited to 'mining/user') diff --git a/mining/user/.config/autostart/startup.desktop b/mining/user/.config/autostart/startup.desktop new file mode 100644 index 00000000..67c35ef8 --- /dev/null +++ b/mining/user/.config/autostart/startup.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=LXDE Autostart +Exec=/home/user/startup.sh +Terminal=true +Type=Application +Categories=Configuration diff --git a/mining/user/mining.odvr b/mining/user/mining.odvr new file mode 100644 index 00000000..d6cf6fec --- /dev/null +++ b/mining/user/mining.odvr @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/mining/user/startup.sh b/mining/user/startup.sh new file mode 100644 index 00000000..c330b984 --- /dev/null +++ b/mining/user/startup.sh @@ -0,0 +1,16 @@ +sudo pkill xscreensaver +sudo pkill tmux +sleep 1 +export DISPLAY=:0 + +export URL="http://txgen_chinaman:lolwut@uk.btcguild.com:8332" +#export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334" +slock & +tmux start-server +tmux new-session -d -s mining -n mining +printenv > /home/user/environment +tmux new-window -t mining:1 'AMDOverdriveCtrl -i 0 mining.ovdr' +tmux new-window -t mining:2 'AMDOverdriveCtrl -i 3 mining.ovdr' +sleep 5 +tmux new-window -t mining:3 "cd /opt/miners/phoenix; while sleep 1; do sudo python phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" +tmux new-window -t mining:4 "cd /opt/miners/phoenix; while sleep 1;do sudo python phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=10 FASTLOOPS=false ; done" -- cgit v1.2.3 From ae413040ff37f6d3a2e2fe06162851c09c089ea3 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 21 Jun 2011 21:19:01 +0200 Subject: mining/user/mining.o{dv -> vd}r --- mining/user/mining.odvr | 16 ---------------- mining/user/mining.ovdr | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 mining/user/mining.odvr create mode 100644 mining/user/mining.ovdr (limited to 'mining/user') diff --git a/mining/user/mining.odvr b/mining/user/mining.odvr deleted file mode 100644 index d6cf6fec..00000000 --- a/mining/user/mining.odvr +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/mining/user/mining.ovdr b/mining/user/mining.ovdr new file mode 100644 index 00000000..d6cf6fec --- /dev/null +++ b/mining/user/mining.ovdr @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 7e6e4bcc68777aa7ddd7b925167dfd40c3ffed3a Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Wed, 22 Jun 2011 00:05:54 +0200 Subject: added ati_temper --- mining/user/bin/ati_temper | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 mining/user/bin/ati_temper (limited to 'mining/user') diff --git a/mining/user/bin/ati_temper b/mining/user/bin/ati_temper new file mode 100755 index 00000000..283a6024 --- /dev/null +++ b/mining/user/bin/ati_temper @@ -0,0 +1,5 @@ +#displays: CARD1TEMP CARD2TEMP CPUTEMP OUTSIDE +echo -n "`DISPLAY=:0 aticonfig --adapter=1 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " +echo -n "`DISPLAY=:0 aticonfig --adapter=2 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " +echo -n "`sensors | grep temp1 | sed -e 's/temp1: *+\([0-9.]*\).*/\1/'` " +echo "`temper`" -- cgit v1.2.3 From 8f900fff02ac22ba87c35e6745af11c0b8d98855 Mon Sep 17 00:00:00 2001 From: user Date: Wed, 22 Jun 2011 00:19:00 +0000 Subject: mining/user/startup.sh: use URL from env --- mining/user/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mining/user') diff --git a/mining/user/startup.sh b/mining/user/startup.sh index c330b984..eb2ce13a 100644 --- a/mining/user/startup.sh +++ b/mining/user/startup.sh @@ -3,7 +3,7 @@ sudo pkill tmux sleep 1 export DISPLAY=:0 -export URL="http://txgen_chinaman:lolwut@uk.btcguild.com:8332" +export URL="${URL-http://txgen_chinaman:lolwut@uk.btcguild.com:8332}" #export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334" slock & tmux start-server -- cgit v1.2.3 From 52237fa9912ac06ce89a1e61f8fde4d1a44cf828 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 3 Jul 2011 06:37:25 +0000 Subject: add mining/user/bin/ensure-wlan0 usage: combine this with cron to ensure wlan0 --- mining/user/bin/ensure-wlan0 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 mining/user/bin/ensure-wlan0 (limited to 'mining/user') diff --git a/mining/user/bin/ensure-wlan0 b/mining/user/bin/ensure-wlan0 new file mode 100755 index 00000000..92839a13 --- /dev/null +++ b/mining/user/bin/ensure-wlan0 @@ -0,0 +1,32 @@ +#! /bin/sh + +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi + +if ! ifconfig wlan0 | grep -q 'inet addr'; then + if ! grep -q wlan0 /etc/network/interfaces; then + cat >> /etc/network/interfaces < Date: Sun, 3 Jul 2011 06:43:01 +0000 Subject: add mining/user/bin/cleanup_tmp usage: combine this with cron to clean miner's .so-files from /tmp this was required @bergwerk to prevent filling up the tmpfs what stopped the miner... --- mining/user/bin/cleanup_tmp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 mining/user/bin/cleanup_tmp (limited to 'mining/user') diff --git a/mining/user/bin/cleanup_tmp b/mining/user/bin/cleanup_tmp new file mode 100755 index 00000000..e1395b19 --- /dev/null +++ b/mining/user/bin/cleanup_tmp @@ -0,0 +1,4 @@ +#! /bin/sh +ls -lAtr /tmp/ | sed -rn ' + /\.so$/{$!{s/.* ([A-Za-z0-9]+\.so)$/rm -v \/tmp\/\1/p}} +' | sudo sh -- cgit v1.2.3 From a754e3b290201f354f273628f65d811ca943c15a Mon Sep 17 00:00:00 2001 From: user Date: Fri, 8 Jul 2011 05:41:00 +0000 Subject: add mining/user/bin/ensure-router --- mining/user/bin/ensure-router | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 mining/user/bin/ensure-router (limited to 'mining/user') diff --git a/mining/user/bin/ensure-router b/mining/user/bin/ensure-router new file mode 100755 index 00000000..987ed5b1 --- /dev/null +++ b/mining/user/bin/ensure-router @@ -0,0 +1,25 @@ +#! /bin/sh + +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi + +if=eth2 + +if ! ifconfig $if | grep -q 'inet addr'; then + beep -l 50 -f 2500; ifconfig $if 0.0.0.0 down || : + beep -l 50 -f 2500; ifconfig $if 23.0.0.1/8 up || : + beep -l 50 -f 2500; /etc/init.d/dnsmasq restart + if ifconfig $if | grep -q 'inet addr'; then + beep -l 50 -f 2500 -n -l 100 -f 3000 + else + beep -l 50 -f 2500 -n -l 100 -f 1000 + fi +else + case "${1-}" in + (--quiet) : ;; + (*) beep -l 50 -f 2500 -n -l 100 -f 2500 ;; + esac +fi -- cgit v1.2.3 From 615f11da5f781e817d016afebed8ac26ed6c83e7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Jul 2011 06:34:05 +0000 Subject: masquerade wlan0, eth2 --- mining/user/bin/ensure-router | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mining/user') diff --git a/mining/user/bin/ensure-router b/mining/user/bin/ensure-router index 987ed5b1..ec78f610 100755 --- a/mining/user/bin/ensure-router +++ b/mining/user/bin/ensure-router @@ -12,6 +12,8 @@ if ! ifconfig $if | grep -q 'inet addr'; then beep -l 50 -f 2500; ifconfig $if 0.0.0.0 down || : beep -l 50 -f 2500; ifconfig $if 23.0.0.1/8 up || : beep -l 50 -f 2500; /etc/init.d/dnsmasq restart + beep -l 50 -f 2500; iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE + beep -l 50 -f 2500; iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE if ifconfig $if | grep -q 'inet addr'; then beep -l 50 -f 2500 -n -l 100 -f 3000 else -- cgit v1.2.3 From e03dc47d843f4ee351f59528bed7d8d581f827f7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Jul 2011 17:24:48 +0200 Subject: mining: added archlinux cruise control mining/Makefile: added archlinux cruise control (auto installer) which always does the right thing. loosely after http://rubyists.github.com/2011/06/08/how-to-build-a-namecoin-or-bitcoin-miner-in98-easy-steps.html mining/{user/,}/bin:renamed mining/bin/newkey.sh: add policy Xorg keygen --- mining/user/bin/ati_temper | 5 ----- mining/user/bin/cleanup_tmp | 4 ---- mining/user/bin/ensure-router | 27 --------------------------- mining/user/bin/ensure-wlan0 | 32 -------------------------------- 4 files changed, 68 deletions(-) delete mode 100755 mining/user/bin/ati_temper delete mode 100755 mining/user/bin/cleanup_tmp delete mode 100755 mining/user/bin/ensure-router delete mode 100755 mining/user/bin/ensure-wlan0 (limited to 'mining/user') diff --git a/mining/user/bin/ati_temper b/mining/user/bin/ati_temper deleted file mode 100755 index 283a6024..00000000 --- a/mining/user/bin/ati_temper +++ /dev/null @@ -1,5 +0,0 @@ -#displays: CARD1TEMP CARD2TEMP CPUTEMP OUTSIDE -echo -n "`DISPLAY=:0 aticonfig --adapter=1 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " -echo -n "`DISPLAY=:0 aticonfig --adapter=2 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " -echo -n "`sensors | grep temp1 | sed -e 's/temp1: *+\([0-9.]*\).*/\1/'` " -echo "`temper`" diff --git a/mining/user/bin/cleanup_tmp b/mining/user/bin/cleanup_tmp deleted file mode 100755 index e1395b19..00000000 --- a/mining/user/bin/cleanup_tmp +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -ls -lAtr /tmp/ | sed -rn ' - /\.so$/{$!{s/.* ([A-Za-z0-9]+\.so)$/rm -v \/tmp\/\1/p}} -' | sudo sh diff --git a/mining/user/bin/ensure-router b/mining/user/bin/ensure-router deleted file mode 100755 index ec78f610..00000000 --- a/mining/user/bin/ensure-router +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh - -if test "${nosudo-false}" != true -a `id -u` != 0; then - echo "we're going sudo..." >&2 - exec sudo "$0" "$@" - exit 23 # go to hell -fi - -if=eth2 - -if ! ifconfig $if | grep -q 'inet addr'; then - beep -l 50 -f 2500; ifconfig $if 0.0.0.0 down || : - beep -l 50 -f 2500; ifconfig $if 23.0.0.1/8 up || : - beep -l 50 -f 2500; /etc/init.d/dnsmasq restart - beep -l 50 -f 2500; iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE - beep -l 50 -f 2500; iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE - if ifconfig $if | grep -q 'inet addr'; then - beep -l 50 -f 2500 -n -l 100 -f 3000 - else - beep -l 50 -f 2500 -n -l 100 -f 1000 - fi -else - case "${1-}" in - (--quiet) : ;; - (*) beep -l 50 -f 2500 -n -l 100 -f 2500 ;; - esac -fi diff --git a/mining/user/bin/ensure-wlan0 b/mining/user/bin/ensure-wlan0 deleted file mode 100755 index 92839a13..00000000 --- a/mining/user/bin/ensure-wlan0 +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -if test "${nosudo-false}" != true -a `id -u` != 0; then - echo "we're going sudo..." >&2 - exec sudo "$0" "$@" - exit 23 # go to hell -fi - -if ! ifconfig wlan0 | grep -q 'inet addr'; then - if ! grep -q wlan0 /etc/network/interfaces; then - cat >> /etc/network/interfaces < Date: Sun, 10 Jul 2011 06:23:22 +0200 Subject: updated cruise control, now incompatible with linucCoin! mining/bin/newkey.sh: unused because slime is now in place mining/user/startup.sh: edited paths to miner, NOW INCOMPATIBLE with linucCoin (sucked anyway) temper/Makefile: fixed issue when installing temper (lose suid bit) --- mining/user/startup.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) mode change 100644 => 100755 mining/user/startup.sh (limited to 'mining/user') diff --git a/mining/user/startup.sh b/mining/user/startup.sh old mode 100644 new mode 100755 index eb2ce13a..6274a892 --- a/mining/user/startup.sh +++ b/mining/user/startup.sh @@ -1,16 +1,13 @@ -sudo pkill xscreensaver sudo pkill tmux -sleep 1 +sleep 5 +source ~/.profile export DISPLAY=:0 - export URL="${URL-http://txgen_chinaman:lolwut@uk.btcguild.com:8332}" #export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334" -slock & tmux start-server tmux new-session -d -s mining -n mining -printenv > /home/user/environment -tmux new-window -t mining:1 'AMDOverdriveCtrl -i 0 mining.ovdr' -tmux new-window -t mining:2 'AMDOverdriveCtrl -i 3 mining.ovdr' +tmux new-window -t mining:1 'cd ~;AMDOverdriveCtrl -i 0 mining.ovdr' +tmux new-window -t mining:2 'cd ~;AMDOverdriveCtrl -i 3 mining.ovdr' sleep 5 -tmux new-window -t mining:3 "cd /opt/miners/phoenix; while sleep 1; do sudo python phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" -tmux new-window -t mining:4 "cd /opt/miners/phoenix; while sleep 1;do sudo python phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=10 FASTLOOPS=false ; done" +tmux new-window -t mining:3 "cd /usr/src/phoenix-miner/; while sleep 1; do sudo ./phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" +tmux new-window -t mining:4 "cd /usr/src/phoenix-miner/; while sleep 1; do sudo ./phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" -- cgit v1.2.3