コード例 #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
ファイル: alwayson_dog.py プロジェクト: cash2one/pythonTool
 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
ファイル: alwayson_dog.py プロジェクト: cash2one/pythonTool
 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))