def main():
    host = Host()
    hostname = node().split('.')[0]

    graphite = Carbon(CARBON_SERVER, CARBON_PORT);

    while True:
        data = host.get_all()
        for datum in data:
            metric = "system.%s.%s" % (hostname, datum)
            if "-debug" in argv: print metric
            graphite.send(metric)
        sleep(DELAY)
dataset/ETHPy150Open tmm1/graphite/contrib/demo-collector.py/main/original