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
test_05_AffinityDeployments.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录