Пример #1
0
   def pidinfo(self, pid):
      self.pinfo = readproc_by_pid(pid)
      self.pinfo['maps'] = self.__getmaps__(pid)
      self.pinfo['cwd'] = self.__getlink__(pid, 'cwd')
      self.pinfo['exe'] = self.__getlink__(pid, 'exe')
      self.pinfo['root'] = self.__getlink__(pid, 'root')
      self.pinfo['fds'] = self.__getfds__(pid)

      return self.pinfo
Пример #2
0
   def __init__(self, ppid):
      self.pid = ppid
      pinfo = readproc_by_pid(ppid)
      pinfo['maps'] = self.__getmaps__(ppid)
      pinfo['cwd'] = self.__getlink__(ppid, 'cwd')
      pinfo['exe'] = self.__getlink__(ppid, 'exe')
      pinfo['root'] = self.__getlink__(ppid, 'root')
      pinfo['fds'] = self.__getfds__(ppid)

      for key in pinfo:
         setattr(self, key, pinfo[key])

      del pinfo