private void LogCpu(NodeMetrics nodeMetrics)
        {
            Option <StandardMetrics.Cpu> cpu = StandardMetrics.ExtractCpu(nodeMetrics);

            if (cpu.HasValue)
            {
                _log.Info("Cpu load: {0}% ({1} processors)", cpu.Value.TotalUsage / 100, cpu.Value.ProcessorsNumber);
            }
        }
Пример #2
0
        private void UpdateCpu(NodeMetrics nodeMetrics)
        {
            Option <StandardMetrics.Cpu> cpu = StandardMetrics.ExtractCpu(nodeMetrics);

            if (cpu.HasValue)
            {
                this.state.Cpu = cpu.Value;
                this.log.Info("METRICS: cpu load: {0:0.00}% ({1} processors)", this.state.Cpu.TotalUsage / 100, this.state.Cpu.ProcessorsNumber);
            }
        }