I agree with Erik that this will just be hiding another problem (and making that problem harder to find).
/Staffan On 1 jun 2013, at 10:06, Erik Gahlin <erik.gah...@oracle.com> wrote: > Nils, do you know why you get a negative number? > > As I remember it, the MBean returns -1 if the value is not available on the > platform. I think there should be a message that tells the user that > > Now it's just a matter of time before somebody files a bug that they got 0% > instead of the CPU load they actually have on their machine. The negative > value was at least a hint to the user that the value can't be trusted > > Erik > > > On 31 maj 2013, at 13:59, Nils Loodin <nils.loo...@oracle.com> wrote: > >> Simple fix to not show negative CPU usage in JConsole: >> >> http://cr.openjdk.java.net/~nloodin/6526682/webrev.00/ >> >> Regards, >> Nils Loodin