Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

I want to be able to track the different CPU usage from different servers Name: ABCDE12k3, ABCDE22k3 So far i can only do it for my Computer ; how

I want to be able to track the different CPU usage from different servers Name: ABCDE12k3, ABCDE22k3 So far i can only do it for my Computer ; how would i do it in C#?using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Threading;using System.Runtime.InteropServices;using System.IO;namespace CPU_USAGE{class Program{static PerformanceCounter cpuUsage;public static void Main(string[] args){cpuUsage =new PerformanceCounter("Processor", "% Processor Time", "_Total");Console.WriteLine(cpuUsage.NextValue() + " %");Thread.Sleep(1000);Console.WriteLine(cpuUsage.NextValue() + " %");Console.Read();DriveInfo[] drives = DriveInfo.GetDrives();foreach (DriveInfo drive in drives){Console.WriteLine(drive.Name);if (drive.IsReady) Console.WriteLine(drive.TotalSize);}Console.Read();}}}

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question