Core hardware abstraction interfaces, models, and platform services powering the ZenMonitor system monitor.
Warning
This repository is a separate NuGet library extracted from the main ZenMonitor project.
Only fully supports Linux at the moment. Windows support is WIP. The structure is still being defined. Expect changes.
# Add the packages to your project
dotnet add package ZenMonitor.Core # Main components
dotnet add package ZenMonitor.Core.Hosting # Init ZenMonitor.Core (optional, requires Dependency Injection)using Microsoft.Extensions.DependencyInjection;
using ZenMonitor.Core.Hosting;
// Optional: Register all services using dependency injection (auto-detects OS)
var services = new ServiceCollection();
services.AddZenMonitor();
// You can also manually register the services you need.
// Skipping dependency injection is possible but not recommended.Important
See CONTRIBUTING.md for the contribution workflow and our Code of Conduct.
- Stack: C# 100%, .NET 10.0.203
- Platform: Linux (Windows is currently WIP)
- License: LGPL-3.0
Each service is defined as an interface in Abstractions.* and it's sub namespaces.
The Linux project provides real implementations, while Windows support is under development.
-
aggregates all telemetry interfaces as properties, providing a single entry point for consumers to simplify usage.
ISystemTelemetry Provides UpdateAllUpdates all records in all interfaces. ICpuCPU usage, temperature, frequency etc. IDriveDisk I/O, partition usage etc. IGpuGPU utilization, VRAM etc. IMemoryRAM usage, swap etc. INetworkNetwork throughput, interfaces etc. IProcessDetails of processes etc. ISystemOS info, uptime, hostname etc. -
aggregates all controller interfaces as properties, providing a single entry point for consumers to simplify usage.
ISystemController Provides IProcessController Running, terminating and killing processes. More will be added in the future!
The repo is split across six projects:
| Project | Descriptions |
|---|---|
ZenMonitor.Core |
Interfaces for consumers, data models and utils for services. |
ZenMonitor.Core.Hosting |
DI registration extensions (AddZenMonitor()) that auto-detect the OS and register the correct platform services. This is optional but recommended. |
ZenMonitor.Core.Linux |
Linux-specific platform implementations for all interfaces. |
ZenMonitor.Core.Windows |
Windows-specific platform implementations for all interfaces. |
ZenMonitor.Core.Debug |
Quick debugging interface providing all info out of the box to the terminal with logging. |
ZenMonitor.Core.Tests |
xUnit test suite. |
Four NuGet packages are built and published:
ZenMonitor.Core— interfaces, models, utils for services.ZenMonitor.Core.Hosting— DI registration helpers.ZenMonitor.Core.Linux— Linux platform services.ZenMonitor.Core.Windows— Windows platform services.
Use using ZenMonitor.Core.Hosting; for initialization and DI, and using ZenMonitor.Core; for core components.
Please read CONTRIBUTING.md for guidelines on code style, commit conventions, and pull requests.