Update of 
/var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors/admindashboard/system
In directory 
james.mmbase.org:/tmp/cvs-serv431/cmsc/edit-webapp/src/webapp/editors/admindashboard/system

Modified Files:
      Tag: b1_4
        memory.jsp 
Log Message:
CMSC-1012 Memory information is confusing in admindashboard


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors/admindashboard/system
See also: http://www.mmbase.org/jira/browse/CMSC-1012


Index: memory.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/editors/admindashboard/system/memory.jsp,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -b -r1.2 -r1.2.4.1
--- memory.jsp  21 May 2007 18:06:15 -0000      1.2
+++ memory.jsp  14 Jul 2008 09:39:09 -0000      1.2.4.1
@@ -12,14 +12,24 @@
        
                <h1><fmt:message key="admindashboard.system.memory.header" 
/></h1>
                
+               <% 
+               long maxMem = Runtime.getRuntime().maxMemory();
+               long totalMem = Runtime.getRuntime().totalMemory();
+               long freeMem = Runtime.getRuntime().freeMemory();
+               
+                %>
+               
                <b><fmt:message key="admindashboard.system.memory.maximum" 
/>:</b> 
-               <%=Runtime.getRuntime().maxMemory()/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
+               <%=maxMem/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
                <br/>
                <b><fmt:message key="admindashboard.system.memory.total" 
/>:</b> 
-               <%=Runtime.getRuntime().totalMemory()/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
+               <%=totalMem/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
+               <br/>
+               <b><fmt:message key="admindashboard.system.memory.used" />:</b> 
+               <%=(totalMem - freeMem)/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
                <br/>
                <b><fmt:message key="admindashboard.system.memory.free" />:</b> 
-               <%=Runtime.getRuntime().freeMemory()/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
+               <%=freeMem/1024/1024%><fmt:message 
key="admindashboard.system.memory.mb" />
                
        </mm:hasrank>
 </mm:cloud>
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to