---
title: OS vs JVM Monitoring - When to Use Windows Server vs JMX Monitoring
description: "OS-level vs JVM-level monitoring in Nodinite: the JMX Monitoring Agent monitors JVM CPU and free heap; the Windows Server Monitoring Agent covers server CPU, memory, disk, and Windows Services. Learn when to use each."
---

# <i class="fal fa-display" aria-hidden="true"></i> OS-Level vs JVM-Level Monitoring

This troubleshooting guide compares **OS monitoring** and **JVM monitoring** so you can choose the right <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> agent for each layer of a Java workload. The <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JMX Monitoring Agent][JMXAgent] sees inside the JVM, but only two values: **CPU usage** and **free heap**. The operating system layer, such as server CPU, **physical memory**, disk, and services, belongs to the [Windows Server Monitoring Agent][].

## Key Differences

| Value | OS level ([Windows Server Monitoring Agent][]) | JVM level ([JMX Monitoring Agent][JMXAgent]) |
| --- | --- | --- |
| <i class="fal fa-microchip" aria-hidden="true"></i> **CPU usage** | ✅ Server CPU | ✅ CPU usage of the JVM, with Warning and Error thresholds |
| <i class="fal fa-layer-group" aria-hidden="true"></i> **Heap memory** | ❌ Not visible from the OS | ✅ Free heap % ([Heap Used vs Committed][]), with Warning and Error thresholds |
| <i class="fal fa-memory" aria-hidden="true"></i> **Physical memory** | ✅ Server memory | ❌ Not monitored |
| <i class="fal fa-hard-drive" aria-hidden="true"></i> [Disk][] | ✅ Disk space | ❌ Not monitored |
| <i class="fal fa-gears" aria-hidden="true"></i> [Windows Services][] | ✅ Service state, with [Remote Actions][] | ❌ Not monitored |
| <i class="fal fa-plug-circle-xmark" aria-hidden="true"></i> **Reachability** | Server and services | 🚫 Unavailable when the JVM can't be reached over JMX |

The JMX Monitoring Agent doesn't monitor garbage collection, thread counts, class loading, or other MBean attributes ([Supported Garbage Collectors][], [Thread Deadlock Detection][]).

<div class="mermaid">
graph TD
  subgraph "OS layer - Windows Server Monitoring Agent"
    Server["fab:fa-windows Windows Server"]
    OsCpu["fa:fa-microchip Server CPU"]
    OsMem["fa:fa-memory Physical memory"]
    Disk["fa:fa-hard-drive Disk space"]
    Services["fa:fa-gears Windows Services"]
  end
  subgraph "JVM layer - JMX Monitoring Agent"
    Jvm["fab:fa-java Java process"]
    JvmCpu["fa:fa-microchip JVM CPU usage"]
    Heap["fa:fa-layer-group Free heap %"]
  end
  Server --> OsCpu
  Server --> OsMem
  Server --> Disk
  Server --> Services
  Server --> Jvm
  Jvm --> JvmCpu
  Jvm --> Heap
  style Server fill:#2678BD
  style Jvm fill:#2678BD
  style JvmCpu fill:#93d16d
  style Heap fill:#93d16d
</div>

*Diagram: The OS layer and the JVM layer. Green marks the two values the JMX Monitoring Agent monitors, JVM CPU usage and free heap; blue marks the monitored hosts.*

## When to Use OS-Level Monitoring

Use the [Windows Server Monitoring Agent][] for:

* Overall server health: disk space, physical memory, and server CPU
* Windows Services on the server, including the Windows Service that runs the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> JMX Gateway
* Non-Java applications on the same server

## When to Use JVM-Level Monitoring

Use the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> JMX Monitoring Agent for:

* Warning before a JVM runs out of heap, by alerting on low free heap before an OutOfMemoryError
* CPU usage per JVM, when several JVMs share one server
* Boomi Atoms, WSO2 servers, Spring Boot services, and other JVM-based integration applications

## Using Both Together

For critical Java infrastructure, use both layers:

* <i class="fab fa-windows" aria-hidden="true"></i> **OS monitoring** catches server-wide issues such as a full disk, low physical memory, or a stopped Windows Service
* <i class="fab fa-java" aria-hidden="true"></i> **JMX monitoring** catches JVM issues: high CPU usage in a specific JVM and low free heap

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>If server CPU is at 100% but JVM CPU is normal, look for a non-Java process. If JVM CPU is high, the load comes from that JVM; capture a thread dump with <code>jstack &lt;PID&gt;</code> to see which threads are busy.</p></div>
</aside>

## Physical Memory vs Heap Memory

The OS shows the **physical memory** the Java process uses, while the JMX Monitoring Agent shows **heap memory** managed inside the JVM. These are different:

* <i class="fal fa-memory" aria-hidden="true"></i> **Physical memory** = heap + **off-heap** memory (direct buffers, Metaspace, thread stacks, JIT code)
* <i class="fal fa-layer-group" aria-hidden="true"></i> **Heap memory** = only the objects managed by the garbage collector
* A JVM with `-Xmx2g` may use 3 GB or more of physical memory when off-heap memory is included

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Monitor free <strong>heap memory</strong> with the JMX Monitoring Agent to catch OutOfMemoryError risk. Monitor <strong>physical memory</strong> with OS monitoring to make sure the server has enough RAM for the JVM, including its off-heap memory, and other processes.</p></div>
</aside>

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

<i class="fab fa-docker" aria-hidden="true"></i> [Docker Container Monitoring][]  
<i class="fal fa-unlock" aria-hidden="true"></i> [Enable JMX Remote Monitoring][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

<i class="fal fa-server" aria-hidden="true"></i> [Multi-JVM Monitoring][]  
<i class="fal fa-memory" aria-hidden="true"></i> [Heap Used vs Committed][]  
<i class="fab fa-windows" aria-hidden="true"></i> [Windows Server Monitoring Agent][]  
<i class="fab fa-java" aria-hidden="true"></i> [JMX Monitoring Agent][JMXAgent]  
<i class="fal fa-circle-question" aria-hidden="true"></i> [JMX Troubleshooting Overview][Troubleshooting]  

[Disk]:https://docs.nodinite.com/logging-and-monitoring/windows-server/features/disk/
[Docker Container Monitoring]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/docker-container-monitoring/
[Enable JMX Remote Monitoring]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/enable-jmx-remote-monitoring/
[Heap Used vs Committed]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/heap-used-vs-committed/
[JMXAgent]:https://docs.nodinite.com/logging-and-monitoring/jmx/overview/
[Multi-JVM Monitoring]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/multi-jvm-monitoring/
[Remote Actions]:https://docs.nodinite.com/getting-started/monitor/remote-actions/
[Supported Garbage Collectors]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/supported-garbage-collectors/
[Thread Deadlock Detection]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/thread-deadlock-detection/
[Troubleshooting]:https://docs.nodinite.com/logging-and-monitoring/jmx/troubleshooting/overview/
[Windows Server Monitoring Agent]:https://docs.nodinite.com/logging-and-monitoring/windows-server/overview/
[Windows Services]:https://docs.nodinite.com/logging-and-monitoring/windows-server/features/windows-services/