Exemple #1
0
        private Task OnServerMonitoringTicked(ServerMonitoringEventArgs e)
        {
            ServerInfo info = e.ServerInfo;

            ChartModel cmCpu = CreateMonitoringChartModel("Cpu Usage %", info.CpuUsage, "Available Cpu %", 100.0);
            ChartModel cmRam = CreateMonitoringChartModel("Memory Usage (MB)", info.MemoryUsage, "Available Memory (MB)", 100.0 - info.MemoryUsage);
            ChartModel cmHdd = CreateMonitoringChartModel("HDD Usage (MB)", info.DiskUsage, "Available HDD Alanı (MB)", 100.0 - info.DiskUsage);

            return(_context.Clients.All.InvokeAsync("notify", new { info, cmCpu, cmRam, cmHdd }));
        }
Exemple #2
0
 private async void OnTick(object sender, ServerMonitoringEventArgs e)
 {
     await OnServerMonitoringTicked(e);
 }