Get memory and CPU usage

后端 未结 5 1070
失恋的感觉
失恋的感觉 2020-12-09 21:08

I would like to get the total physical memory, the CPU usage, and and the amount of memory being used. I have looked into Runtime.freeMemory(), but that isn\'t

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 21:39

    You can use SIGAR (http://support.hyperic.com/display/SIGAR/Home). I believe this is cross platform (I've only tried it on Windows) and I know it works (because I've tried it).

    Javadoc: http://www.hyperic.com/support/docs/sigar/

    Binaries: http://support.hyperic.com/display/SIGAR/Home#Home-binaries

提交回复
热议问题