Jitesh Byahut 2/16/2014 3561

Win32_Processor in WMI C# Asp.Net

Here we are retrieving CPU details of Computer.

Use namespace System.Management

using System.Management;

 

public partial class Win_Win32_Processor : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

 ManagementObjectSearcher objprocessor = new ManagementObjectSearcher("select * from Win32_Processor");

 

        foreach (ManagementObject obj in objprocessor.Get())

        {

            Response.Write("Name" + obj["Name"] + "</br>");

            Response.Write("Description  -  " + obj["Description"] + "</br>");

            Response.Write("Family  -  " + obj["Family"] + "</br>");

            Response.Write("Manufacturer  -  " + obj["Manufacturer"] + "</br>");

            Response.Write("CpuStatus - " + obj["CpuStatus"] + "</br>");

            Response.Write("AddressWidth  -  " + obj["AddressWidth"] + "</br>");

            Response.Write("Architecture  -  " + obj["Architecture"] + "</br>");

            Response.Write("ProcessorId  -  " + obj["ProcessorId"] + "</br>");

            Response.Write("ProcessorType  -  " + obj["ProcessorType"] + "</br>");

            Response.Write("MaxClockSpeed  -  " + obj["MaxClockSpeed"] + "</br>");

            Response.Write("NumberOfCores  -  " + obj["NumberOfCores"] + "</br>");

            Response.Write("DataWidth  -  " + obj["DataWidth"] + "</br>");

            Response.Write("ExtClock  -  " + obj["ExtClock"] + "</br>");

            Response.Write("CurrentVoltage  -  " + obj["CurrentVoltage"] + "</br>");

            Response.Write("CurrentClockSpeed  -  " + obj["CurrentClockSpeed"] + "</br>");

            Response.Write("NumberOfLogicalProcessors -" + obj["NumberOfLogicalProcessors"] + "</br>");

            Response.Write("UpgradeMethod  -  " + obj["UpgradeMethod"] + "</br>");

            Response.Write("LoadPercentage  -  " + obj["LoadPercentage"] + "</br>");

            Response.Write("L2CacheSpeed  -  " + obj["L2CacheSpeed"] + "</br>");

            Response.Write("L2CacheSize  -  " + obj["L2CacheSize"] + "</br>");

        }

    }

}

Demo

View output :

demoimage


Please give your feedback for improving this page