def __init__(self, config, logger=None): self.__logger = logger KernelInfo.__init__(self, logger=logger) SystemServices.__init__(self, logger=logger) dmi.DMIinfo.__init__(self, config, logger=logger) CPUtopology.__init__(self) OSInfo.__init__(self, logger=logger) # Parse initial DMI decoding errors dmi.ProcessWarnings() # Parse CPU info CPUtopology._parse(self)
def get_cpu_topology(self): ''' figure out how many processors we have available''' topology = CPUtopology() topology.parse() self.numcores = topology.getCPUcores(True) self.debug("counted %d cores (%d online) and %d sockets" % (topology.getCPUcores(False), self.numcores, topology.getCPUsockets())) return topology.getXMLdata()
def MakeReport(self): report_n = libxml2.newNode("SystemInfo"); report_n.newProp("version", "1.0") # Populate the report report_n.addChild(OSInfo.MakeReport(self)) report_n.addChild(KernelInfo.MakeReport(self)) report_n.addChild(NetworkInfo.MakeReport(self)) report_n.addChild(SystemServices.MakeReport(self)) report_n.addChild(CPUtopology.MakeReport(self)) report_n.addChild(MemoryInfo.MakeReport(self)) report_n.addChild(dmi.DMIinfo.MakeReport(self)) return report_n