Normally I get cpu information from /proc/cpuinfo.
But I don't know gcc functions doing that.
And I don't know how to get monitor card info with gcc.
(like GeForce 4-64M and so on).
Anyone know please tell me?
Thanks,
Normally I get cpu information from /proc/cpuinfo.
But I don't know gcc functions doing that.
And I don't know how to get monitor card info with gcc.
(like GeForce 4-64M and so on).
Anyone know please tell me?
Thanks,
The other awnser you may of been looking for is you read /proc/cpuinfo using standard c/c++ file I/O (and parse it). I couldn't tell if you knew that already or not from your question
But as Salem suggested, you can always parse the output of a program that already knows how to do such things.
gg
# xdpyinfo
xdpyinfo: unable to open display"".
#
# xdpyinfo -ext all
xdpyinfo: unable to open display"".
man or info couldn't help me, it stated xdpyinfo no need arguments.
# scanpci -v and XF86Config both are exact what I want, thanks Salem.
But I still guess there are real C functions() doing so without using <stdlib.h> system() or <stdio.h> popen(). I'm avoiding direct access to system commands.
You could also use lspci