32bit or 64bit

Solaris系统:

# isalist –v 
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc 
# isainfo –v 
64-bit sparcv9 applications 
32-bit sparc applications 
# isainfo –b 
64 
启动64位内核模式 
ok. boot kernel/sparcv9/unix 

   -b       Prints the number of bits in the address  space  of
              the native instruction set.

     -k       Prints the name of the instruction set(s)  used  by
              the operating system kernel components such as dev-
              ice drivers and STREAMS modules.

     -n       Prints the name of the native instruction set  used
              by  portable  applications supported by the current
              version of the operating system.

     -v       When used with the- b, -k  or  -n  options,  prints
              more detailed information.

     -x       Prints instruction extensions  to  the  native  ABI
              which are supported by the platform.


Aix 系统:

prtconf查看机器详细的配置信息
如何用命令查看AIX核心是32位还是64位?
#bootinfo -k
显示AIX系统内核是32位还是64
#bootinfo -y
显示机器硬件是32位还是64位
#bootinfo -p
显示机器是否支持64位内核(32:32位;chrp:64位)

AIX:
$bootinfo -k
或者ls -l /boot/unix [/quote]
 
[sj85_1][/]#bootinfo -y
64
[sj85_1][/]#bootinfo -K
32
[sj85_1][/]#lsattr -El proc0
state enable           Processor state False
type  PowerPC_RS64-III Processor type  False


-y 显示的是硬件的位数 
-K 显示的是操作系统的位数 

上面的输出例子是64位的机器用了32位的内核的操作系统


可以把64位ENABLE起来,不过轻易不要这么做!

1.需要的文件集 
bos.64bit是基本操作系统中构成64位运行环境的文件集。如果系统中未安装bos.64bit文件集,将没有/etc/methods /cfg64文件。若/etc/methods/cfg64文件不存在,则SMIT菜单中将没有允许或禁止64位环境的选项。 
可使用命令lslpp -l bos.64bit查看该文件集是否已被安装。若未安装,则可从AIX4.3.3的安装盘中加装该文件集。但安装了该文件集并不能保证系统就能够运行64 位应用,系统是否能运行64位应用还取决于硬件环境。安装了bos.64bit文件集的32位机器上,虽然能够编译64位应用程序,但却不能运行该应 用。 

2.硬件要求 
要运行64位应用,必须要具备64位的硬件环境。在AIX4.3.3中,使用下述步骤确定系统是32位还是64位的硬件结构: 
(1)以root用户身份登录 
(2)执行命令: 
# bootinfo -y 
上述命令返回32或64,对应系统硬件结构为32位或64位。 
另外,可以在任何版本的AIX中使用命令: 
# lsattr -El proc0 
该命令将返回系统处理器的类型。64位处理器的类型列示如下: 
PowerPC_RS64 
PowerPC_RS64 II 
PowerPC_RS64 III 
PowerPC_Power3 
PowerPC_Power3 II 
可以对应上面的类型列表确定系统的硬件结构是32位还是64位。

3.内核扩展与64位内核 
确定系统是否加载了64位的内核扩展,使用命令: 
# genkex |grep 64 
若系统加载了64位的内核扩展,将返回类似下一行的信息: 
149bf58 a3ec /usr/lib/drivers/syscalls64.ext 
但加载了64位的内核扩展并不说明该系统的内核为64位,只有从AIX5.1开始才有64位内核。 
64位内核扩展只是允许在32位内核中编译64位应用。如果32位内核具有64位处理器,则syscalls64.ext文件集将允许运行64位应用。但在AIX5.1中,64位的内核和64位的处理器将使64位的应用具有更好的性能。 
在AIX5.1中,将32位的内核改为64位的内核,可以执行下述命令: 
# ln -sf /usr/lib/boot/unix_64 /unix 
# ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix 
# lslv -m hd5 
# bosboot -ad /dev/<启动硬盘名> 
# shutdown -Fr 

4.32位与64位的兼容性 
大多数情况下,在64位的硬件结构上运行32位的应用是没有问题的,因为64位的硬件兼容64位及32位的软件。但是,32位的硬件上不能运行64位的软件。 
而且,AIX 4.3.3上的32位应用可直接运行于AIX 5.1上,但AIX 4.3.3上的64位应用必须在AIX 5.1上经过重新编译后才可运行。

HP 系统:

getconf KERNEL_BITS

or get all the systemInfo with command:
opt/ignite/bin/print_manifest


Linux是32位还是64位

[root@xxzx-esx-cycjk ~]# getconf LONG_BIT
64
 
如果是64则是64为
[root@xxzx-esx-cycjk ~]# echo $HOSTTYPE
x86_64
[root@xxzx-esx-cycjk ~]# uname -a
Linux xxzx-esx-cycjk2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
出现上面的x86_64也为64为
 
32位的显示:
Linux fc62.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
Linux的具体版本:
[root@xxzx-esx-cycjk ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值