| Author |
memory setting
|
Alex Kravets
Ranch Hand
Joined: Jan 24, 2001
Posts: 476
|
|
Where in JBoss jmx console can I check how much RAM is allocated for JBoss on server? thanks, Alex
|
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
|
 |
Jeff Shelley
Ranch Hand
Joined: May 21, 2003
Posts: 70
|
|
|
I think what you're looking for is jboss.system,type=ServerInfo.
|
It's almost Friday
|
 |
Alex Kravets
Ranch Hand
Joined: Jan 24, 2001
Posts: 476
|
|
got it. But I have three fields: FreeMemory 22867000 MaxMemory -1 TotalMemory 45850624 First and last I understand, but what is MaxMemory? And, how do I change TotalMemory?
|
 |
Jeff Shelley
Ranch Hand
Joined: May 21, 2003
Posts: 70
|
|
Here is where the values come from: Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); Max memory is a bit trickier public Long getMaxMemory() { if (Java.isCompatible(Java.VERSION_1_4)) { // Uncomment when JDK 1.4 is the base JVM // return new Long(Runtime.getRuntime().maxMemory()); // until then use reflection to do the job try { Runtime rt = Runtime.getRuntime(); Method m = rt.getClass().getMethod("maxMemory", new Class[0]); return (Long)m.invoke(rt, new Object[0]); } catch (Exception e) { log.error("Operation failed", e); } } return new Long(-1); } Here's the 1.4.2 Runtime Class. http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html I'm not quite sure how to change them, though.
|
 |
 |
|
|
subject: memory setting
|
|
|