def dlpar_mem_hotplug(self):
if 'ppc' in platform.processor() and 'PowerNV' not in open('/proc/cpuinfo', 'r').read():
if "mem_dlpar=yes" in process.system_output("drmgr -C", ignore_status=True, shell=True):
init_mem = memory.meminfo.MemTotal.kb
self.log.info("\nDLPAR remove memory operation\n")
for _ in range(len(self.blocks_hotpluggable) / 2):
process.run(
"drmgr -c mem -d 5 -w 30 -r", shell=True, ignore_status=True, sudo=True)
if memory.meminfo.MemTotal.kb >= init_mem:
self.log.warn("dlpar mem could not complete")
self.run_stress()
init_mem = memory.meminfo.MemTotal.kb
self.log.info("\nDLPAR add memory operation\n")
for _ in range(len(self.blocks_hotpluggable) / 2):
process.run(
"drmgr -c mem -d 5 -w 30 -a", shell=True, ignore_status=True, sudo=True)
if init_mem < memory.meminfo.MemTotal.kb:
self.log.warn("dlpar mem could not complete")
else:
self.log.info('UNSUPPORTED: dlpar not configured..')
else:
self.log.info("UNSUPPORTED: Test not supported on this platform")
memhotplug.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录