HTHou opened a new pull request, #17290: URL: https://github.com/apache/iotdb/pull/17290
This pull request adds and improves support for collecting system and network metrics on Windows systems. The main changes include implementing Windows-specific logic for tracking open file handles and network interface statistics, ensuring consistent metrics collection across different operating systems. **Windows System Metrics Support:** * Added logic in `SystemRelatedFileMetrics` to count open file handles on Windows using JNA to call the Windows API (`GetProcessHandleCount`), extending existing support for Linux and Mac. [[1]](diffhunk://#diff-90d33f69b4ac03b8af38f66b8a99faf8ad2a20b9f2e49cae29e71654421c64a8R32-R36) [[2]](diffhunk://#diff-90d33f69b4ac03b8af38f66b8a99faf8ad2a20b9f2e49cae29e71654421c64a8L55-R62) [[3]](diffhunk://#diff-90d33f69b4ac03b8af38f66b8a99faf8ad2a20b9f2e49cae29e71654421c64a8R98-R102) [[4]](diffhunk://#diff-90d33f69b4ac03b8af38f66b8a99faf8ad2a20b9f2e49cae29e71654421c64a8L100-R114) [[5]](diffhunk://#diff-90d33f69b4ac03b8af38f66b8a99faf8ad2a20b9f2e49cae29e71654421c64a8R123-R128) **Windows Network Metrics Implementation:** * Implemented the `WindowsNetMetricManager` class to collect network interface statistics and connection counts on Windows by invoking PowerShell and system commands. This includes gathering interface names, bytes/packets sent and received, and active connection numbers for the current process. <img width="3416" height="1676" alt="image" src="https://github.com/user-attachments/assets/60204cfc-037f-435c-b2a6-ae13ea175691" /> <img width="3222" height="1294" alt="image" src="https://github.com/user-attachments/assets/d098911d-70ab-4a2f-921d-9830c136f094" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
