Home linux How to find out the processor command architecture in Linux?

How to find out the processor command architecture in Linux?

Author

Date

Category

The question arose, which package to install: http://www.rpmfind.net/linux/rpm2html/search.php?Query=qemu-Sgabios+noarch.rpm& byubmit=search +…& System = & amp; Arch =

in / proc / cpuinfo and lscpu only the architecture of the processor itself is shown. I am not a carbon black, please do not throw the 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:

Answer 1, Authority 100%

Architecture: x86_64

What does not suit it? CPU architecture you have AMD64, it is x86_64.


Answer 2, Authority 233%

Actually, packages of different architecture can be installed in the system.

If the batch system RPM is a neighbor, then it is worth navigating to what architecture most installed packages are collected. 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 most of the packages (464) – for the architecture x86_64 . She is basic.


For the debt system, it is a little simpler. There are main architecture. Example:

$ dpkg --print-architecture
AMD64.

and (maybe) “third-party” architecture. Example:

$ dpkg --print-foreign-architectures 
i386

for distributions that are not based on rpm and not on deb , I can’t tell you anything right away. I hope that in the comments my answer will be supplemented by specialists on such distributions.


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

for a 32-bit build glibc the response will be 32 :

$ getconf LONG_BIT
32

for 64-bit – 64 :

$ getconf LONG_BIT
64

Answer 3

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

x86-64 is the initial version. It was under this name that AMD published the first draft specification.

x64 is the official version name for Windows and Solaris operating systems, also used as an architecture name by Microsoft and Oracle.

AA-64 (AMD Architecture 64) – this is how the popular unofficial reference sandpile.org called the architecture (adding information almost immediately after the publication of the first preliminary specification) by analogy with IA-64.
Hammer Architecture is named after the first processor cores that supported it – AMD Clawhammer and AMD Sledgehammer.

AMD64 – after the release of the first Clawhammer and Sledgehammer, the name of the developer AMD appeared in the name of the architecture. It is now official for AMD implementation.
Yamhill Technology is the first name for a technology implementation by Intel. The name CT (Clackamas Technology) was sometimes mentioned.

EM64T is the first official name for Intel’s implementation. It stands for Extended Memory 64 Technology.
IA-32e – sometimes used in conjunction with EM64T, more often to denote long mode, which Intel documentation calls “IA-32e mode”.

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

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions