My Linux machine reports "uname -a" outputs as below:
我的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]#
As per man page of uname, the entries "i686 i686 i386" denotes:
根据uname的man页面,条目“i686 i686 i386”表示:
- machine hardware name (i686)
- 机硬件名称(i686)
- processor type (i686)
- 处理器类型(i686)
- hardware platform (i386)
- 硬件平台(i386)
Additional information:
附加信息:
[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>
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时,我发现了RPM目录下的两个目录i386和i686。
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
.
因此,如果我想要自动将生成的RPM复制到一个位置,我应该在shell脚本中指定哪个目录?我使用uname -p,得到i686,但RPM生成i386。
2 个解决方案
#1
3
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.
在您的示例中,它告诉您的是,您正在64位处理器上运行32位操作系统。代码与386兼容。
They are:
它们是:
- the machine hardware name (sometimes called the hardware class or hardware type).
- 机器硬件名称(有时称为硬件类或硬件类型)。
- the hardware platform name (sometimes called the hardware implementation)
- 硬件平台名称(有时称为硬件实现)
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.
第一个是关于被检测到的CPU。第二个关于目标体系结构的,uname程序被编译成。在某些CPU上,它们默认为“未知”。内核应该提供这些信息,但如果没有可用的信息,则默认为硬编码字符串。
In my case:
在我的例子中:
$ uname -a
美元uname -
Linux godiva 2.6.30-amd64 #1 SMP Tue Oct 27 09:12:19 UTC 2009 x86_64 GNU/Linux
$ uname --machine
美元uname -机
x86_64
$ uname --hardware-platform
美元uname -硬件平台
unknown
#2
0
In this case I think the distinction is that hardware platform is family hardware ie. the i386 compatible set or processors. Whereas machine refers to your particular machine ie a i686 which is in the famility on i386 processors.
在这种情况下,我认为区别在于硬件平台是家庭硬件ie。i386兼容的集合或处理器。而机器指的是你的特定机器(i686),它在i386处理器上是很熟悉的。
#1
3
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.
在您的示例中,它告诉您的是,您正在64位处理器上运行32位操作系统。代码与386兼容。
They are:
它们是:
- the machine hardware name (sometimes called the hardware class or hardware type).
- 机器硬件名称(有时称为硬件类或硬件类型)。
- the hardware platform name (sometimes called the hardware implementation)
- 硬件平台名称(有时称为硬件实现)
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.
第一个是关于被检测到的CPU。第二个关于目标体系结构的,uname程序被编译成。在某些CPU上,它们默认为“未知”。内核应该提供这些信息,但如果没有可用的信息,则默认为硬编码字符串。
In my case:
在我的例子中:
$ uname -a
美元uname -
Linux godiva 2.6.30-amd64 #1 SMP Tue Oct 27 09:12:19 UTC 2009 x86_64 GNU/Linux
$ uname --machine
美元uname -机
x86_64
$ uname --hardware-platform
美元uname -硬件平台
unknown
#2
0
In this case I think the distinction is that hardware platform is family hardware ie. the i386 compatible set or processors. Whereas machine refers to your particular machine ie a i686 which is in the famility on i386 processors.
在这种情况下,我认为区别在于硬件平台是家庭硬件ie。i386兼容的集合或处理器。而机器指的是你的特定机器(i686),它在i386处理器上是很熟悉的。