How to get processing data and memory from Windows system in Java?

Asked

Viewed 493 times

4

How do I show in Java code Windows memory and processing usage?

  • 3

    Welcome to Sopt. I think your question is too wide. Could edit and provide more details of what you want to do with this information?

1 answer

3

I believe this class can help you get all the data you want.

OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
operatingSystemMXBean.getSystemCpuLoad();

Take a look at the full documentation here.

  • Thanks for the help, that’s what I was looking for

  • Do not fail to press the check below the up vote if you have solved your question. It is where you mark as answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.