예제 #1
0
 def memory_info(self):
     f = open("/proc/%s/statm" % self.pid, 'rb')
     try:
         vms, rss = f.readline().split()[:2]
         return _common.pmem(int(rss) * PAGESIZE, int(vms) * PAGESIZE)
     finally:
         f.close()
예제 #2
0
 def memory_info(self):
     # on Windows RSS == WorkingSetSize and VSM == PagefileUsage
     # fields of PROCESS_MEMORY_COUNTERS struct:
     # http://msdn.microsoft.com/en-us/library/windows/desktop/
     #     ms684877(v=vs.85).aspx
     t = self._get_raw_meminfo()
     return _common.pmem(t[2], t[7])
예제 #3
0
 def memory_info(self):
     # on Windows RSS == WorkingSetSize and VSM == PagefileUsage
     # fields of PROCESS_MEMORY_COUNTERS struct:
     # http://msdn.microsoft.com/en-us/library/windows/desktop/
     #     ms684877(v=vs.85).aspx
     t = self._get_raw_meminfo()
     return _common.pmem(t[2], t[7])
예제 #4
0
 def memory_info(self):
     f = open("/proc/%s/statm" % self.pid, 'rb')
     try:
         vms, rss = f.readline().split()[:2]
         return _common.pmem(int(rss) * PAGESIZE,
                             int(vms) * PAGESIZE)
     finally:
         f.close()
예제 #5
0
 def memory_info(self):
     ret = cext.proc_basic_info(self.pid)
     rss, vms = ret[1] * 1024, ret[2] * 1024
     return _common.pmem(rss, vms)
예제 #6
0
 def memory_info(self):
     ret = cext.proc_basic_info(self.pid)
     rss, vms = ret[1] * 1024, ret[2] * 1024
     return _common.pmem(rss, vms)
예제 #7
0
 def memory_info(self):
     rss, vms = cext.proc_memory_info(self.pid)[:2]
     return _common.pmem(rss, vms)
예제 #8
0
파일: _psbsd.py 프로젝트: zhmz90/Dato-Core
 def memory_info(self):
     rss, vms = cext.proc_memory_info(self.pid)[:2]
     return _common.pmem(rss, vms)