Page 1 of 1
CPU infos
Posted: Thu Jan 31, 2008 8:34 am
by AlfaOmega08
Can anyone tells me how to read some infos from the cpu such as the usage percentage, or the temperature?
Posted: Thu Jan 31, 2008 9:35 am
by Solar
ACPI. Or whatever special interface the
specific CPU family you are thinking of supports...
Posted: Fri Feb 01, 2008 3:41 pm
by Wave
You can't read usage percentage. You will have to calculate that yourself.
Posted: Sat Feb 02, 2008 9:45 am
by lukem95
You can get CPU model by using the CPUID asm command...
Code: Select all
static void newcpuid(unsigned long op, unsigned long v[4])
{
__asm__ ("cpuid": "=a" (v[0]), "=b" (v[1]), "=c" (v[2]), "=d" (v[3]):"a" (op));
}