I have an application which runs through a wrapper and submitted as a job on grid (Linux). y task is to monitor the RAM and virtual memory usage of the process and if the process fails due to memory issue, resubmit it again to grid with a higher memory requirement ( using some switch ). I think this can be achieved by invoking a separate thread from the application which watches the main application and in case of failure relaunch the main application. I am seeking for an advice for better solution to this problem.
Thanks Ruchi