Visual Studio C# Project of Process Performance Monitoring on Windows
Goal: This project isn't completed yet. The main goal of this project is to query performance counters of network and IO usage of a process.
To get the network usage information by process, there's no default windows PerformanceCounter provided by windows, but it's possible. We need to query IPV4/IPV6 Table statistics, and filter by UDP/TCP protocol statistics and sum all traffic information for each entry (connection by pid/port traffic statistic).
This project has neither optimized code, nor standarized and well structured code. I've spent now 7 hours! =). Please, forgive me!
I'm planning to transform this in a solution with 4 projects:
- Library
- Application code that uses the library
- Rest API Service that monitores IO activity and a specific PID traffic
- Test Project
I'll come back to this project as soon as I can make the same thing in pure C++.
New Features:
-
I'm able to get network information by process/pid now, But this is information is only filtered by PID, it means that it's not, currently, filtered by network interface or connection port yet.
-
I've split the project in Library and application code. Next Step: Creates a Rest API service that provides me the IO activity I'm interested in.