Exemplo n.º 1
0
 def getPIDForString(self, s):
     pid = None
     try:
         processList = assistant.getProcessList()
         for p in processList:
             if p[1].find(s) != -1:
                 pid = p[0]
                 break
         del processList
     except Exception, e:
         PLOG.error("%s getPIDForString except:%s" % (self.name, e))
Exemplo n.º 2
0
 def getPIDForString(self, s):
     pid = None
     try:
         processList = assistant.getProcessList()
         for p in processList:
             if p[1].find(s) != -1:
                 pid = p[0]
                 break
         del processList
     except Exception, e:
         PLOG.error("%s getPIDForString except:%s" % (self.name, e))
Exemplo n.º 3
0
 def getCommandForPID(self, pid):
     cmd = None
     try:
         processList = assistant.getProcessList()
         for p in processList:
             if p[0] == pid:
                 cmd = p[1]
                 break
         del processList
     except Exception, e:
         PLOG.error("%s getCommandForPID except:%s" % (self.name, e))
Exemplo n.º 4
0
 def getCommandForPID(self, pid):
     cmd = None
     try:
         processList = assistant.getProcessList()
         for p in processList:
             if p[0] == pid:
                 cmd = p[1]
                 break
         del processList
     except Exception, e:
         PLOG.error("%s getCommandForPID except:%s" % (self.name, e))