Sashiko.SystemMonitor
0.1.3-alpha
dotnet add package Sashiko.SystemMonitor --version 0.1.3-alpha
NuGet\Install-Package Sashiko.SystemMonitor -Version 0.1.3-alpha
<PackageReference Include="Sashiko.SystemMonitor" Version="0.1.3-alpha" />
<PackageVersion Include="Sashiko.SystemMonitor" Version="0.1.3-alpha" />
<PackageReference Include="Sashiko.SystemMonitor" />
paket add Sashiko.SystemMonitor --version 0.1.3-alpha
#r "nuget: Sashiko.SystemMonitor, 0.1.3-alpha"
#:package Sashiko.SystemMonitor@0.1.3-alpha
#addin nuget:?package=Sashiko.SystemMonitor&version=0.1.3-alpha&prerelease
#tool nuget:?package=Sashiko.SystemMonitor&version=0.1.3-alpha&prerelease
πΈ Sashiko.SystemMonitor
Sashiko.SystemMonitor provides a lightweight snapshot API for reading basic system information from .NET applications.
It is useful for diagnostics, local dashboards, development tooling, and applications that need a simple view of the current machine.
This package is still in alpha because hardware monitoring depends heavily on operating system permissions, drivers, and vendor-specific APIs. The public API is intentionally small while the collectors become more mature.
β¨ Features
- Operating system information
- CPU model, core count, load, and clock data
- GPU information when available
- Memory totals and process usage
- Disk totals and free/used space
- Thermal information when available
- Power and battery information when available
- Snapshot-based API
- Cached platform detection for cheaper repeated snapshots
- Zero external dependencies
π¦ Installation
dotnet add package Sashiko.SystemMonitor
π Usage
using Sashiko.SystemMonitor.Snapshot;
var snapshot = SystemSnapshotProvider.Capture();
Console.WriteLine($"OS: {snapshot.Os.Family} {snapshot.Os.Version}");
Console.WriteLine($"CPU: {snapshot.Cpu.Model}");
Console.WriteLine($"CPU Load: {snapshot.Cpu.LoadPercent}%");
Console.WriteLine($"Memory Used: {snapshot.Memory.UsedBySystemGB} GB");
Console.WriteLine($"Disk Free: {snapshot.Disk.FreeGB} GB");
Snapshots are designed for simple polling when you need periodic system state.
π₯οΈ Platform Notes
SystemMonitor uses built-in operating system APIs and command-line probes only. When a metric is unavailable, blocked by permissions, or unsupported by the current machine, the snapshot returns a neutral value instead of throwing.
- Windows support currently focuses on CPU, memory, disk, and power data available through native APIs.
- Linux support can read richer
/procand/sysdata when those virtual files are exposed by the host. - macOS support uses native command-line tools where available, with thermal data planned for a future collector.
The operating system is detected once per process through Sashiko.Core runtime metadata and reused by the snapshot pipeline, keeping repeated captures lighter and more predictable.
π Data Model
SystemSnapshot contains:
- Os β operating system family, version, architecture, and mobile flag
- Cpu β model, cores, load, and clock information
- Gpu β vendor, model, VRAM, and load information when available
- Memory β total, available, system-used, and process-used memory
- Disk β total, free, and used disk space
- Thermal β CPU, GPU, and system temperatures when available
- Power β battery and power-state information when available
Availability and precision can vary by platform and hardware.
π§ͺ Testing
The test suite verifies that snapshot capture:
- does not throw
- returns a complete snapshot structure
- keeps model types consistent across captures
Platform-specific values may differ by operating system and machine.
πΊοΈ Roadmap
Future versions may include:
- richer network metrics
- improved platform-specific collectors
- configurable fallbacks for unavailable sensors
- historical sampling helpers
- configurable polling utilities
π€ Contributing
Contributions are welcome.
Please see CONTRIBUTING.md in the repository root.
π License
This project is licensed under the Apache License 2.0.
See LICENSE for the full license text.
Copyright Β© 2026 Alexandru Luca (alex98luca)
| 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
- Sashiko.Core (>= 0.4.0)
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 |
|---|---|---|
| 0.1.3-alpha | 35 | 5/5/2026 |
| 0.1.2-alpha | 40 | 5/4/2026 |
| 0.1.1-alpha | 64 | 3/16/2026 |
| 0.1.0-alpha | 62 | 3/14/2026 |