monitor memory usage for process
Hi,
I use linux and Unix and I want to monitor the memory usage for process. To prevent memory leakage and out of memory of the system. Any command or sytnax , have more better and presentable data than below command about memory usage of one process ?? ps -o %cpu,%mem,lstart,args,comm,cputime,pid,rss,vsz -p 10537 %CPU %MEM STARTED COMMAND COMMAND TIME PID RSS VSZ 0.8 10.6 Mon Jan 24 13:37:07 2011 /opt/j2sdk1.4.2_ java_executable 00:00:33 10537 111708 910044 any suggestion ?? |
While this may sound obvious it might get you there in time to restart a process but monitoring memory usage does not prevent memory leaks: better coding may. Expecting the system to compensate for a user deciding to deploy a crappy coded .war file is like fighting symptoms instead of fighting the cause. Back to your question you could reinvent the wheel if that's what you're after or use existing tools like jconsole / jhat to check Java processes and say Monit for watching process memory and automagic restarting it?
|
Hi chui,
I don't know what's your distro, mines are Fedora and Ubuntu. I usually use htop for realtime process monitoring. Htop is text based, curse based application. |
Quote:
Which command you suggest ?? ---------- Post added 01-25-11 at 10:14 AM ---------- Quote:
Which command you suggest ?? |
All times are GMT -5. The time now is 09:12 PM. |