CPU infos
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
CPU infos
Can anyone tells me how to read some infos from the cpu such as the usage percentage, or the temperature?
ACPI. Or whatever special interface the specific CPU family you are thinking of supports...
Every good solution is obvious once you've found it.
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));
}