Skip to content

ZenMonitor.Core

Core library for ZenMonitor system telemetry

CodeFactor Grade Code Coverage Nuget Version

A light and fast system monitor

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.


Quick Start

Using the package:

# 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.

Technical Details

  • Stack: C# 100%, .NET 10.0.203
  • Platform: Linux (Windows is currently WIP)
  • License: LGPL-3.0

Project Documentation

Interfaces

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.

  • ISystemTelemetry:

    aggregates all telemetry interfaces as properties, providing a single entry point for consumers to simplify usage.

    ISystemTelemetry Provides
    UpdateAll Updates all records in all interfaces.
    ICpu CPU usage, temperature, frequency etc.
    IDrive Disk I/O, partition usage etc.
    IGpu GPU utilization, VRAM etc.
    IMemory RAM usage, swap etc.
    INetwork Network throughput, interfaces etc.
    IProcess Details of processes etc.
    ISystem OS info, uptime, hostname etc.
  • ISystemController (WIP):

    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!

Project Structure

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.

NuGet Packages

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.


Contributing

Please read CONTRIBUTING.md for guidelines on code style, commit conventions, and pull requests.

Releases

Packages

Used by

Contributors

Languages