mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-07-14 03:46:58 +00:00
Добавил получение количества tcp и udp соединений
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user