summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2010-10-06 10:34:03 +1000
committerDan Callaghan <dcallagh@redhat.com>2010-10-06 10:34:03 +1000
commite08b4abcf4adeb9c444bbdba9859e3cf435dd62a (patch)
tree8dd3e395fb309432e23ff46ffa002d7dce353b8a
parentb80e4ebdf83fbcaa4100ddc9e07d76d1145a5c1a (diff)
bz593606 - report NUMA node count in /distribution/inventory taskbeaker-distribution-inventory-1_1-36
-rwxr-xr-xTasks/distribution/inventory/pushInventory.py1
-rw-r--r--Tasks/distribution/inventory/smolt.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/Tasks/distribution/inventory/pushInventory.py b/Tasks/distribution/inventory/pushInventory.py
index 8ccefc3..5d54d0a 100755
--- a/Tasks/distribution/inventory/pushInventory.py
+++ b/Tasks/distribution/inventory/pushInventory.py
@@ -94,6 +94,7 @@ def read_inventory():
data['model'] = "%s" % profile.host.systemModel
#data['FORMFACTOR'] = "%s" % profile.host.formfactor
data['memory'] = int(memory['ram'])
+ data['Numa'] = {'nodes': profile.host.numaNodes}
for VendorID, DeviceID, SubsysVendorID, SubsysDeviceID, Bus, Driver, Type, Description in profile.deviceIter():
device = dict ( vendorID = "%04x" % (VendorID and VendorID or 0),
diff --git a/Tasks/distribution/inventory/smolt.py b/Tasks/distribution/inventory/smolt.py
index ef45c6b..ff6861f 100644
--- a/Tasks/distribution/inventory/smolt.py
+++ b/Tasks/distribution/inventory/smolt.py
@@ -40,6 +40,7 @@ import urlgrabber.grabber
import sys
from urlparse import urljoin
from urllib import urlencode
+import glob
smoonURL = 'http://smolt.fedoraproject.org/'
smoltProtocol = '.91'
@@ -167,6 +168,7 @@ class Host:
self.cpuModel = cpuInfo['model']
self.numCpus = cpuInfo['count']
self.cpuSpeed = cpuInfo['speed']
+ self.numaNodes = len(glob.glob('/sys/devices/system/node/node*')) #: number of NUMA nodes in the system, or 0 if not supported
self.systemMemory = memory['ram']
self.systemSwap = memory['swap']
self.kernelVersion = os.uname()[2]