

def start_dstat():
    tmpdir = tempfile.mkdtemp()
    path = os.path.join(tmpdir, 'dstat.pipe')
    os.mkfifo(path)
    proc = subprocess.Popen(['dstat', '-cdngy', '--output', '{0}'.format(path)])
    return (proc.pid, path)

dataset/ETHPy150Open cloudera/kudu-examples/python/dstat-kudu/kudu_dstat.py start_dstat/original