This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes check system memory available 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 » Java » Java in General
Bookmark "check system memory available" Watch "check system memory available" New topic
Author

check system memory available

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
I know how to find out how much memory the Java Runtime has, but is there a way to check how much the OS has? Windows is reporting this error associated with Tomcat:

The CreateThread function failed for the following reason: Not enough storage is available to process this command.

We've got about 3GB of RAM in the Wintel machine and 1.5GB is allocated to Java. I'd like to just have a simple lightweight watchdog program running that's checking the OS's memory usage very frequently, and logs it to a file anytime it gets super high so that I can know for sure that we have a problem with this! If there's no way to do it, I guess I can try to figure out how to hack out a little C# program for this. Or should I not be asking about system memory and really only be concerned with checking the JVM used by the Tomcat process?

Thanks for any tips!
 
wood burning stoves
 
subject: check system memory available
 
Similar Threads
two JVM under one Processor
Is there any way to execute a Linux command from Java without fork-ing?
help with allocating more memory during runtime
Java-Mind-Teaser: Memory Problem with Tomcat/JSP
LZ78 and FileReader