Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

monitor memory usage for process

Jan 23, 2011 3:25PM PST

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 ??

Discussion is locked

- Collapse -
monitor mem use
Jan 23, 2011 4:34PM PST
- Collapse -
monitor mem use
Jan 23, 2011 9:07PM PST

I cannot install any sw into the system as it is production system.
So, I must use the existing command in Linux and Unix .

Any better suggestion ??

- Collapse -
You can
Jan 24, 2011 4:35PM PST

Use ~/.bashrc text file to alias than command to shorter one.
Add line into it
alias checkit='ps -o %cpu,%mem,lstart,args,comm,cputime,pid,rss,vsz -p 10537'
and relogin. Then checkit will become short version of that command.