Initializes the library and connects to the driver. Logging can be started at any time by calling StartLog(), and subsequently ended by calling StopLog().įor more information on the API, refer to the Function Reference section. The sample data from ReadSample() can be logged to a file. The time interval (in seconds) between samples is available via GetTimeInterval().įurther, the API supports reading from common individual MSRs without having to specify the MSR address or read an entire sample via GetIAFrequency(), GetMaxTemperature(), GetTemperature() and GetTDP().It is recommended that Package Power Limit is used instead of TDP whenever possible, as it is a more accurate upper bound to the package power than TDP. ReadSample() also reads the system time via GetSysTime()at the time the sample was read. One can check if Intel® graphics is available with the help of IsGTAvailable() function before attempting to obtain GT related data. Since GT frequency is not obtained from MSRs, another function called GetGTFrequency() will provide this data. An MSR’s function, which the API obtains from GetMsrFunc(), determines the amount and meaning of data returned from GetPowerData() as described in Table 1. GetPowerData() is called for each sampled MSR and provides the relevant data from that MSR. The MSR ID is used to acquire data for a specific MSR using GetMsrName(),GetMsrFunc() and GetPowerData() functions. MSRs are given an ID from 0 to n-1, where n is the number returned by GetNumMsrs(). ReadSample() obtains the number of sampled MSRs from GetNumMsrs(). The ReadSample()function is used to read samples. Here, the loading of the driver takes place. This library must be initialized at the start of the program by calling IntelEnergyLibInitialize(). 3.2 OverviewĪs the primary API, developers may use Intel® Power Gadget’s EnergyLib32.dll for 32-bit applications or EnergyLib64.dll for 64-bit applications. Although the Intel® Power Gadget API can be used with a sampling frequency ranging from 1 to 1000 milliseconds, the optimal sampling frequency of 100 milliseconds is the default selection on the GUI and is recommended for application developers. Higher the frequency, greater will be the accuracy of the data but poorer will be the performance of the system. Data is acquired from specific MSRs at a fixed sampling frequency. Sample code called “” to use Intel® Power Gadget’s DLL is available for download at the bottom of this page 3.API of Intel® Power Gadget 3.1 Concept of Samplingįor a good understanding of the API, it is essential to be familiar with the concept of sampling.
0 Comments
Leave a Reply. |