Bitcoin Forum
June 15, 2024, 07:59:39 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining / Silly linux scripts and tricks on: June 13, 2011, 06:46:06 AM
Code:
#!/bin/bash
while [ 1 ]; do
        echo "<html><head><meta http-equiv=\"refresh\" content=\"5\"/><body>$(aticonfig --adapter=all --odgt | sed ':a;N;$!ba;s/\n/<br\/>/g')<body></html>" | nc -l 9001
done

I realized we have a lot of new Linux users out there, so here's a simple script to keep you away from the GUI.

Put the above in a file, chmod u+x it, run it.  That's it.  Connect with a browser to whatever the host is, port 9001.

Requires netcat (nc).

Feel free to replace "aticonfig --adapter=all --odgt" with whatever you like - use tee to redirect your miner output or whatever you want to a file, then push that through netcat.

Let's say you've got a script called startminer.sh that starts poclbm (or whatever).  You can use the following to start it:

startminer.sh | tee -a minerlog.log

Then use -
Code:
#!/bin/bash
while [ 1 ]; do
        echo "<html><head><meta http-equiv=\"refresh\" content=\"5\"/><body>$(sed ':a;N;$!ba;s/\n/<br\/>/g' < minerlog.log)<body></html>" | nc -l 9001
done

For ssh sessions, don't forget that happy watch command -
watch -n 1 aticonfig --adapter=all --odgt

Will continuously print to the screen the output from aticonfig every 1 second.

And finally, if you're using eligius, don't forget there are both EU and US servers.

I haven't been able to test the following script... eligius servers haven't gone down.  But the idea is if you had a line in your /etc/hosts like:

173.242.112.67 eligius.mining

And pointed a miner at http://eligius.mining:8337 while the script below ran..... if the hashrate for that server hit 0 or was otherwise unreachable it should "failover" to the other server.

Code:
#!/bin/bash

EUHTTP="http://eligius.st/~luke-jr/raw/eu/hashrate.txt"
USHTTP="http://eligius.st/~luke-jr/raw/us/hashrate.txt"

EUIP="85.25.78.8"
USIP="173.242.112.67"

export EUIP
export USIP

CURRENT=$USHTTP

echo $EUIP
echo $USIP

while [ 1 == 1 ]; do
echo "Checking..."

HR=$(wget -q -O - $CURRENT)

if [ -z "$HR" ]
then
HR="0"
fi

echo "Hashrate $HR"

if [ $CURRENT == $USHTTP ]
then
if [ $HR == 0 ]
then
cp /etc/hosts /tmp/hosts
sed s/$USIP/$EUIP/ < /tmp/hosts > /etc/hosts
echo "Switched to Europe."
CURRENT=$EUHTTP
fi
elif [ $CURRENT == $EUHTTP ]
then
if [ $HR == 0 ]
then
cp /etc/hosts /tmp/hosts
sed s/$EUIP/$USIP/ < /tmp/hosts > /etc/hosts
echo "Switched to US."
CURRENT=$USHTTP
fi
fi
sleep 5m
done
2  Other / Meta / New subforum suggestion - Entertainment on: June 13, 2011, 01:43:03 AM
For threads like this -

MORE DDoS on Deepbit?
http://forum.bitcoin.org/index.php?topic=15318.0

I bet there's a guy . . .
http://forum.bitcoin.org/index.php?topic=16030.0

Anyone have an explanation for the growing "anonymous" pool of miners?
http://forum.bitcoin.org/index.php?topic=15761.0

* No offense to the thread starts, of course, but the content of the thread quickly shifted into entertainment. Smiley
.... not to mention most of these belong elsewhere, anyway - such as Bitcoin Discussion.

Alternate names for the Entertainment subforum could include:

"I think this is funny and someone will take it seriously"

"CONSPIRACY THEORY - Starring Mel Gibson and Patrick Stewart"

"Wildly illogical rants about Deepbit aka 51% Conspiracy aka The Government is Double-spending by Using Mind Rays on Tycho"

"Complexity Is Directly Related to Price per Coin"

"Proselytize KWh" aka "Cult of the Kill-a-Watt" aka "Paying $0 for CPU mining - you can't explain that" aka "You'll get fired for distributed processing projects on PCs that aren't in your home!"

"I think my pool is cheating me even though the statistics and costs are clearly printed somewhere"

"OMG a young market is shifting!"

"I just got here - am I rich yet?"

.... and finally -

"I have absolutely not professional I.T. experience and have been alive for fewer years than Linux but it's pretty much the facts that I know better than you - PS who has infrastructure larger than a few PCs in their bedroom?"
3  Bitcoin / Mining / Pool hopping - I'm 12 and what is this? on: June 06, 2011, 06:18:58 AM
I keep seeing people complain about "pool hoppers."

Someone please explain to me why this is bad.  PM if it's really bad.

I'm not that much into pool-politics and other woes, but I am considering releasing a doohickey that potentially does bad things (automatically hops).

As far as I can tell, I do get more bitcoins but I don't put in any more/less work.  It just allows me to participate in more smaller payouts on each pool rather than hoping a single pool maintains it's "luck."

Edit and PS - I'm not actually 12.  I posted that before I realized people may not get the reference.
4  Bitcoin / Mining / Help me out with variance in parallel, block size, etc on: June 03, 2011, 08:25:59 PM

Similar to pool hopping, I was questioning a parallel request versus more serial sequences.

Using simple numbers, let's say that I have one box (be it FPGA, desktop, CPU or GPU) that mines 1MHs.  If I magically increased the speed to 5MHs, I am doing work requests for individual blocks and processing that work in a serial manner (that is, on a single processing source with no threads/timeslicing/multicore/multiprocessor).

If I instead had 5 x 1MHs boxes, I would be doing 5 times the number of requests in parallel.

Regardless of power and other factors... if I hear someone try to proselytize KWh/cost one more time I'm seriously going to have a breakdown.... what do you think the variance would be in these methods?

In small experiments (100MHs) over two months, I seem to have received more payouts with parallel computation rather than a single source of equal computation.  Given that it could be pure coincidence, I was wondering if there is a possible justifiable explanation as to why which would be better (other than KW/h nonsense).

There is the obvious benefit of health to the Bitcoin network if the parallel sources are co-located.  That is, if I have 100MHs in my bedroom, it's much better for the health of the network if I have 100 x 1 nodes scattered across datacenters.  Consider me more of a philanthropist than redbull-fueled-overclocking-profit-rabid-miner.
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!