linux查看CPU,内存,机器型号,网卡信息

查看CPU信息(型号)

# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

2  Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz

(看到有2个逻辑CPU, 也知道了CPU型号)

# cat /proc/cpuinfo | grep physical | uniq -c

1 physical id     : 0

1 address sizes   : 36 bits physical, 48 bits virtual

1 physical id     : 1

1 address sizes   : 36 bits physical, 48 bits virtual

说明实际上是1颗2核的CPU

# getconf LONG_BIT

64

说明当前CPU运行在64bit模式下

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

2

(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

再完整看bios详细信息

# dmidecode

查看内存信息

# cat /proc/meminfo

# uname -a

Linux t193 2.6.18-308.13.1.el5xen #1 SMP Tue Aug 21 17:51:21 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

(查看当前操作系统内核信息)

# cat /etc/issue | grep Linux

Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

(查看当前操作系统发行版信息)

dmesg
显示开机信息。kernel会将开机信息存储在ring buffer中。您若是开机时来不及查看信息,可利用dmesg来查看。开机信息亦保存在/var/log目录中,名称为dmesg的文件里

[root@t193 ~]# dmesg | grep hd

SCSI device sda: 1250263728 512-byte hdwr sectors (640135 MB)

SCSI device sda: 1250263728 512-byte hdwr sectors (640135 MB)

硬盘信息

dmesg|grep CPU

Initializing CPU#0

CPU: L1 I cache: 32K, L1 D cache: 32K

CPU: L2 cache: 6144K

Brought up 2 CPUs

Initializing CPU#1

CPU信息

[root@t193 ~]#  dmidecode|grep -P -A 5 "Memory\s+Device"|grep Size

Size: 2048 MB

Range Size: 2 GB

Size: No Module Installed

Range Size: 1 kB

Size: 2048 MB

Range Size: 2 GB

Size: No Module Installed

Range Size: 1 kB

查看每根内存大小,显示4G内存

查看网卡信息

# dmesg | grep -i eth

8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

8139too Fast Ethernet driver 0.9.27

eth1: RealTek RTL8139 at 0xffffc2000002ac00, 94:0c:6d:6c:19:c6, IRQ 17

eth1:  Identified 8139 chip type 'RTL-8100B/8139D'

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

eth0: no IPv6 routers present

peth0: link up, 100Mbps, full-duplex, lpa 0x45E1

peth0: Promiscuous mode enabled.

device peth0 entered promiscuous mode

xenbr0: port 1(peth0) entering forwarding state

eth0: no IPv6 routers present

发表评论