Files
Servers/MoonlightServers.Shared/Admin/Nodes/NodeStatisticsDto.cs

49 lines
1.0 KiB
C#

namespace MoonlightServers.Shared.Admin.Nodes;
public record NodeStatisticsDto(
CpuSnapshotDto Cpu,
MemoryInfoDto Memory,
IReadOnlyList<DiskInfoDto> Disks,
IReadOnlyList<NetworkInterfaceInfoDto> Network,
TimeSpan Uptime
);
public record CpuSnapshotDto(
string ModelName,
double TotalUsagePercent,
IReadOnlyList<double> CoreUsagePercents
);
public record MemoryInfoDto(
long TotalBytes,
long UsedBytes,
long FreeBytes,
long CachedBytes,
long BuffersBytes,
long AvailableBytes,
double UsedPercent
);
public record DiskInfoDto(
string MountPoint,
string Device,
string FileSystem,
long TotalBytes,
long UsedBytes,
long FreeBytes,
double UsedPercent,
long InodesTotal,
long InodesUsed,
long InodesFree,
double InodesUsedPercent
);
public record NetworkInterfaceInfoDto(
string Name,
long RxBytesPerSec,
long TxBytesPerSec,
long RxPacketsPerSec,
long TxPacketsPerSec,
long RxErrors,
long TxErrors
);