Empulse Group a collection of notes from a sys admin, musician, and father

2Jan/110

Linux: Find CPU architecture type

Today at work this guy needed assistance with running a binary that converts HTML to PDF. It was not able to load a specific library that I did find to be installed.

After using 'strace' I noticed that it was not looking in the /usr/lib64 directory where this library file was stored.  So, I needed to show him that the server was running in 64 bit mode which the app did not support.

[root@www ~]# uname -a
Linux www.empulsegroup.com 2.6.31-302-rs #7 SMP Thu Oct 29 22:57:03 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@www ~]# uname -m
x86_64
[root@www ~]# arch
x86_64

Kernel Version:

  • x86_64 shows that this is a 64 bit system
  • i386/i486/i586/i686 would show to be a 32 bit system
[root@www ~]# grep flag /proc/cpuinfo
flags : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
flags : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
flags : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
flags : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch

CPU Modes:

  • lm flag is Long Mode CPU - 64 bit CPU
  • Real Mode is a 16 big CPU
  • Protected Mode is a 32 bit CPU

To find the architecture type of an RPM package:

[root@www ~]# rpm -qa --qf "%{n}-%{arch}\n" | grep httpd
httpd-x86_64
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.