Windows 8 如何在Windows 8中检查CPU缓存?

Windows 8 如何在Windows 8中检查CPU缓存?,windows-8,cpu,cpu-cache,cpu-speed,Windows 8,Cpu,Cpu Cache,Cpu Speed,我有一个问题:我在Windows8中找不到任何可以显示CPU缓存的面板或命令 有些软件可以获取sysconfig。但这些都不是完整的信息。 它完全是除CPU缓存之外的所有信息。您可以使用WMI查询缓存。下面是一个小C#程序: 谢谢,这是有用的。但我希望它在windows defult中…而不是在编程方法中 using System; using System.Management; using System.Windows.Forms; namespace WMISample { pu

我有一个问题:我在Windows8中找不到任何可以显示CPU缓存的面板或命令

有些软件可以获取sysconfig。但这些都不是完整的信息。
它完全是除CPU缓存之外的所有信息。

您可以使用WMI查询缓存。下面是一个小C#程序:


谢谢,这是有用的。但我希望它在windows defult中…而不是在编程方法中
using System;
using System.Management;
using System.Windows.Forms;

namespace WMISample
{
    public class MyWMIQuery
    {
        public static void Main()
        {
            try
            {
                ManagementObjectSearcher searcher = 
                    new ManagementObjectSearcher("root\\CIMV2", 
                    "SELECT * FROM Win32_Processor"); 

                foreach (ManagementObject queryObj in searcher.Get())
                {
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("Win32_Processor instance");
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("L2CacheSize: {0}", queryObj["L2CacheSize"]);
                    Console.WriteLine("L3CacheSize: {0}", queryObj["L3CacheSize"]);
                }
            }
            catch (ManagementException e)
            {
                MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);
            }
        }
    }
}