test_05_AffinityDeployments.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def get_numa_spec():
    maxnode=0
    maxcpu=1
    numasupport=False
    try:
        lines = [line.rstrip() for line in os.popen('numactl --show')]
        if len(lines) > 0 : numasupport=True
        for l in lines:
            if l.startswith('nodebind'):
                maxnode=int(l.split()[-1])
            if l.startswith('physcpubind'):
                maxcpu=int(l.split()[-1])
            if "NO NUMA" in l.upper():
                numasupport=False

    except:
        numasupport=False

    return numasupport,maxnode,maxcpu
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号