I like to know, in which file the value for the CPU architecture is stored on Linux e.g. x86_64
.
I know several methods (shell commands) in order to access this value like lscpu
or uname -a
.
Furthermore I'm aware of the Qt-Method QSysInfo::currentCpuArchitecture()
. And they all provide the required information.
But I like to create an OS-Interface which retrieves the information of the underlying operating system (in my case Linux) only by using "Linux-Tools" like information from files in /proc/...
.
I also know that I can run a shell command in my program by using popen()
and access the results by the std streamer classes. That's no problem. But unfortunately we don't like run shell commands in our software.
I have looked in several files like
/proc/version
, /proc/cpuinfo
, /proc/devices
or in files in subfolders of /proc
.
But unfortunately it seems to me as if I always overlooked this piece of information. I'm sure that it has to be in a file because the method QSysInfo::currentCpuArchitecture()
access this information, too.
So if somebody knows where this information is placed on Linux I would be happy if he or she let me know.
With kind regards