Get memory and CPU usage

后端 未结 5 1071
失恋的感觉
失恋的感觉 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

    On Linux you could open /proc/meminfo as a text file and parse the result.

提交回复
热议问题