(self, pid)
| 19 | self.timeout = server.timeout / 2 |
| 20 | |
| 21 | def memory_usage(self, pid): |
| 22 | try: |
| 23 | out = commands.getoutput("ps -o rss -p %s" % pid) |
| 24 | except OSError: |
| 25 | return -1 |
| 26 | used_mem = sum(int(x) for x in out.split('\n')[1:]) |
| 27 | return used_mem |
| 28 | |
| 29 | def run(self): |
| 30 | while True: |