I agree with psini and toolic in terms of parsing 'ps -ef' but what I'd really like to suggest is that you investigate the 'o' option of ps. With ps -eo you can pull out things like the resident size of your application and the virtual memory size (i.e. how much RAM and how much virtual memory your program is using). The command ps -eo and a little parsing can be an effective diagnostic tool.