Two Laptop Bag*
The moose likes JBoss/WildFly and the fly likes memory setting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "memory setting" Watch "memory setting" New topic
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: memory setting
 
Similar Threads
j_security_check fwd to original url
third-party library classpath
configure passivation time and session time out
Free EJB Server
websphere or weblogic