Interview Question
Devops Engineer Interview
-
AmazonHow do you know how much memory your java application is taking on Linux?
Tags:linux, networking, web, hadoop
AnswerAdd Tags
Interview Answers
6 Answers
▲
8
▼
pmap or top is probably the simplest. Just be sure not to confuse virtual memory with physical.
dr_groo on
▲
0
▼
jps |awk "{print $1}" | xargs -L 1 ps -ef -o %mem
sanjaya Dahal on
▲
0
▼
ps aux | grep -i
Soubhik Banerjee on
▲
0
▼
Just search for the pid created by that java process. And then you get to know the memory usage by top or ps -ef/ps -auxx commands.
Ritesh on
▲
0
▼
jvmtop is a command-line tool which provides a live-view at several metrics, including heap.
Avinash Kumar on
▲
1
▼
Ps -ef| grep - java
Anonymous on
Add Answers or Comments
To comment on this, Sign In or Sign Up.