Get Windows "load average" in Java -


i'm writing java application needs @ how "heavily loaded" machine it's running on is. on *nix, load average divided number of processors fits bill perfectly, , retrieve load average managementfactory.getoperatingsystemmxbean().getsystemloadaverage(). unfortunately, returns -1 on windows, call apparently "expensive" called frequently. what's easiest way retrieve similar windows metrics such processor queue length or cpu utilisation, either in pure java or via jni?

you can retrieve cpu utilization on windows using wmi. code , documentation accessing wmi java appears available here.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -