uname -muname -m在 Red Hat Enterprise Linux Server 5.4 (Tikanga) 机器上给出 i686 和i686 i386 输出。我需要在那台机器上安装 Oracle 数据库 10g 第 2 版。那么,如何确定内核架构是 32 位还是 64 位?
我正在尝试编写一个脚本,该脚本将根据机器的架构确定操作。我已经uname -m习惯收集架构线了,但是我不知道有多少个ARM架构,也不知道一个是armhf, armel, 还是arm64.
由于这是需要这种脚本来确定脚本的部分是否可以运行或不,我试图找到一个简单的方法来确定该架构armhf,armel或arm64。是否有可用于输出或者任何单行或简单的命令armhf,armel或arm64?
该脚本是专门为 Debian 和 Ubuntu 系统编写的,我正在考虑这一点(如果您不在这些发行版之一上,它会自动退出,但是如果命令存在)
编辑:最近了解到 armel 已死,并且 arm64 软件构建器(PPA 或基于虚拟的)并不是最稳定的。所以我有一个通配符搜索查找arm*和假设 armhf,但仍然有必要找出一个返回三个之一的一个 liner - 无论是 Ubuntu/Debian 命令还是内核调用或其他东西。
我有一台带有 glibc i686 和 x86_64 的机器,还有一个非常烦人的 glibc 问题。
在一台计算机上安装两个同名的库是否正常?我怎么知道执行的是哪个库?
直到最近,我才相信 x86_64 是 i686。好吧,我一定是弄错了,但为什么呢?
[root@machin ~]# yum info glibc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Excluding Packages in global exclude list
Finished
Installed Packages
Name : glibc
Arch : i686
Version : 2.5
Release : 42
Size : 12 M
Repo : installed
Summary : The GNU libc libraries.
License : LGPL
Description: The glibc package contains standard libraries which are …Run Code Online (Sandbox Code Playgroud) 我可以使用一些 Xeon 机器来检查性能。我想找出他们使用的架构,例如 Haswell、Sandybridge 和 Ivybridge。有没有命令可以找出这个?
有谁知道报告系统是 Big Endian 还是 Little Endian 的命令,或者最好的选择是使用 Perl 或一串命令这样的技术吗?
珀尔
# little
$ perl -MConfig -e 'print "$Config{byteorder}\n";'
12345678
# big
$ perl -MConfig -e 'print "$Config{byteorder}\n";'
87654321
Run Code Online (Sandbox Code Playgroud)
欧 | awk
# little
$ echo -n I | od -to2 | awk 'FNR==1{ print substr($2,6,1)}'
1
# big
$ echo -n I | od -to2 | awk 'FNR==1{ print substr($2,6,1)}'
0
Run Code Online (Sandbox Code Playgroud)
我的 Linux 机器报告“uname -a”输出如下:
[root@tom i386]# uname -a
Linux tom 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:34:33 EDT 2009 i686 i686 i386 GNU/Linux
[root@tom i386]#
Run Code Online (Sandbox Code Playgroud)
根据uname的手册页,条目“i686 i686 i386”表示:
附加信息:
[root@tom i386]# cat /proc/cpuinfo
<snip>
vendor_id : GenuineIntel
CPU family : 6
model : 15
model name : Intel(R) Xeon(R) CPU 5148 @ 2.33 GHz
stepping : 6
CPU MHz : 2328.038
cache size : 4096 KB
</snip>
Run Code Online (Sandbox Code Playgroud)
如何区分这三个条目(“i686 i686 i386”)?
我的目标是能够为嵌入式 Linux 进行开发。我有使用 ARM 的裸机嵌入式系统的经验。
我有一些关于针对不同 cpu 目标进行开发的一般问题。我的问题如下:
如果我有一个应用程序编译为在“ x86 目标,linux 操作系统版本 xyz ”上运行,我可以在另一个系统“ ARM 目标,linux 操作系统版本 xyz ”上运行相同的编译二进制文件吗?
如果上述情况不正确,唯一的方法是使用相关工具链“例如 arm-linux-gnueabi”获取应用程序源代码来重建/重新编译?
同样,如果我有一个可加载的内核模块(设备驱动程序)可以在“ x86 目标,linux 操作系统版本 xyz ”上运行,我是否可以在另一个系统“ ARM 目标,linux 操作系统版本 xyz ”上加载/使用相同的编译 .ko ?
如果以上不正确,唯一的方法是使用相关工具链“例如 arm-linux-gnueabi”获取驱动程序源代码来重建/重新编译?
AMD、Intel、Red Hat 和 SUSE为 x86-64 CPU定义了一组“架构级别”。例如,x86-64-v2意味着 CPU 不仅支持基本的 x86-64 指令集,还支持其他指令,如 SSE4.2、SSSE3 或 POPCNT。
如何检查我的 CPU 支持哪些架构级别?
我很熟悉lshw,/proc/cpuinfo等,但有在一个CPU的获得方法CPUID操作码?
我对 CPU 一无所知。我有一个 32 位版本的 ubuntu。但我需要安装 64 位应用程序。我开始知道不可能在 32 位操作系统上运行 64 位应用程序。所以我决定升级我的操作系统。但是我的一个朋友告诉我在新升级之前检查CPU规格。我按照网站上的建议运行此命令。
lscpu命令提供以下详细信息
Architecture: i686
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
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Model name: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Stepping: 10
CPU MHz: 1315.182
CPU max MHz: 2603.0000
CPU min MHz: 1203.0000
BogoMIPS: 5187.07
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 …Run Code Online (Sandbox Code Playgroud) cpu-architecture ×10
linux ×5
cpu ×4
x86 ×2
application ×1
architecture ×1
binary ×1
command-line ×1
debian ×1
glibc ×1
hardware ×1
portability ×1
scripting ×1
ubuntu ×1
yum ×1