Results 1 to 3 of 3
  1. #1
    nathon is offline Member
    Join Date
    Mar 2014
    Location
    Oregon, USA
    Posts
    2
    Rep Power
    0

    Question Java & Windows PerfMon Counters

    Java & Windows PerMon Counters

    I have a quick question. We are using JVMs and are running out of memory on a regular basis. We would like to monitor this using Windows PerfMon. My question is whether Java installs any PerfMon counters by default. Are there any existing counters that we can use to monitor the available memory for JVMs? My understanding from articles I've read is that any counters must be manually hooked into PerfMon programmatically.

    In other words you cannot monitor memory of an existing JVM using PerfMon unless you have programmed it to do so. Is that correct? Are there more general, maybe process level counters, that can be monitored?

    Please excuse my ignorance in this area. I am not a Java developer and have little experience with it. I do have development and systems administration experience though. So I should be able to understand your explanations. Thank you for your time in responding!

  2. #2
    jashburn is offline Senior Member
    Join Date
    Feb 2014
    Posts
    219
    Rep Power
    1

    Default Re: Java & Windows PerfMon Counters

    Quote Originally Posted by nathon View Post
    We are using JVMs and are running out of memory on a regular basis.
    A few initial questions:
    1. When you say "we are using JVMs", do you mean you have Java applications running on JVMs?
    2. What are the indications that point to "running out of memory"? E.g., do you see error messages in logs stating "java/lang/OutOfMemoryError" or "java.lang.OutOfMemoryError"? If so, is there a further message that follows OutOfMemoryError, e.g., "Java heap space" or "PermGen space"?

    Quote Originally Posted by nathon View Post
    In other words you cannot monitor memory of an existing JVM using PerfMon unless you have programmed it to do so. Is that correct?
    If I've understood your question correctly, then no, that is not correct. You can use PerfMon to monitor the "java" process. See IBM Mustgather: Monitoring Java Processes on Windows using PerfMon - United States.

    Note that if the problem is with Java applications running out of heap space (memory allocated by the JVM for the Java application), then PerfMon may be of limited help because by default it can only monitor on the "java" operating system-process level. You'll need to monitor what's happening in the JVM itself. If you need to do this, the JDK (Java Development Kit) comes with a tool called VisualVM. See VisualVM. See also Java VisualVM on monitoring Java applications.

  3. #3
    nathon is offline Member
    Join Date
    Mar 2014
    Location
    Oregon, USA
    Posts
    2
    Rep Power
    0

    Default Re: Java & Windows PerfMon Counters

    Jasburn,

    You're correct. I meant apps running under JVMs. It sounds like we can monitor the Java process itself but not individual JVM heap memory.

    My understanding is we seeing the out of memory exceptions in the logs. Thanks for your help.

    Quote Originally Posted by jashburn View Post
    A few initial questions:
    1. When you say "we are using JVMs", do you mean you have Java applications running on JVMs?
    2. What are the indications that point to "running out of memory"? E.g., do you see error messages in logs stating "java/lang/OutOfMemoryError" or "java.lang.OutOfMemoryError"? If so, is there a further message that follows OutOfMemoryError, e.g., "Java heap space" or "PermGen space"?



    If I've understood your question correctly, then no, that is not correct. You can use PerfMon to monitor the "java" process. See IBM Mustgather: Monitoring Java Processes on Windows using PerfMon - United States.

    Note that if the problem is with Java applications running out of heap space (memory allocated by the JVM for the Java application), then PerfMon may be of limited help because by default it can only monitor on the "java" operating system-process level. You'll need to monitor what's happening in the JVM itself. If you need to do this, the JDK (Java Development Kit) comes with a tool called VisualVM. See VisualVM. See also Java VisualVM on monitoring Java applications.

Similar Threads

  1. Replies: 1
    Last Post: 05-03-2013, 03:57 PM
  2. Replies: 1
    Last Post: 05-02-2013, 09:11 PM
  3. Replies: 13
    Last Post: 07-20-2012, 08:58 PM
  4. Windows java vs Windows AIX
    By sysp in forum New To Java
    Replies: 0
    Last Post: 01-26-2011, 06:32 AM
  5. Counters
    By Manfizy in forum New To Java
    Replies: 11
    Last Post: 05-26-2009, 12:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •