First commit

This commit is contained in:
2026-06-28 01:38:39 +03:00
commit b53c690457
16 changed files with 358 additions and 0 deletions
@@ -0,0 +1,12 @@
using MonitorAgent.Core.Models;
namespace MonitorAgent.Core.Abstraction;
public interface IMonitorService
{
public Task<decimal> GetUptimeAsync(CancellationToken cancellationToken = default);
public Task<MemoryInfo> GetMemoryInfoAsync(CancellationToken cancellationToken = default);
public Task<decimal[]> GetLoadAverageAsync(CancellationToken cancellationToken = default);
}
@@ -0,0 +1,10 @@
namespace MonitorAgent.Core.Models;
public class MemoryInfo
{
public int MemTotal { get; set; }
public int MemFree { get; set; }
public int MemAvailable { get; set; }
public int SwapTotal { get; set; }
public int SwapFree { get; set; }
}
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>