you shouldn't make the system call twice. why not:

```
mem_info = psutil.Process(pid).get_ext_memory_info()
rss += mem_info[0]
vms += mem_info[1]
```