1. 查看版本
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.7 (Final)
2. 查看cpu
[root@localhost ~]# cat /proc/cpuinfo | grep name
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
显示为四核
3. 查看cpu动态利用率
top后按1
top - 09:29:37 up 9 days, 21:10, 3 users, load average: 0.27, 0.19, 0.17
Tasks: 103 total, 1 running, 101 sleeping, 1 stopped, 0 zombie
Cpu0 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 0.7%us, 0.0%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu2 : 4.3%us, 0.3%sy, 0.0%ni, 94.7%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu3 : 8.0%us, 0.3%sy, 0.0%ni, 90.7%id, 0.0%wa, 0.3%hi, 0.7%si, 0.0%st
Mem: 8164364k total, 8118024k used, 46340k free, 247540k buffers
Swap: 2097208k total, 136k used, 2097072k free, 5024688k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22709 www 18 0 7017m 2.4g 13m S 14.0 30.2 51:14.45 jsvc
27183 www 15 0 64872 22m 1048 S 0.3 0.3 0:58.92 nginx
27189 www 15 0 64712 22m 1048 S 0.3 0.3 0:48.71 nginx
4. 查看内存使用情况
[root@localhost ~]# free
total used free shared buffers cached
Mem: 8164364 8118344 46020 0 249664 5009032
-/+ buffers/cache: 2859648 5304716
Swap: 2097208 136 2097072
第1行 Mem:
total:物理总内存
used:总缓存(包含buffers 与cache ),其中可能部分缓存未实际使用。
buffers :总缓存中未被使用buffers
cached:总缓存中未被使用cache
total = used + free
第2行 -/+ buffers/cached:
used:实际使用内存。 第一行中的used – buffers-cached
free:实际可用内存。 第一行中的buffers +cache + free
5. 硬盘使用情况
[root@localhost ~]# df -hl
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda2 208G 47G 151G 24% /
/dev/sda6 142G 415M 135G 1% /var
/dev/sda3 190G 53G 128G 30% /usr
/dev/sda1 184M 18M 157M 11% /boot
6. 查看网卡信息
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
HWADDR=d4:ae:52:6e:80:3d
IPADDR=xxx.xxx.xx.xxx
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=xxx.xxx.xx.xxx
TYPE=Ethernet
重启网卡
/etc/init.d/network stop
/etc/init.d/network start
/etc/init.d/network reload
/etc/init.d/network restart
service network stop
service network start
service network restart
service network status 查看网卡设备
[root@localhost ~]# service network status
配置设备:
lo eth0 eth1
当前的活跃设备:
lo eth0 eth1
7. 查看域名服务器设置
[root@localhost ~]# cat /etc/resolv.conf
search localdomain
nameserver xxx.xxx.x.xx
nameserver x.x.x.x