예제 #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