#uname-a
Linuxeuis12.6.9-55.ELsmp#1SMPFriApr2017:03:35EDT2007i686i686i386GNU/Linux
(查看当前操作系统内核信息)
#cat/etc/issue|grepLinux
RedHatEnterpriseLinuxASrelease4(NahantUpdate5)
(查看当前操作系统发行版信息)
#cat/proc/cpuinfo|grepname|cut-f2-d:|uniq-c
8Intel(R)Xeon(R)[email protected]
(看到有8个逻辑CPU,也知道了CPU型号)
#cat/proc/cpuinfo|grepphysical|uniq-c
4physicalid:0
4physicalid:1
(说明实际上是两颗4核的CPU)
#getconfLONG_BIT
32
(说明当前CPU运行在32bit模式下,但不代表CPU不支持64bit)
#cat/proc/cpuinfo|grepflags|grep'lm'|wc-l
8
(结果大于0,说明支持64bit计算.lm指longmode,支持lm则是64bit)
========================================
查看linux系统版本,内核,CPU,MEM,位数的相关命令
1.查看版本,内核
[oracle@svr15~]$cat/etc/issue
RedHatEnterpriseLinuxASrelease4(Nahant)
Kernel/ronan/m
[oracle@svr15~]$cat/proc/version
Linuxversion2.6.9-5.ELsmp([email protected])(gccversion3.4.320041212(RedHat3.4.3-9.EL4))#1SMPWedJan519:30:39EST2005
[oracle@svr15~]$uname-r
2.6.9-5.ELsmp
2.查看cpu,mem
[oracle@svr15~]$grep"modelname"/proc/cpuinfo
modelname:Intel(R)Xeon(R)[email protected]
modelname:Intel(R)Xeon(R)[email protected]
modelname:Intel(R)Xeon(R)[email protected]
modelname:Intel(R)Xeon(R)[email protected]
[oracle@svr15~]$cat/proc/cpuinfo
processor:0
vendor_id:GenuineIntel
cpufamily:6
model:15
modelname:Intel(R)Xeon(R)[email protected]
stepping:6
cpuMHz:1995.006
cachesize:64KB
physicalid:0
siblings:2
fdiv_bug:no
hlt_bug:no
f00f_bug:no
coma_bug:no
fpu:yes
fpu_exception:yes
cpuidlevel:10
wp:yes
flags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmpbenxlmpnimonitords_cpltm2xtpr
bogomips:3956.73
processor:1
vendor_id:GenuineIntel
cpufamily:6
model:15
modelname:Intel(R)Xeon(R)[email protected]
stepping:6
cpuMHz:1995.006
cachesize:64KB
physicalid:0
siblings:2
fdiv_bug:no
hlt_bug:no
f00f_bug:no
coma_bug:no
fpu:yes
fpu_exception:yes
cpuidlevel:10
wp:yes
flags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmpbenxlmpnimonitords_cpltm2xtpr
bogomips:3981.31
processor:2
vendor_id:GenuineIntel
cpufamily:6
model:15
modelname:Intel(R)Xeon(R)[email protected]
stepping:6
cpuMHz:1995.006
cachesize:64KB
physicalid:3
siblings:2
fdiv_bug:no
hlt_bug:no
f00f_bug:no
coma_bug:no
fpu:yes
fpu_exception:yes
cpuidlevel:10
wp:yes
flags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmpbenxlmpnimonitords_cpltm2xtpr
bogomips:3981.31
processor:3
vendor_id:GenuineIntel
cpufamily:6
model:15
modelname:Intel(R)Xeon(R)[email protected]
stepping:6
cpuMHz:1995.006
cachesize:64KB
physicalid:3
siblings:2
fdiv_bug:no
hlt_bug:no
f00f_bug:no
coma_bug:no
fpu:yes
fpu_exception:yes
cpuidlevel:10
wp:yes
flags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmpbenxlmpnimonitords_cpltm2xtpr
bogomips:3981.31
[oracle@svr15~]$grepMemTotal/proc/meminfo
MemTotal:4147280kB
[oracle@svr15~]$free
totalusedfreesharedbufferscached
Mem:41472804138220906001061243865896
-/+buffers/cache:1662003981080
Swap:419292404192924
3.查看操作系统位数
[oracle@svr15~]$ls/#如果有lib64或这个目录,那操作系统就是64位的
binbootdevetchomeinitrdliblost+foundmediamiscmntoptprocrootsbinselinuxsrvsystmpusrvar
[oracle@svr15~]$getconfLONG_BIT
32
[oracle@svr15~]$ldd/sbin/mii-tool
libc.so.6=>/lib/i686/libc.so.6(0x00b2f000)
/lib/ld-linux.so.2(0x00a49000)