Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 java 编写,我需要定期获取我的 NIC 的输出(与我在 Windows 任务管理器中看到的相同信息),有没有办法在 java 中对 NIC 的当前吞吐量进行采样?
Java 没有内置方法来访问低级操作系统信息,例如 NIC 利用率。您可以编写一个 JNI 库,使用 C/C++ API 访问特定操作系统的信息。