详细转载自:
http://www.cnblogs.com/ggjucheng/archive/2013/01/14/2859613.html
cpu信息
cpu统计信息
[root@site1 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 16 On-line CPU(s) list: 0-15 Thread(s) per core: 2 Core(s) per socket: 8 座: 1 NUMA 节点: 1 厂商 ID: GenuineIntel CPU 系列: 6 型号: 45 型号名称: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz 步进: 7 CPU MHz: 2536.875 BogoMIPS: 4000.43 虚拟化: VT-x L1d 缓存: 32K L1i 缓存: 32K L2 缓存: 256K L3 缓存: 20480K NUMA 节点0 CPU: 0-15
cpu详细信息,可以知道每个cpu的信息,如每个cpu的型号,主频等。
cat /proc/cpuinfo
2. 内存信息
概要查看
free -m
详细信息
cat /proc/meminfo
查看内存硬件信息
dmidecode -t memory
3. 磁盘信息
硬盘和分区的详细信息
fdisk -l
查看硬盘和分区分布
[root@site1 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 278.9G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 278.4G 0 part ├─centos-root 253:0 0 50G 0 lvm / ├─centos-swap 253:1 0 15.7G 0 lvm [SWAP] └─centos-home 253:2 0 212.6G 0 lvm /home sdb 8:16 0 185.8G 0 disk sdc 8:32 0 931G 0 disk └─sdc1 8:33 0 931G 0 part /kvmdata sdd 8:48 0 931G 0 disk sde 8:64 0 931G 0 disk sdf 8:80 0 9.3G 0 disk └─testvg-testlv1 253:3 0 25G 0 lvm /mnt sdg 8:96 0 9.3G 0 disk └─testvg-testlv1 253:3 0 25G 0 lvm /mnt sdh 8:112 0 9.3G 0 disk └─testvg-testlv1 253:3 0 25G 0 lvm /mnt
4. 网卡信息
查看系统的所有网络接口
第一种 ifconfig -a 第二种 ip link show 第三种 ip a
查看网卡硬件信息
[root@site1 ~]# lspci | grep -i 'eth' 01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe 01:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe 02:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe 05:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01) 05:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
某个网卡详细信息
# ethtool em1 Settings for em1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on Supports Wake-on: g Wake-on: d Current message level: 0x000000ff (255) drv probe link timer ifdown ifup rx_err tx_err Link detected: yes
5. 其它
查看pci信息,即主板所有硬件槽信息。
lspci
如果要更详细的信息:lspci -v 或者 lspci -vv
如果要看设备树:lscpi -t
查看是否有raid卡 lspci |grep -i raid
如果要查看所有有用信息
dmidecode -q
dmidecode以一种可读的方式dump出机器的DMI(Desktop Management Interface)信息。这些信息包括了硬件以及BIOS,既可以得到当前的配置,也可以得到系统支持的最大配置,比如说支持的最大内存数等。
转载于:https://blog.51cto.com/muyuluo/1915324