Collecting native memory information on the Windows operating system

Windows 32-bit operating systems have a default user space limit of 2 GB, so might be more prone than other operating systems to native out-of-memory conditions. Use the perfmon tool supplied with Windows to gather memory usage information on a Java™ or Node.js process.

Before you begin

If possible, ensure that only the Java or Node.js process that you want to monitor is running. If multiple Java or Node.js processes are running, it will be difficult for you to select the process that you want to monitor, because the perfmon tool lists processes by their name only, for example java or javaw.

Procedure

  1. Start the application to be monitored.
  2. Start the perfmon tool. From the Start menu, click Run... to open the Run dialog window. Type perfmon in the Open field, then click OK to start the perfmon tool.
  3. Create a counter log.
    1. Expand Performance Logs and Alerts and click Counter Logs. Right-click the space under the System Overview log and click New Log Settings.... The New Log Settings window opens.
    2. Type a name for the log file, for example Java Memory Usage, then click OK. A dialog window opens; the title of the window is the name that you supplied.
    3. Make a note of the value of the Current log file name field, so that you know where to retrieve the log file from after it is created.
    4. Click Add Counters.... The Add Counters dialog window opens.
    5. In the Performance object list, select Process.
    6. Click Select counters from list, then from the list of counters select Virtual Bytes.
    7. Click Select instances from list, then from the list of instances select the process name, for example java, or javaw. This list shows only the process name, so the process that you want to monitor is easier to identify if you have no other Java or Node.js processes running.
    8. Click Add, then Close. The counter is now visible in the previous dialog window.
    9. Click the Log Files tab, then from the Log file type list select Text File (Comma delimited).
    10. Click the Schedule tab, then in the Start log section click Manually (using the shortcut menu). Click OK. You might see a dialog box asking if you want to create the PerfLogs folder. Click Yes to create the folder suggested, or click No, then specify a different folder in the General tab.
    You counter log is now visible in the main pane of the perfmon tool.
  4. Start the log by right-clicking it and clicking Start. The icon changes to green to show that the log is being generated.
  5. Leave the log running to collect data. Depending on the nature of the problem you are diagnosing, you might have to run the log for a significant amount of time to collect enough data to make some conclusions.
  6. When you have sufficient data, stop the log by right-clicking it and clicking Stop.

What to do next

You can now open the log file in the IBM® Monitoring and Diagnostic Tools - Garbage Collection and Memory Visualizer. If you did not make a note of the location of the log file, double-click the name of the log to view the properties dialog window. The location of the log file is shown on the General tab.




© Copyright IBM Corporation 2005, 2016.

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.