def METHOD_NAME(path, name):
    output = _run_command([path, 'status', name])
    for line in output.splitlines():
        bits = line.split()
        if bits and bits[0] == 'Leader:':
            return int(bits[1])
    raise Error("could not find PID from machinectl output.\n%s", output)