一、 查看系統版本:
lsb_release -a
[root@erp-db etc]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Release: 5.3
Codename: Tikanga
[root@erp-db etc]#
二、 查看內核版本:
cat /proc/version
[root@erp-db etc]# cat /proc/version
Linux version 2.6.18-128.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Dec 17 11:41:38 EST 2008
[root@erp-db etc]#
三、 查看操作系統位數
getconf LONG_BIT
[root@erp-db etc]# getconf LONG_BIT
64
[root@erp-db etc]#
四、查看CPU
cat /proc/cpuinfo | grep -i 'model name'
[root@erp-db etc]# cat /proc/cpuinfo | grep -i 'model name'
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E7450 @ 2.40GHz
[root@erp-db etc]#
cat /proc/cpuinfo 查看CPU更多信息
》》物理cpu个数
$ cat /proc/cpuinfo | grep 'physical id'| sort | uniq | wc -l
2
》》每个物理cpu中core的个数(即核数)
$ cat /proc/cpuinfo | grep 'cpu core'| uniq
cpu cores : 4
》》每个物理cpu中逻辑cpu(可能是core、threads或both)的个数
$ cat /proc/cpuinfo | grep 'siblings'| uniq
siblings : 8
五、 查看內存
cat /proc/meminfo
[root@erp-db etc]# cat /proc/meminfo
MemTotal: 24689000 kB
MemFree: 24042044 kB
Buffers: 80424 kB
Cached: 365148 kB
SwapCached: 0 kB
Active: 196404 kB
Inactive: 327084 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 24689000 kB
LowFree: 24042044 kB
SwapTotal: 26738680 kB
SwapFree: 26738680 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 78012 kB
Mapped: 23072 kB
Slab: 74520 kB
PageTables: 6952 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 39083180 kB
Committed_AS: 200724 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 276376 kB
VmallocChunk: 34359460455 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB