mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-07-14 03:46:58 +00:00
First commit
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user