示例#1
0
        def attribFunc(self,resName=""):
		attribValue = gm_hs_tools.execCmdGetOutput("lsattr -El mem0 | awk '/^size/ {print $2} '").strip()
                # lsattr gives value in MB, we want GB
                av = float(attribValue)
                gb = av/(1024)
                attribValue = "%.2f" % gb
		return attribValue
示例#2
0
	def attribFunc(self, resName=""):
                # if they don't provide a resource name, we'll just grab the
                # data for proc0
                if resName == "":
                   resName = "proc0"
		cmdValue = gm_hs_tools.execCmdGetOutput('lsattr -E -l %s | grep "Processor type"' % resName).strip()
		attribValue = cmdValue.split()[1]
		return attribValue
示例#3
0
	def attribFunc(self,resName=""):
                # if they don't give a name for the processor, default
                # to proc0
                if resName == "":
                   resName = "proc0"
		cmdValue = gm_hs_tools.execCmdGetOutput('lsattr -E -l %s | grep "Processor Speed"' % resName).strip()
		attribValue = cmdValue.split()[1]
                # value is given in Hz, we want MHz
                av = float(attribValue)
                mz = av/(1000*1000)
                attribValue = "%.2f" % mz
		return attribValue
示例#4
0
        def attribFunc(self,resName = ""):
			attribValue = gm_hs_tools.execCmdGetOutput('arch').strip()
                        return attribValue
示例#5
0
	def attribFunc(self,resName =""):
		attribValue = gm_hs_tools.execCmdGetOutput('lsdev -c processor | grep -c proc').strip()
		return attribValue