I have a requirement to measure the system resources on the host vm and compare it with the baseline limits.
the resource module provides with most of the values but I am unable to get below 2 limits from resource module in comparison with ulimit -a
- pipe size --> The pipe size in 512-byte blocks
- virtual memory --> The maximum amount of virtual memory available to the shell and, on some systems, to its children
I did check this answer and did a mapping between ulimit -a
and /usr/include/bits/resource.h
which I have pasted below. I could not find any equivalent parameters in /usr/include/bits/resource.h
for the above 2 system resources.
I'd like to avoid running ulimit
as a subprocess. Is there any alternative in python?
Mapping between ulimit -a
and /usr/include/bits/resource.h