pvinodp
asked on
How to monitor a production java process running on linux
I need to monitor a java process. At present I monitor the cpu and memory used by it using top command.
And then for that process_id I log the output of
1. lsof -p ${process_pid}
2. pstack -p ${process_pid}
3. top -n 1 -b -p ${process_pid} -H
But these are not giving me any useful results together. How do i collate useful details from them?
I am aware of some useful tools inside jdk folder, but i cant use them as they are not part of the production server.
Is there any detail provided by jvm and linux OS other than what I have listed above?
And then for that process_id I log the output of
1. lsof -p ${process_pid}
2. pstack -p ${process_pid}
3. top -n 1 -b -p ${process_pid} -H
But these are not giving me any useful results together. How do i collate useful details from them?
I am aware of some useful tools inside jdk folder, but i cant use them as they are not part of the production server.
Is there any detail provided by jvm and linux OS other than what I have listed above?
What do you need to monitor , apart from cpu and memory?
ASKER
which jar is taking how much memory. what is the memory occupied by a class.
Same details for cpu as well.
Same details for cpu as well.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i am well aware of tools within jdk.
I need to know if there is any help available from jre or linux OS
I need to know if there is any help available from jre or linux OS
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
https://coderwall.com/p/il3h4g:: This link suggest that I start the java process with the arguments. But i need to sniff the production java process which has already started and giving trouble. Moreover jhat is part of jre and not jdk.
Even the second link requires similar process.
let me know if I have wrongly understood.
Even the second link requires similar process.
let me know if I have wrongly understood.
yes, possibly.
well what you are trying to do can only be achieved by either jconsole or dumping heap/thread dumps with kill -3 <pid> and analyzing it with available tools (Java Heap/Thread dump analyzer from IBM or write parser of your own)
well what you are trying to do can only be achieved by either jconsole or dumping heap/thread dumps with kill -3 <pid> and analyzing it with available tools (Java Heap/Thread dump analyzer from IBM or write parser of your own)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thats a lot useful information. thanks all