全部博文(89)
分类: LINUX
2009-04-24 09:50:02
##############
#
# cpu
#
##############
# 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
# 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
# grep "model name" /proc/cpuinfo | cut -d: -f2
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
##############
#
# Mem
#
##############
# grep MemTotal /proc/meminfo
MemTotal: 614400 kB
# free -m
total used free shared buffers cached
Mem: 600 23 576 0 0 0
-/+ buffers/cache: 23 576
Swap: 0 0 0
# free -m |grep "Mem" | awk '{print $2}'
600
#########################
#
# 查看CPU位数(32 or 64)
#
#########################
# getconf LONG_BIT
32
#########################
#
# linux版本
#
#########################
# more /etc/redhat-release
CentOS release 5 (Final)
# more /etc/issue
Debian GNU/Linux 4.0 \n \l
# 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
#########################
#
# 内核版本
#
#########################
# uname -r
2.6.18-92.1.18.el5.028stab060.2PAE
# 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
#########################
#
# 查看时区
#
#########################
# date -R
Wed, 25 Feb 2009 02:20:50 +0000
# mv /etc/localtime /etc/localtime.save
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# date -R
Wed, 25 Feb 2009 10:24:26 +0800
#########################
#
# 主机名
#
#########################
# hostname
srv.eddiechen.cn
#########################
#
# selinux情况
#
#########################
# sestatus
SELinux status: disabled
#########################
#
# 网络
#
#########################
# ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
111.111.111.111
# more /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0 eth1
iface eth1 inet static
address 111.111.111.111
netmask 255.255.255.0
gateway 111.111.111.1
# more resolv.conf
nameserver 111.111.111.2
nameserver 111.111.111.3
#########################
#
# 磁盘 分区
#
#########################
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p2 3.9G 1.8G 2.1G 48% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
udev 10M 52K 10M 1% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/cciss/c0d0p1 126M 53M 73M 43% /boot
/dev/cciss/c0d0p8 122G 19G 103G 16% /data
/dev/cciss/c0d0p6 3.9G 2.4G 1.5G 62% /usr
/dev/cciss/c0d0p7 3.9G 1.3G 2.7G 32% /var
# fdisk -l
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 16 128488+ 83 Linux
/dev/cciss/c0d0p2 17 514 4000185 83 Linux
/dev/cciss/c0d0p3 515 17844 139203225 5 Extended
/dev/cciss/c0d0p5 515 1012 4000153+ 82 Linux swap / Solaris
/dev/cciss/c0d0p6 1013 1510 4000153+ 83 Linux
/dev/cciss/c0d0p7 1511 2008 4000153+ 83 Linux
/dev/cciss/c0d0p8 2009 17844 127202638+ 83 Linux