I need to programmatically check the system load. I understand that there is no开发者_开发百科 general way, and we need as a check on a separate Windows and Ubuntu
Given that your aim is to track down a memory leak (apparently), it would be better to use existing tools to monitor memory utilization; e.g.
- Java profiling tools included in the JDK.
- System specific tools such as "top", "vmstat", "iostat" and so on, and their Windows equivalents.
Trying to do this from Java is only going to confuse the issue.
精彩评论