Bug 289 - ajouter un mécanisme qui empêche la saturation de la mémoire sur un noeud : ajout de l'affichage de l'utilisation mémoire des jobs. Ce n'est pas encore peaufiné mais l'essentiel est là

This commit is contained in:
Guillaume Raffy 2013-12-06 10:41:50 +00:00
parent 9da884ce7f
commit 600db53653
2 changed files with 16 additions and 3 deletions

View File

@ -107,3 +107,13 @@ class Job:
returns true if this job is waiting in the queue for whatever reason returns true if this job is waiting in the queue for whatever reason
""" """
return self.m_stateFlags & JobStateFlags.QUEUED return self.m_stateFlags & JobStateFlags.QUEUED
def getRequestedRamPerCore( self ):
"""
requested RAM per core in bytes
"""
return self.m_requestedRamPerCore
def setRequestedRamPerCore( self, requestedRam ):
"""
requestedRam : requested RAM per core in bytes
"""
self.m_requestedRamPerCore=requestedRam

View File

@ -67,7 +67,7 @@ class SgeConfig:
for strAttrDef in strSgeConfigString.split(","): for strAttrDef in strSgeConfigString.split(","):
#print strAttrDef #print strAttrDef
if len(strAttrDef) != 0: if len(strAttrDef) != 0:
matchObj = re.match( "^(?P<attrName>[^=]+)=(?P<attrValue>.*)$", strAttrDef ) matchObj = re.match( "^\s*(?P<attrName>[^=]+)=(?P<attrValue>.*)$", strAttrDef )
#print matchObj.group("attrName") #print matchObj.group("attrName")
self.m_attrs[ matchObj.group("attrName") ] = matchObj.group("attrValue") self.m_attrs[ matchObj.group("attrName") ] = matchObj.group("attrValue")
def asFormat1String( self ): def asFormat1String( self ):
@ -91,5 +91,8 @@ class SgeConfig:
iAttr+=1 iAttr+=1
#print strSgeConfigString #print strSgeConfigString
return strResult return strResult
def dump( self ):
for (k,v) in self.m_attrs.iteritems():
print "['%s']='%s'" % (k,v)