dmesg | grep -i ‘eth’[cat /etc/sysconfig/hwconf | grep -i eth][lspci | grep -i ‘eth‘]
Linux 系统服务器的硬件信息
3.1. 查看机器型号
SUSE:~ # dmidecode | grep "Product Name"
Product Name: IBM System x3650 -[7979FJL]-
Product Name: System Planar
Product Name: Power Suppy Backplane
Product Name: PCI-Express Riser Card, Slots 1 & 2
解释说明:通过该命令可以得到该服务器的型号:IBM System x3650 -[7979FJL]-
3.2. 查看linux 系统的内核版本
SUSE:~ # cat /proc/version
Linux version 2.6.32.12-0.7-default (
geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200
解释说明:该服务器中linux 内核的版本号:2.6.32
编译器gcc的版本号:4.3.4
3.3. 查看主板信息
SUSE:~ # dmidecode | grep -i ‘serial number‘
Serial Number: 99FN644
Serial Number: Not Specified
解释说明:该服务器的主板号为:99FN644
3.4. 查看cpu 信息
SUSE:~ # cat /proc/cpuinfo |grep name
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
model name : Intel(R) Xeon(R) CPU X5450 @ 3.00GHz
SUSE:~ # cat /proc/cpuinfo | grep physical | uniq -c
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
SUSE:~ # getconf LONG_BIT
64
解释说明:该服务器所用的cpu是Intel(R) Xeon(R) CPU,型号是X5450,其中共有8个逻辑cpu,物理上是两颗,每一颗都是四核的cpu ,当前cpu 正工作在64位模式下。
3.5. 查看内存信息
SUSE:~ # free -m
total used free shared buffers cached
Mem: 7875 904 6971 0 199 390
-/+ buffers/cache: 314 7561
Swap: 12001 0 12001
解释说明:该服务器的内存总容量是7875Mb(约8Gb),已经使用了904Mb ,还剩余6971Mb 的空间,缓存空间已用314Mb,还剩余7561Mb。该服务器的虚拟内存总容量为12001Mb(越12Gb ),现在还未使用。
3.6. 查看硬盘信息
SUSE:~ # df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 123G 4.9G 112G 5% /
devtmpfs 3.9G 76K 3.9G 1% /dev
tmpfs 3.9G 88K 3.9G 1% /dev/shm
SUSE:~ # fdisk -l
Disk /dev/sda: 146.7 GB, 146685296640 bytes
255 heads, 63 sectors/track, 17833 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002f4fd
Device Boot Start End Blocks Id System
/dev/sda1 * 1531 17833 130953847+ 83 Linux
/dev/sda2 1 1530 12289693+ 82 Linux swap / Solaris
Partition table entries are not in disk order
解释说明: 该服务器的硬盘接口是SCSI类型的,硬盘总容量约150Gb,共有两个分区,第一分区的容量约140Gb ,已经使用了5Gb的大小,第二分区作为虚拟文件使用。
3.7、查看网卡信息
SUSE:~ # dmesg | grep -i ‘eth‘
[ 13.789383] Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v2.0.4 (Mar 03, 2010)
[ 13.966469] eth0: Broadcom NetXtreme II BCM5708 1000Base-T (B2) PCI-X 64-bit 133MHz found at mem ce000000, IRQ 16, node addr 00:1a:64:ca:d5:f8
[ 13.974877] eth1: Broadcom NetXtreme II BCM5708 1000Base-T (B2) PCI-X 64-bit 133MHz found at mem ca000000, IRQ 17, node addr 00:1a:64:ca:d5:fa
[ 20.569505] bnx2: eth1: using MSI
[ 22.169117] bnx2: eth1 NIC Copper Link is Up, 100 Mbps full duplex
解释说明:该服务器使用两块网卡,型号是 NetXtrme II BCM5708 1000Base-T (B2),都是64位的,第一块网卡的ip地址是:00:1a:64:ca:d5:f8,第二块网卡的ip 地址是:00:1a:64:ca:d5:fa.
3.8、查看显卡信息
SUSE:~ # dmesg | grep -i ‘VGA‘
[ 0.000000] Command line: root=/dev/disk/by-id/scsi-SServeRA_vol_7C8A7BCA-part1 resume=/dev/disk/by-id/scsi-SServeRA_vol_7C8A7BCA-part2 splash=silent crashkernel=256M-:128M vga=0x314
[ 0.000000] Kernel command line: root=/dev/disk/by-id/scsi-SServeRA_vol_7C8A7BCA-part1 resume=/dev/disk/by-id/scsi-SServeRA_vol_7C8A7BCA-part2 splash=silent crashkernel=256M-:128M vga=0x314
[ 0.845698] vgaarb: device added: PCI:0000:01:06.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.845701] vgaarb: loaded
[ 1.095862] fb0: VESA VGA frame buffer device
解释说明:该服务器使用的是双显卡,能够清晰的将CPU提供数据进行相应的处理变成显示器能够接受的文字或图象后显示出来。
4.9、查看当前操作系统信息
SUSE:~ # uname -a
Linux SUSE 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64
x86_64 GNU/Linux
解释说明:说明该服务器当前使用的操作系统是Linux SUSE 2.6.32.12