Добавил получение количества tcp и udp соединений

This commit is contained in:
2026-07-02 12:21:22 +03:00
parent 8efeb0e4dc
commit e0b13d510d
5 changed files with 43 additions and 3 deletions
@@ -4,9 +4,11 @@ namespace MonitorAgent.Core.Abstraction;
public interface IMonitorService
{
public Task<decimal> GetUptimeAsync(CancellationToken cancellationToken = default);
public Task<decimal> GetUptimeAsync(CancellationToken cancellationToken);
public Task<MemoryInfo> GetMemoryInfoAsync(CancellationToken cancellationToken = default);
public Task<MemoryInfo> GetMemoryInfoAsync(CancellationToken cancellationToken);
public Task<decimal[]> GetLoadAverageAsync(CancellationToken cancellationToken = default);
public Task<decimal[]> GetLoadAverageAsync(CancellationToken cancellationToken);
public Task<ConnectionsCount> GetConnectionsCountAsync(CancellationToken cancellationToken);
}
@@ -0,0 +1,7 @@
namespace MonitorAgent.Core.Models;
public class ConnectionsCount(int tcp, int udp)
{
public readonly int TcpCount = tcp;
public readonly int UdpCount = udp;
}