Created
May 13, 2016 20:27
-
-
Save mkocikowski/f7bbd2711e82d111a34cc8efb14e1fe0 to your computer and use it in GitHub Desktop.
Check amount of RAM used by current python process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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