Hello,
For an app I'm writing, I need to determine the CPU informations (manufacturer, model, architecture etc...). Essentially I need the same as /proc/cpuinfo gives, but in a way easier to use in a program, like a structure.
How to do that in a C program?
The architecture I can get with uname(2) function, e.g.
Code:
#include <stdio.h>
#include <sys/utsname.h>
int main() {
struct utsname tmp;
uname(&tmp);
printf("%s",tmp.machine);
}
Thanks!