Ceci est une ancienne révision du document !


Informations sur le CPU

But

Le but est de pouvoir récupérer les mèmes informations que sur le Gestionnaire de Tâches

Via WMI

Informations générales

wql sur root/CIMV2
Select * from Win32_Processor
instance of Win32_Processor

 show
{
	AddressWidth = 64;
	Architecture = 9;
	AssetTag = “To Be Filled By O.E.M.”;
	Availability = 3;
	Caption = “Intel64 Family 6 Model 158 Stepping 9”;
	Characteristics = 252;
	CpuStatus = 1;
	CreationClassName = “Win32_Processor”;
	CurrentClockSpeed = 3600;
	CurrentVoltage = 10;
	DataWidth = 64;
	Description = “Intel64 Family 6 Model 158 Stepping 9”;
	DeviceID = “CPU0”;
	ExtClock = 100;
	Family = 198;
	L2CacheSize = 1024;
	L3CacheSize = 8192;
	L3CacheSpeed = 0;
	Level = 6;
	LoadPercentage = 2;
	Manufacturer = “GenuineIntel”;
	MaxClockSpeed = 3600;
	Name = “Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz”;
	NumberOfCores = 4;
	NumberOfEnabledCore = 4;
	NumberOfLogicalProcessors = 8;
	PartNumber = “To Be Filled By O.E.M.”;
	PowerManagementSupported = FALSE;
	ProcessorId = “BFEBFBFF000906E9”;
	ProcessorType = 3;
	Role = “CPU”;
	SecondLevelAddressTranslationExtensions = FALSE;
	SerialNumber = “To Be Filled By O.E.M.”;
	SocketDesignation = “U3E1”;
	Status = “OK”;
	StatusInfo = 3;
	SystemCreationClassName = “Win32_ComputerSystem”;
	SystemName = “PC-THIERRY”;
	ThreadCount = 8;
	UpgradeMethod = 1;
	Version = “”;
	VirtualizationFirmwareEnabled = FALSE;
	VMMonitorModeExtensions = FALSE;
};

Charge

Avec la requette WMI ci dessous, on récupére CurrentClockSpeed et LoadPercentage.

LoadPercentage retourne l'utilisation du processeur a l'instant T.

CurrentClockSpeed la vitesse du CPU, mais n'a pas l'air de fluctuer comme on pourrait s'y attendre quand on regarde les performances dans le Gestionnaire de Tâches.

wql sur root/CIMV2
Select CurrentClockSpeed,CurrentVoltage,LoadPercentage from Win32_Processor
instance of Win32_Processor
{
	CurrentClockSpeed = 3600;
	CurrentVoltage = 10;
	DeviceID = “CPU0”;
	LoadPercentage = 6;
};

Sources & Ressources

Vous pourriez laisser un commentaire si vous étiez connecté.