On Fri, 2007-09-21 at 08:27 -0400, Kent Johnson wrote:
> How can I find out how much memory is used by a cron job?
> 
> Background:
> I manage an account at WebFaction. It has a memory limit. I have a cron 
> job that runs every night, it generally is not a problem, but last night 
> it chewed up a ton of memory and triggered a limit alarm at WF.
> 
> I don't know how their alarms work so I don't know if this was an 
> isolated event or if it is using a lot of memory every night and I just 
> got caught last night. I would like to find out. Is there some way I can 
> wrap the cron job to log the memory used by the process?

One simple way 'ps aux | grep myjob'

If you loop on this and redirect the output to a file you can watch your
program grow. There is also a memstat utility that may or may not be
available on the system you are using.

-Alex

> 
> I think the server is running RHEL, don't know which version.
> 
> Thanks,
> Kent
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss@mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to