def get_cpuinfo():
    cmd = ["/usr/sbin/sysctl", "-n", "machdep.cpu.brand_string"]
    proc = subprocess.Popen(
        cmd,
        shell=False,
        bufsize=-1,
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    (output, unused_error) = proc.communicate()
    output = output.strip()
    return output.decode("utf-8")