示例#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))
示例#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))
示例#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))
示例#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))