1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > java 远程查看电脑磁盘 请问你如何在Java中监视计算机的CPU 内存和磁盘使用情况?...

java 远程查看电脑磁盘 请问你如何在Java中监视计算机的CPU 内存和磁盘使用情况?...

时间:2019-05-23 12:30:58

相关推荐

java 远程查看电脑磁盘 请问你如何在Java中监视计算机的CPU 内存和磁盘使用情况?...

在JDK1.7中,您可以通过com.sun.management.OperatingSystemMXBean..这与java.lang.management.OperatingSystemMXBean.

long getCommittedVirtualMemorySize()

Returns the amount of virtual memory that is guaranteed to be available to the running process in bytes, or -1 if this operation is not supported.

long getFreePhysicalMemorySize()

Returns the amount of free physical memory in bytes.

long getFreeSwapSpaceSize()

Returns the amount of free swap space in bytes.

double getProcessCpuLoad()

Returns the "recent cpu usage" for the Java Virtual Machine process.

long getProcessCpuTime()

Returns the CPU time used by the process on which the Java virtual machine is running in nanoseconds.

double getSystemCpuLoad()

Returns the "recent cpu usage" for the whole system.

long getTotalPhysicalMemorySize()

Returns the total amount of physical memory in bytes.

long getTotalSwapSpaceSize()

Returns the total amount of swap space in bytes.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。