How do I find out the architecture of processor commands in linux?

The question arose, which package to install: http://www.rpmfind.net/linux/rpm2html/search.php?query=qemu-sgabios+noarch.rpm&submit=Search+...&system=&arch=

In /proc/cpuinfo and lscpu, only the architecture of the processor itself is shown. I am not an ironworker, please do not throw stones.

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Model name:            Intel(R) Core(TM)2 CPU          6320  @ 1.86GHz
Stepping:              6
CPU MHz:               1600.000
BogoMIPS:              3732.95
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0,1

# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU          6320  @ 1.86GHz
stepping        : 6
microcode       : 0xd0
cpu MHz         : 1867.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow
bogomips        : 3732.95
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU          6320  @ 1.86GHz
stepping        : 6
microcode       : 0xd0
cpu MHz         : 1600.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow
bogomips        : 3732.95
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
Author: AntonioK, 2015-06-09

3 answers

Architecture: x86_64

What's wrong with that? The CPU architecture you have is amd64, aka x86_64.

 3
Author: AntonioK, 2015-06-09 13:43:21

In general, packages of different architectures can be installed on the system.

If the rpm package system is the main one, then you should focus on which architecture most of the installed packages are built for. example:

$ rpm -qa --qf "%{arch}\n" | sort | uniq -c
     91 i386
      2 i686
     68 noarch
      4 (none)
    464 x86_64

It can be seen that the most packages (464) are for the x86_64 architecture. it is the main one.


For the system deb - the main one is a little easier. there is a basic architecture. example:

$ dpkg --print-architecture
amd64

And (may be) "third-party" architectures. example:

$ dpkg --print-foreign-architectures 
i386

For distributions that are not based on rpm and not on deb, I can't immediately suggest anything. I hope that in the comments my answer will be supplemented by specialists in such distributions.


There is probably a universal solution: ask glibc how the basics of the gnu/linux operating system work.

For a 32-bit build glibc, the answer is 32:

$ getconf LONG_BIT
32

For 64-bit - 64:

$ getconf LONG_BIT
64
 7
Author: aleksandr barakin, 2015-06-09 12:38:14

There are several variants of the names of this technology, which sometimes lead to confusion.

X86-64-initial version. It was under this name that the first preliminary specification was published by AMD.

X64 is the official name of the versions of the Windows and Solaris operating systems, also used as the name of the architecture by Microsoft and Oracle.

AA-64 (AMD Architecture 64) - so the architecture was named by a popular unofficial reference sandpile.org (entering the information almost immediately after the publication of the first preliminary specification) by analogy with IA-64. Hammer Architecture-the name of the first processor cores that supported it-AMD Clawhammer (nailer) and AMD Sledgehammer (sledgehammer).

AMD64 - after the release of the first Clawhammer and Sledgehammer, the name of the AMD developer company appeared in the architecture name. It is now official for the AMD implementation. Yamhill Technology - the first name of the implementation technologies by Intel. Sometimes the name CT (Clackamas Technology) was mentioned.

EM64T is the first official name of the Intel implementation. It stood for Extended Memory 64 Technology. IA-32e-sometimes used in conjunction with EM64T, more often to refer to the long mode, which in Intel documentation is called "IA-32e mode".

Intel 64 is the current official name of the Intel architecture. Intel is gradually abandoning the names IA-32, IA-32e and EM64T in favor of this the name, which is now the only official name for this architecture from Intel.

 0
Author: Mykola Veriga, 2018-09-29 13:07:47