CodeLogic.SystemStats
4.4.1
See the version list below for details.
dotnet add package CodeLogic.SystemStats --version 4.4.1
NuGet\Install-Package CodeLogic.SystemStats -Version 4.4.1
<PackageReference Include="CodeLogic.SystemStats" Version="4.4.1" />
<PackageVersion Include="CodeLogic.SystemStats" Version="4.4.1" />
<PackageReference Include="CodeLogic.SystemStats" />
paket add CodeLogic.SystemStats --version 4.4.1
#r "nuget: CodeLogic.SystemStats, 4.4.1"
#:package CodeLogic.SystemStats@4.4.1
#addin nuget:?package=CodeLogic.SystemStats&version=4.4.1
#tool nuget:?package=CodeLogic.SystemStats&version=4.4.1
CodeLogic.SystemStats
Cross-platform system statistics (CPU, memory, processes) for CodeLogic applications on Windows and Linux.
Install
dotnet add package CodeLogic.SystemStats
Quick Start
var statsLib = new SystemStatsLibrary();
// After library initialization via CodeLogic framework:
var cpu = await statsLib.GetCpuStatsAsync();
Console.WriteLine($"CPU: {cpu.Value!.OverallUsagePercent:F1}%");
var memory = await statsLib.GetMemoryStatsAsync();
var snapshot = await statsLib.GetSystemSnapshotAsync();
var topCpu = await statsLib.GetTopProcessesByCpuAsync(5);
Features
- CPU monitoring — static info and live usage snapshots with configurable sampling
- Memory stats — total, used, and available memory for the system
- Process monitoring — enumerate all processes, query by PID, or rank by CPU/memory usage
- System snapshots — combined CPU + memory + uptime in a single call
- Threshold events — fires
HighCpuUsageEvent/HighMemoryUsageEventwhen limits are exceeded
Configuration
Config file: config.systemstats.json
{
"EnableCaching": true,
"CacheDurationSeconds": 5,
"CpuSamplingIntervalMs": 100,
"CpuSamplesForAverage": 3,
"EnableTemperatureMonitoring": true,
"EnableProcessMonitoring": true,
"MaxTopProcesses": 10,
"HighCpuThresholdPercent": 90.0,
"HighMemoryThresholdPercent": 90.0
}
Documentation
Full API docs: https://github.com/Media2A/CodeLogic.Libs
Requirements
- .NET 10.0+
- CodeLogic 3.x or 4.x
- Windows:
System.Diagnostics.PerformanceCounter,System.Management - Linux:
/procfilesystem access
License
MIT — see LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CodeLogic (>= 3.2.0 && < 5.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.16)
- System.Management (>= 9.0.16)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.5.2 | 90 | 5/24/2026 |
| 4.5.1 | 91 | 5/24/2026 |
| 4.5.1-preview.56 | 48 | 5/24/2026 |
| 4.4.2-preview.53 | 45 | 5/24/2026 |
| 4.4.1 | 88 | 5/24/2026 |
| 4.0.5 | 86 | 5/15/2026 |
| 4.0.4 | 98 | 5/9/2026 |
| 4.0.3 | 103 | 5/9/2026 |
| 3.3.1 | 97 | 4/18/2026 |
| 3.3.0 | 102 | 4/18/2026 |
| 3.2.11 | 107 | 4/18/2026 |
| 3.2.10 | 94 | 4/18/2026 |
| 3.2.9 | 93 | 4/18/2026 |
| 3.2.8 | 93 | 4/18/2026 |
| 3.2.7 | 95 | 4/18/2026 |
| 3.2.6 | 95 | 4/18/2026 |
| 3.2.5 | 94 | 4/18/2026 |
| 3.2.4 | 99 | 4/17/2026 |
# CL.SystemStats — Changelog
All notable changes to **CodeLogic.SystemStats** are documented here. Versions follow
[Semantic Versioning](https://semver.org/).
## [4.0.4] — 2026-04-16
### Changed
- README + manifest refresh for the v4 baseline. No functional changes vs 4.0.3.
- `LibraryManifest.Version` now reads from assembly metadata.
## [4.0.2] — 2026-04-09
### Changed
- Annotated SystemStats configuration with `[ConfigField]` for the admin UI surface.
- Aligned with the v4 baseline across all libraries.
### Fixed
- Removed the Windows-only condition on transitive dependencies so the
library actually loads on Linux containers.
## [4.0.0] — 2026-04-09
Major rewrite. Republished as v4.0.0 to reset the version line under the
unified v4 baseline. Cross-platform CPU / memory / disk / network sampling
backed by Windows performance counters and Linux `/proc`.
### Notes
- Earlier history is retained in the
[git log](https://github.com/Media2A/CodeLogic.Libs/commits/main/CL.SystemStats).