1

I am looking for a way to pull heap sizes (min, max, used) from a Java process on Linux. I need a lightwaight tool/command to use to do the job. Big monitoring packages are not an option.

I done some googleing and more but could not find a viable alternatives. The only possible option that I found so far is to use JMX protocol. I enabled JMX on Java appication and was succesfully poll it using various java tools that use JMX protocol/library implementation. But these Java tools are slow, taking much cpu during startup when allocating memory. What I want is a simple tool command line that would talk for example JMX protocol and poll the process for heap sizes.

I am using IBM's J9 version of Java and jstat tool is not available there.

Any ideas anyone?

3
  • 1
    You can try JProfiler a tool for heap analysis. Or JVisualVm shipped along with jdk for that purpose. Commented Aug 27, 2014 at 8:53
  • 1
    It takes about 15 lines of code to poll the JMX yourself. Commented Aug 27, 2014 at 9:00
  • nablex where can I find those 15 lines of code. JMX is a non http protocol and one cannot easily talk to it. Do you mean 15 lines of Java code? I already have a Java client but It's slow and takes CPU if I run it on tenths of servers almost at the same time. Can you elaborate a little more? Commented Aug 27, 2014 at 10:30

1 Answer 1

1

Your need has probably been taken care of by now but one option, for others who might stumble on this thread, is a tool called 'jvmtop' (link: https://code.google.com/p/jvmtop/). It works with the IBM J9 JVM (among others).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.