1.showrev
------------ show machine, software revision, and patch revision information---------
Hostname: T5220
Hostid: 8513c52e
Release: 5.10
Kernel architecture: sun4v
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.10 Generic_127127-11
2.命令uname -a(linux系统同样支持)
---------print name of current system.参数 -a :Prints basic information currently available from the system.------
SunOS T5220 5.10 Generic_127127-11 sun4v sparc SUNW,SPARC-Enterprise-T5220
3.查看/etc/release
Solaris 10 5/08 s10s_u5wos_10 SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 March 2008
4、使用man isainfo,可以看到这个程序是用来描述系统的指令集和架构的。指令集,对应到就是系统的位数
isainfo -k
用来打印操作系统内核使用的指令集的名称,常见的值,比如i386,代表的是i386 (CPU)体系架构,表示操作系统使用的是i386体系架构对应的指令集。
isainfo -b
用来打印本地指令集的地址空间的位数,即cpu位数,获取到这个cpu位数,如32.
在使用-k -b 时,可以加上-v,开启verbose模式,以打印出更多信息。
# isainfo -kv
64-bit sparcv9 kernel modules
64-bit sparcv9 applications
asi_blk_init vis2 vis
5、查看位数(linux通用) getconf LONG_BIT or getconf WORD_BIT
输入:getconf LONG_BIT
返回结果:64
输入:getconf WORD_BIT
返回结果:32
分析:32位的系统中int类型和long类型一般都是4字节,64位的系统中int类型还是4字节的,但是long已变成了8字节inux系统中可用”getconf WORD_BIT”和”getconf LONG_BIT”获得word和long的位数。64位系统中应该分别得到32和64。
所以该系统为64为Linux系统。