pyrasite-memory-viewer
- View the largest objects in your processΒΆ
Pyrasite provides a tool to view object memory usage statistics, and the live value, of largest objects in your process. This requires urwid and meliae to be installed.
$ pyrasite-memory-viewer <PID>

This tool automatically injects the following payload:
import os, meliae.scanner, platform
if platform.system() == 'Windows':
temp = os.getenv('TEMP', os.getenv('TMP', '/temp'))
path = os.path.join(temp, 'pyrasite-%d-objects.json' % os.getpid())
else:
path = '/tmp/pyrasite-%d-objects.json' % os.getpid()
meliae.scanner.dump_all_objects(path)
You can easily dump the object memory usage JSON data by hand, if you wish:
$ pyrasite <PID> pyrasite/payloads/dump_memory.py