一:cpu
[root@srv /]#
more /proc/cpuinfo | grep "model name"
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
[root@srv /]#
grep "model name" /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
[root@srv /]#
grep "model name" /proc/cpuinfo | cut -f2 -d:
Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU X3220 @ 2.40GHz
二:内存
[root@srv /]#
grep MemTotal /proc/meminfoMemTotal: 614400 kB
[root@srv /]#
free -m
total u
sed free shared buffers
cached
Mem: 600 23 576 0 0 0
-/+ buffers/cache: 23 576
Swap: 0 0 0
[root@srv /]#
free -m |grep "Mem" | awk '{print $2}'
600
三:查看CPU位数(32 or 64)
[root@srv /]#
getconf LONG_BIT32
四:查看linux版本
[root@srv /]#
more /etc/redhat-release
CentOS release 5 (Final)
[root@srv /]#
more /etc/issueCentOS release 5 (Final)
Kernel \r on an \m
[root@srv /]#
more /proc/versionLinux version 2.6.18-92.1.18.el5.028stab060.2PAE (
root@rhel5-32-build-xemul) (gc
c version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jan 13 12:31:30 MSK 2009
五:查看内核版本
[root@srv /]#
uname -r
2.6.18-92.1.18.el5.028stab060.2PAE
[root@srv /]#
uname -a
Linux srv.eddiechen.cn 2.6.18-92.1.18.el5.028stab060.2PAE #1 SMP Tue Jan 13 12:31:30 MSK 2009 i686 i686 i386 GNU/Linux
六:查看时区
[root@srv /]#
date -R
Wed, 25 Feb 2009 02:20:50 +0000
[root@srv /]#
mv /etc/localtime /etc/localtime.save[root@srv /]#
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime[root@srv /]#
date -R
Wed, 25 Feb 2009 10:24:26 +0800