Detect CPU Speed/Memory/Internet Speed using Java?

前端 未结 5 1781
闹比i
闹比i 2020-12-07 01:52

Is it possible within Java to identify the total CPU speed available as well as the total system memory? Network connection speed to the web would also be awesome.

5条回答
  •  没有蜡笔的小新
    2020-12-07 02:19

    Memory stats are available from the Runtime object. And take a look a jconsole, a graphical client that presents information about a JMX-enabled Java Virtual Machine. It shows a lot of information including CPU usage, so you could write your own client that accesses the JMX information too.

提交回复
热议问题