You can monitor memory and process CPU time using system tools such as top on UNIX systems or the Task Manager or Performance Monitor on Windows. Many profiling tools such as OptimizeIt track memory and can help you find the source of memory leaks.
You can monitor memory usage of a running application server using the Management Console, as described in “CheckMemoryUsageTask tab” in Chapter 11, “Runtime Monitoring,” in the System Administration Guide. You can also configure the server to log memory usage statistics hourly or per-minute using the Dump60MinuteMemoryUsage or Dump60SecondMemoryUsage scheduled tasks described in “Scheduled tasks for statistics collection”.
In server and listener properties, you can configure memory thresholds for each server as described in “Threshold monitor settings”.
In Java code, you can log the amount of free memory reported by the methods freeMemory() and totalMemory() in the java.lang.RunTime class to track total memory use in the Java dynamic allocation heap.