Beispiel #1
0
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
from cgminer.api import Machine
import json
import pprint
from pkg_resources import parse_version

HOST = '127.0.0.1'
PORT = 4028

m = Machine(HOST, PORT)

commands = ['version', 'config', 'summary', 'pools', 'devs', 'devdetails', 'stats']

for cmd in commands:
    section = cmd.upper()
    data = m.call(cmd)
    print section.join(('\n=========== ',' ==========='))
    pp = pprint.PrettyPrinter(indent=2)
    pp.pprint(data[section])
Beispiel #2
0
# -*- coding: utf-8 -*-
from cgminer.api import Machine
import json
import pprint
from pkg_resources import parse_version

HOST = '192.168.1.102'
PORT = 4028

m = Machine(HOST, PORT)
cmd = 'devs'
param = ''

data = m.call(cmd, param)
section = cmd.upper()
print "%s, %s".join(('=========== ',' ===========')) % (section, param)

pp = pprint.PrettyPrinter(indent=2)
pp.pprint(data)

commands = ['version', 'config', 'summary', 'devs', 'devdetails', 'stats']

for cmd in commands:
    section = cmd.upper()
    
    data = m.call(cmd)
    print section.join(('\n=========== ',' ==========='))
    
    pp = pprint.PrettyPrinter(indent=2)
    pp.pprint(data[section][0])
Beispiel #3
0
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
from cgminer.api import Machine
import json
import pprint
from pkg_resources import parse_version
import sys

m = Machine('127.0.0.1', 4028)

config = False
if len(sys.argv) > 1:
    if sys.argv[1] == 'config':
        config = True

summary_data = m.call('summary')['SUMMARY'][0]

label = 'accepted'
print('multigraph cgminer_accepted')
if config:
    print('graph_title Cgminer Accepted')
    print('graph_category gpu')
    print('graph_vlabel accepted per minute')
    print('graph_scale no')
    print('graph_period minute')
    print(label + '.label ' + label)
    print(label + '.draw AREA')
    print(label + '.type DERIVE')
    print(label + '.min 0')
    print(label + '.colour 0040FF')
else:
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
from cgminer.api import Machine
import json
import pprint
from pkg_resources import parse_version

HOST = '127.0.0.1'
PORT = 4028

m = Machine(HOST, PORT)

commands = [
    'version', 'config', 'summary', 'pools', 'devs', 'devdetails', 'stats'
]

for cmd in commands:
    section = cmd.upper()
    data = m.call(cmd)
    print section.join(('\n=========== ', ' ==========='))
    pp = pprint.PrettyPrinter(indent=2)
    pp.pprint(data[section])
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
from cgminer.api import Machine
import json
import pprint
from pkg_resources import parse_version
import sys

m = Machine('127.0.0.1', 4028)

config = False
if len(sys.argv) > 1:
    if sys.argv[1] == 'config':
        config = True

summary_data = m.call('summary')['SUMMARY'][0]

label = 'accepted'
print('multigraph cgminer_accepted')
if config:
    print('graph_title Cgminer Accepted')
    print('graph_category gpu')
    print('graph_vlabel accepted per minute')
    print('graph_scale no')
    print('graph_period minute')
    print(label + '.label ' + label)
    print(label + '.draw AREA')
    print(label + '.type DERIVE')
    print(label + '.min 0')
    print(label + '.colour 0040FF')
else: