There are several approaches to monitoring uPortal memory at runtime.
| Stub Many of the sections in this page are stubs. You can improve them by adding your insights and links. |
Quick and Dirty JSP
Slapping a JSP like this into /tomcat/webapps/portal/ and accessing it at https://my.someschool.edu/portal/memory.jsp provides quick bare bones memory status.
<% Runtime runtime = Runtime.getRuntime(); // bytes of free momory long freeMemory = runtime.freeMemory(); // maximum memory the JVM will try to use, in bytes long maxMemory = runtime.maxMemory(); // total memory long totalMemory = runtime.totalMemory(); %> <html> <head> <title>Tomcat memory</title> </head> <body> <table> <tr> <td>Label</td> <td>Bytes</td> </tr> <tr> <td>Free memory</td> <td><%=freeMemory%></td> </tr> <tr> <td>Max memory</td> <td><%=maxMemory%></td> </tr> <tr> <td>Total memory</td> <td><%=totalMemory%></td> </tr> </table> </body> </html>
Tomcat Manager
The Tomcat Manager web application provides some server memory statistics (as well as a wealth of other information).
JMX monitoring tricks
You can connect a JMX GUI or other tool to a running JVM and see all sorts of interesting information about it.
Administrative runtime data channel
There's a lovely IChannel for monitoring a uPortal.
