vostok / metrics.system

Cross-platform system metrics collection for .NET Core applications.
MIT License
3 stars 2 forks source link

Implement host system metrics collection #1

Closed iloktionov closed 4 years ago

iloktionov commented 4 years ago

CPU

Windows: use GetSystemTimes function Linux: read /proc/stat file

Memory

Windows: use GetPerformanceInfo function, probably a couple of perf counters Linux: read /proc/meminfo or /proc/vmstat files

Disk space (per volume)

This is easy to achieve in managed code with DriveInfo (performance should be tested though).

Disk activity (per device)

TODO: find appropriate sources.

Network

This is easy to achieve in managed code with NetworkInterface.GetIPStatistics() and IPGlobalProperties (performance should be tested though).