Skip to content

Instantly share code, notes, and snippets.

@mkocikowski
Created May 13, 2016 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkocikowski/f7bbd2711e82d111a34cc8efb14e1fe0 to your computer and use it in GitHub Desktop.
Save mkocikowski/f7bbd2711e82d111a34cc8efb14e1fe0 to your computer and use it in GitHub Desktop.
Check amount of RAM used by current python process
#!/usr/bin/python
import os
# pip install psutil
import psutil
mb = psutil.Process(os.getpid()).memory_info()[0]>>20
print(mb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment