def get_mem_info():
    if not sys.platform.startswith('linux'):
        raise RuntimeError("Memory information implemented only for Linux")

    info = {}
    with open('/proc/meminfo', 'r') as f:
        for line in f:
            p = line.split()
            info[p[0].strip(':').lower()] = float(p[1]) * 1e3
    return info
.. versionadded:: 2016.3.0
dataset/ETHPy150Open scipy/scipy/benchmarks/benchmarks/common.py/get_mem_info--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/zpool.py/history