|
|
@ -870,20 +870,30 @@ class AIX(Hardware):
|
|
|
|
|
|
|
|
|
|
|
|
def get_cpu_facts(self):
|
|
|
|
def get_cpu_facts(self):
|
|
|
|
self.facts['processor'] = []
|
|
|
|
self.facts['processor'] = []
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsattr -El proc0 -a type")
|
|
|
|
|
|
|
|
data = out.split(' ')
|
|
|
|
|
|
|
|
self.facts['processor'] = data[1]
|
|
|
|
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsattr -El proc0 -a smt_threads")
|
|
|
|
|
|
|
|
data = out.split(' ')
|
|
|
|
|
|
|
|
self.facts['processor_cores'] = int(data[1])
|
|
|
|
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsdev -Cc processor")
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsdev -Cc processor")
|
|
|
|
i = 0
|
|
|
|
i = 0
|
|
|
|
for line in out.split('\n'):
|
|
|
|
for line in out.split('\n'):
|
|
|
|
data = line.split(':')
|
|
|
|
|
|
|
|
if 'Available' in line:
|
|
|
|
if 'Available' in line:
|
|
|
|
|
|
|
|
if i == 0:
|
|
|
|
|
|
|
|
data = line.split(' ')
|
|
|
|
|
|
|
|
cpudev = data[0]
|
|
|
|
|
|
|
|
|
|
|
|
i += 1
|
|
|
|
i += 1
|
|
|
|
self.facts['processor_count'] = int(i)
|
|
|
|
self.facts['processor_count'] = int(i)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsattr -El " + cpudev + " -a type")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data = out.split(' ')
|
|
|
|
|
|
|
|
self.facts['processor'] = data[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rc, out, err = module.run_command("/usr/sbin/lsattr -El " + cpudev + " -a smt_threads")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data = out.split(' ')
|
|
|
|
|
|
|
|
self.facts['processor_cores'] = int(data[1])
|
|
|
|
|
|
|
|
|
|
|
|
def get_memory_facts(self):
|
|
|
|
def get_memory_facts(self):
|
|
|
|
pagesize = 4096
|
|
|
|
pagesize = 4096
|
|
|
|
rc, out, err = module.run_command("/usr/bin/vmstat -v")
|
|
|
|
rc, out, err = module.run_command("/usr/bin/vmstat -v")
|
|
|
|