Title: Linux bitcoin text tricks Post by: bitcoindaddy on May 26, 2011, 01:31:54 PM These snippets are made to be used in a linux terminal instead of using a browser. I've actually had my system lock up when I started the browser because I was so close to the "edge" when overclocking. They use the linux "watch" command which runs a command periodically over and over. Please don't lower the number of seconds between updates too low when accessing data from someone else's website - you risk having your IP address blocked by the owner.
Show mining progress on Deepbit.net This could be adapted for other pools that provide JSON statistics. The command requires that you replace the xxxxxxxxx stuff with your JSON API token available on this page: https://deepbit.net/settings (https://deepbit.net/settings) Code: curl -s 'http://deepbit.net/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | To show the results continuously, put the command above into a file in /tmp/miningstats, make miningstats executable with "chmod 755 /tmp/miningstats" and use the following command to update it every 60 seconds: Code: sudo -u nobody watch -n 60 /tmp/miningstats Show Current Prices from MtGox Put the following command in /tmp/mtgoxquote: Code: curl -s 'https://mtgox.com/code/data/ticker.php' | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' Show it every 5 minutes in a terminal: Code: sudo -u nobody watch -n 300 /tmp/mtgoxquote Show Wallet Status This will show your balance, the number of connections, etc. Code: watch -n 30 bitcoind getinfo If you have any additional tips, post them here. Title: Re: Linux bitcoin text tricks Post by: Pygy on May 26, 2011, 02:53:57 PM Thanks for sharing :-)
Title: Re: Linux bitcoin text tricks Post by: inh on May 26, 2011, 03:14:01 PM From the linuxcoin thread, I think. Found this in a totally different thread :p
Code: while true; do Title: Re: Linux bitcoin text tricks Post by: a7thson on May 26, 2011, 03:25:31 PM From the linuxcoin thread, I think. Found this in a totally different thread :p Code: while true; do I use this in my scripting (linux, catalyst 11.5) : Code: aticonfig --adapter=0 --odgt | awk '/Temperature/ { print $5 }' You can stick it into a while loop and get the same thing with one less command in the pipeline Title: Re: Linux bitcoin text tricks Post by: Binford 6100 on May 26, 2011, 03:42:09 PM Thanks for sharing :-) +1I'm running a bitcoin deamon for dev/test purposes and a terminal cheat sheet is what i hoped for :) not mining nor trading but still in need to learn how to use it (preferably from terminal) :) Title: Re: Linux bitcoin text tricks Post by: a7thson on May 26, 2011, 04:02:28 PM here's GPU load too
Code: aticonfig --adapter=0 --odgc | awk '/GPU\ load/ { print $4 }' It's more useful just to use as an indicator of mining failure than anything... i.e. Code: #!/bin/sh Title: Re: Linux bitcoin text tricks Post by: inh on May 26, 2011, 05:09:35 PM here's GPU load too Code: aticonfig --adapter=0 --odgc | awk '/GPU\ load/ { print $4 }' It's more useful just to use as an indicator of mining failure than anything... i.e. Code: #!/bin/sh I think I've seen high GPU loads when the system locked up, so i would verify by checking temps. Low temp = obviously not being used :) Title: Re: Linux bitcoin text tricks Post by: frozen on May 26, 2011, 05:30:54 PM btcguild api json tree:
Code: curl -s http://www.btcguild.com/api.php?api_key=PUT_API_KEY_HERE | python -mjson.tool Title: Re: Linux bitcoin text tricks Post by: error on May 26, 2011, 08:21:51 PM Running the script as nobody protects the user from the script author. :P
Title: Re: Linux bitcoin text tricks Post by: inh on June 05, 2011, 01:40:45 PM Here's a modified version of what I posted earlier. It's easier to configure for multiple GPUs.
Code: #!/bin/bash Title: Re: Linux bitcoin text tricks Post by: inh on June 11, 2011, 09:29:38 PM Use tee to be able to see program output on your screen AND log it to a file :)
Title: Re: Linux bitcoin text tricks Post by: supa on June 13, 2011, 02:37:55 PM Copypasta from another thread... Had I known this thread existed, I would've started here. :)
Code: #!/bin/bash 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 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 Title: Re: Linux bitcoin text tricks Post by: LehmanSister on June 14, 2011, 07:58:06 PM I have a script here, as well as a Python class that needs much more work. And I also found a far far better mine monitor as well, all referenced over here:
http://forum.bitcoin.org/index.php?topic=13855.msg210638 |