We have a python script in /home/aifs2/group/code/limitWrapper that constrains the memory usage or time limit of a executable command. It uses /proc/[PID]/smaps to read the memory usage of your program. See details of smaps here.
./limitWrapper.py -h
usage: ./limitWrapper.py [-h] [-c COMMAND] [-m MEMORY] [-t TIME]
optional arguments:
-h, --help show this help message and exit
-c COMMAND command: (default) ls ~
-m MEMORY memory limit:(default) 5 (GB)
-t TIME time limit:(default) 600 (seconds)
example:
./limitWrapper -c "/home/aifsx/xxx/bin/search" -m 7 -t 10
will run command /home/aifsx/xxx/bin/search with memory limit 7GB and time limit 10 seconds.
It uses a lot of function from DistLRE
Comments (0)
You don't have permission to comment on this page.