Created
July 19, 2010 14:18
-
-
Save jrabbit/481458 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pygooglechart import Chart | |
from pygooglechart import SimpleLineChart | |
from pygooglechart import Axis | |
from subprocess import * | |
import platform | |
max_y = 2000 | |
# Chart size of 200x125 pixels and specifying the range for the Y axis | |
chart = SimpleLineChart(200, 125, y_range=[0, max_y]) | |
# grep khash ~/.bitcoin/debug.log | |
#linux | |
if platform.system() == 'Linux': | |
log = '~/.bitcoin/debug.log' | |
elif platform.system() == 'Darwin': | |
log = '~/Library/Application Support/Bitcoin/debug.log' | |
elif platform.system() == 'Windows': | |
log = "%%appdata%%\Bitcoin\debug.log" | |
else: | |
log = '~/.bitcoin/debug.log' | |
debug = Popen(['grep', 'khash', log], stdout=PIPE).communicate()[0] | |
data = {} | |
for line in debug: | |
#07/19/2010 13:05 hashmeter 3 CPUs 1466 khash/s | |
# Date time hashmeter #cpus hash/s | |
print line.split('\t')[-1] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment