标签:添加 out vim local time 监控tomcat can ota 文件
创建存储文件
mkdir /usr/local/tomcat/webapps/memtest/
vim /usr/local/tomcat/webapps/memtest/meminfo.jsp
添加脚本内容
<%
Runtime rtm = Runtime.getRuntime();
long mm = rtm.maxMemory()/1024/1024;
long tm = rtm.totaMemory()/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>");
%>
标签:添加 out vim local time 监控tomcat can ota 文件
原文地址:https://www.cnblogs.com/990114-jhc/p/11627200.html