[root@web03 memtest]# cat meminfo.jsp <% Runtime rtm = Runtime.getRuntime(); long mm = rtm.maxMemory()/1024/1024; long tm = rtm.totalMemory()/1024/1024; long fm = rtm.freeMemory()/1024/1024;
out.println("JVM memory detail info :<br>"); out.println("Max memory:"+mm+"MB"+"<br>"); out.println("Total memory:"+tm+"MB"+"<br>"); out.println("Free memory:"+fm+"MB"+"<br>"); out.println("Available memory can be used is :"+(mm+fm-tm)+"MB"+"<br>"); %>