“机器硬件"与“机器硬件"之间的区别在于:和“硬件平台" [英] Difference between "machine hardware" and "hardware platform"

查看:112
本文介绍了“机器硬件"与“机器硬件"之间的区别在于:和“硬件平台"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Linux机器报告如下"uname -a"输出:

My Linux machine reports "uname -a" outputs as below:

[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]#

按照uname的手册页,条目"i686 i686 i386"表示:

As per man page of uname, the entries "i686 i686 i386" denotes:

  • 机器硬件名称(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>

只需添加一下,为什么我有兴趣知道它.在此计算机上构建RPM时,在RPM目录下找到两个目录i386i686.

Just to add, why I am interested to know it. When I build an RPM on this machine, I found two directories under RPM directory, i386 and i686.

因此,如果我想自动将生成的RPM复制到某个位置,那么应该在Shell脚本中指定哪个目录?我正在使用提供i686uname -p,但是RPM生成了i386.

So if I want to automate the copying of a generated RPM to a location, which directory should I specify in the shell script? I am using uname -p which gives i686 but RPM generated i386.

推荐答案

就您所知,您正在64位处理器上运行32位操作系统.代码与386兼容.

In your case what it tells you is, you're running a 32-bit operating system on a 64-bit processor. Code is compatible with a 386.

它们是:

  • 机器硬件名称(有时称为硬件类或硬件类型).
  • 硬件平台名称(有时称为硬件实现)

第一个关于检测到的CPU的信息.关于uname程序编译到的目标体系结构的第二篇文章.在某些CPU上,它们默认为未知".内核应提供此信息,但是如果没有可用的内容,则默认为硬编码字符串.

The first one says something about the CPU that was detected. The second one about target architecture the uname program was compiled to. On some CPU's they default to 'unknown'. The kernel should provide this information, but if there is nothing available it defaults to hard coded strings.

就我而言:

$ uname -a

$ uname -a

Linux godiva 2.6.30-amd64 #1 SMP Tue Oct 27 09:12:19 UTC 2009 x86_64 GNU/Linux

$ uname --machine

$ uname --machine

x86_64

$ uname-硬件平台

$ uname --hardware-platform

unknown

这篇关于“机器硬件"与“机器硬件"之间的区别在于:和“硬件平台"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆