linux下看系统配
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
MemTotal: 614400 kB
[root@srv /]# free -m
total used 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
vmstat [-a] [-n] [delay [ count]]
vmstat [-f] [-s] [-m]
vmstat [-S unit]
vmstat [-d]
vmstat [-p disk partition]
vmstat [-V]
vmstat, Virtual Meomory javacript::(虚拟内存统计), 可对操作系统的虚拟内存、进程、CPU活动进行监视. 它是对系统的整体情况进行统计, 但不能针对某个进程进行深入分析.
-a 开启 or 关闭显示 active/inactive 内存
-n 开启 or 关闭周期性循环输出时, 输出的头部信息仅显示一次
delay 两次输出之间的延迟时间
count 按照这个指定的时间间隔统计的次数
-f 开启 or 关闭显示自系统启动后 forks 的数目, 包括(fork, vfork and clone system calls)
-m 显示 slabinfo
-s 开启 or 关闭以表格形式显示的 event counters and memory javacript::
-d 显示 disk javacript::
-p 显示参数所指定的分区的详细信息
-S (k|K|m|M) 以k|kB|m|MB为单位显示,对应转换(1000|1024|1000000|1048576)
CentOS release 5 (Final)
[root@srv /]# more /etc/issue
CentOS release 5 (Final)
Kernel \r on an \m
[root@srv /]# more /proc/version
Linux version 2.6.18-92.1.18.el5.028stab060.2PAE ([email=root@rhel5-32-build-xemul]root@rhel5-32-build-xemul[/email]) (gc
2.6.18-92.1.18.el5.028stab060.2PAE
[root@srv /]# uname -a
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
[root@srv /]# ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
[root@srv /]# cat /etc/sysconfig/network
NETWORKING="yes"
GATEWAY="192.0.2.1"
nameserver 208.74.168.131
nameserver 208.74.168.132
197
[root@srv /]# yum list installed | wc -l
198
十一:磁盘和分区
[root@srv /]# df -h
Filesystem Size Used Avail Use % Mounted on
/dev/simfs 10G 353M 9.7G 4% /
[root@srv /]# du -sh
353M
[root@srv /]# du /etc -sh
4.6M /etc
一:cpu
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
二:内存
MemTotal: 614400 kB
[root@srv /]# free -m
total used 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
vmstat [-a] [-n] [delay [ count]]
vmstat [-f] [-s] [-m]
vmstat [-S unit]
vmstat [-d]
vmstat [-p disk partition]
vmstat [-V]
vmstat, Virtual Meomory javacript::(虚拟内存统计), 可对操作系统的虚拟内存、进程、CPU活动进行监视. 它是对系统的整体情况进行统计, 但不能针对某个进程进行深入分析.
-a 开启 or 关闭显示 active/inactive 内存
-n 开启 or 关闭周期性循环输出时, 输出的头部信息仅显示一次
delay 两次输出之间的延迟时间
count 按照这个指定的时间间隔统计的次数
-f 开启 or 关闭显示自系统启动后 forks 的数目, 包括(fork, vfork and clone system calls)
-m 显示 slabinfo
-s 开启 or 关闭以表格形式显示的 event counters and memory javacript::
-d 显示 disk javacript::
-p 显示参数所指定的分区的详细信息
-S (k|K|m|M) 以k|kB|m|MB为单位显示,对应转换(1000|1024|1000000|1048576)
三:查看CPU位数(32 or 64)
32
四:查看linux版本
CentOS release 5 (Final)
[root@srv /]# more /etc/issue
CentOS release 5 (Final)
Kernel \r on an \m
[root@srv /]# more /proc/version
Linux version 2.6.18-92.1.18.el5.028stab060.2PAE ([email=root@rhel5-32-build-xemul]root@rhel5-32-build-xemul[/email]) (gc
c version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jan 13 12:31:30 MSK 2009
五:查看内核版本
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
六:查看时区
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
七:主机名
srv.eddiechen.cn
八:查看selinux情况
SELinux status: disabled
九:网络
[root@srv /]# ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
207.154.202.216
[root@srv /]# cat /etc/sysconfig/network
NETWORKING="yes"
GATEWAY="192.0.2.1"
HOSTNAME="srv.eddiechen.cn"
dns
nameserver 208.74.168.131
nameserver 208.74.168.132
nameserver 4.2.2.1
十:已经安装的软件包
197
[root@srv /]# yum list installed | wc -l
198
十一:磁盘和分区
[root@srv /]# df -h
Filesystem Size Used Avail Use % Mounted on
/dev/simfs 10G 353M 9.7G 4% /
[root@srv /]# du -sh
353M
[root@srv /]# du /etc -sh
4.6M /etc