Link to home
Start Free TrialLog in
Avatar of ginola29
ginola29

asked on

Limiting Processes

I want to restrict programs that are running to a certain memory size, compilation time and running time, is there anyway to do it in the linux environment.

Suppose i have a java program, I want to set a maximum compilation time, a maximum running time and a memory size to run that program. How do i do it?
Avatar of Hugh Fraser
Hugh Fraser
Flag of Canada image

"ulimit" can meet some of your requirements. It will allow a limit to be placed on elapsed CPU time (but not clock time) and either resident or virtual memory.
Avatar of ginola29
ginola29

ASKER

how do i run ulimit with a java command at the same time? suppose i have a java program named test

am i suppose to do
bash > ulimit ....
bash > java test
??
ASKER CERTIFIED SOLUTION
Avatar of Hugh Fraser
Hugh Fraser
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks alot, it works perfectly