Tips and Traps¶
This module provides basic mechanisms for measuring and controlling system resources utilized by a process and its subprocesses. It cannot be used to check resource usage of other processes.
In [1]:
import resource
usage = resource.getrusage(resource.RUSAGE_SELF)
usage
Out[1]:
In [2]:
"{:,}".format(usage.ru_maxrss)
Out[2]:
In [ ]:
In [ ]:
In [ ]: