一、查看服务器硬件信息

(1)查看服务器型号、序列号

[root@Master ~]# dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"

(2)查看主板型号
[root@Master ~]# dmidecode |grep -A16 "System Information$"

(3)查看BIOS信息

  1. [root@Master ~]# dmidecode -t bios
  2. # dmidecode 2.12
  3. SMBIOS 2.8 present.
  4.  
  5. Handle 0x0008, DMI type , bytes
  6. BIOS Information
  7. Vendor: HP
  8. Version: U19
  9. Release Date: //
  10. Address: 0xF0000
  11. Runtime Size: kB
  12. ROM Size: kB
  13. Characteristics:
  14. PCI is supported
  15. PNP is supported
  16. BIOS is upgradeable
  17. BIOS shadowing is allowed
  18. ESCD support is available
  19. Boot from CD is supported
  20. Selectable boot is supported
  21. EDD is supported
  22. 5.25"/360 kB floppy services are supported (int 13h)
  23. 5.25"/1.2 MB floppy services are supported (int 13h)
  24. 3.5"/720 kB floppy services are supported (int 13h)
  25. Print screen service is supported (int 5h)
  26. keyboard services are supported (int 9h)
  27. Serial services are supported (int 14h)
  28. Printer services are supported (int 17h)
  29. CGA/mono video services are supported (int 10h)
  30. ACPI is supported
  31. USB legacy is supported
  32. BIOS boot specification is supported
  33. Function key-initiated network boot is supported
  34. Targeted content distribution is supported
  35. UEFI is supported
  36. BIOS Revision: 2.0
  37. Firmware Revision: 2.40

(3)查看内存槽及内存条

  1. [root@Master ~]# dmidecode -t memory | head - | tail -
  2. Memory Device
  3. Array Handle: 0x000A
  4. Error Information Handle: Not Provided
  5. Total Width: bits
  6. Data Width: bits
  7. Size: MB
  8. Form Factor: DIMM
  9. Set: None
  10. Locator: PROC DIMM
  11. Bank Locator: Not Specified
  12. Type: DDR4
  13. Type Detail: Synchronous Registered (Buffered)
  14. Speed: MHz
  15. Manufacturer: HP
  16. Serial Number: Not Specified
  17. Asset Tag: Not Specified
  18. Part Number: -
  19. Rank:
  20. Configured Clock Speed: MHz
  21. Minimum Voltage: 1.2 V
  22. Maximum Voltage: 1.2 V
  23. Configured Voltage: 1.2 V
  24.  
  25. [root@Master ~]#

(4)查看网卡信息

  1. [root@Master ~]# dmesg | grep -i Ethernet
  2. igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.-k
  3. igb ::00.0: Intel(R) Gigabit Ethernet Network Connection
  4. igb ::00.1: Intel(R) Gigabit Ethernet Network Connection
  5. igb ::00.2: Intel(R) Gigabit Ethernet Network Connection
  6. igb ::00.3: Intel(R) Gigabit Ethernet Network Connection
  7. igb ::00.0: Intel(R) Gigabit Ethernet Network Connection
  8. igb ::00.1: Intel(R) Gigabit Ethernet Network Connection

(5) 查看pci信息,即主板所有硬件槽信息

  1. [root@Master ~]# lspci | head -
  2. :00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev )
  3. :01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  4. :01.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  5. :02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  6. :02.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  7. :02.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  8. :02.3 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  9. :03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  10. :03.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
  11. :03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )

、查看CPU信息

(1)查看cpu型号

  1. [root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
  2. Intel(R) Xeon(R) CPU E5- v3 @ .30GHz

(2)查看系统中实际物理CPU的数量(物理)

  1. [root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l

(3)系统中实际物理CPU的数量(核数)

  1. [root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l

(4)查看每个物理CPU中core的个数(即核数)

  1. [root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq
  2. cpu cores :

(5)查看CPU的主频

  1. [root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq
  2. cpu MHz : 1200.000
  3. cpu MHz : 2300.000
  4. cpu MHz : 1200.000

(6)查看CPU的详细信息

  1. [root@Master ~]# cat /proc/cpuinfo | head -
  2. processor : 0 //逻辑处理器的ID
  3. vendor_id : GenuineIntel
  4. cpu family :
  5. model :
  6. model name : Intel(R) Xeon(R) CPU E5- v3 @ .30GHz //CPU型号
  7. stepping :
  8. microcode :
  9. cpu MHz : 1200.000
  10. cache size : KB
  11. physical id :
  12. siblings : 20 //相同物理封装处理器中逻辑处理器数
  13. core id :
  14. cpu cores : 10 //相同物理封装处理器中的内核数
  15. apicid :
  16. initial apicid :
  17. fpu : yes
  18. fpu_exception : yes
  19. cpuid level :
  20. wp : yes
  21. flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm cqm_llc cqm_occup_llc

(7)查看CPU的相关信息

  1. [root@Master ~]# lscpu
  2. Architecture: x86_64
  3. CPU op-mode(s): -bit, -bit
  4. Byte Order: Little Endian
  5. CPU(s):
  6. On-line CPU(s) list: -
  7. Thread(s) per core:
  8. Core(s) per socket:
  9. Socket(s):
  10. NUMA node(s):
  11. Vendor ID: GenuineIntel
  12. CPU family:
  13. Model:
  14. Model name: Intel(R) Xeon(R) CPU E5- v3 @ .30GHz
  15. Stepping:
  16. CPU MHz: 1200.000
  17. BogoMIPS: 4594.43
  18. Virtualization: VT-x
  19. L1d cache: 32K
  20. L1i cache: 32K
  21. L2 cache: 256K
  22. L3 cache: 25600K
  23. NUMA node0 CPU(s): -,-
  24. NUMA node1 CPU(s): -,-
  25. [root@Master ~]#

(8)查看cpu运行模式

  1. [root@Master ~]# getconf LONG_BIT

(9)查看cpu是否支持64bit

  1. [root@Master ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
  2.  
  3. (结果大于0, 说明支持64bit计算. lmlong mode, 支持lm则是64bit)

、查看内存信息
(1)查看内存硬件信息

  1. root@Master ~]# dmidecode -t memory | head - | tail -
  2. Handle 0x000C, DMI type , bytes
  3. Memory Device
  4. Array Handle: 0x000A
  5. Error Information Handle: Not Provided
  6. Total Width: bits
  7. Data Width: bits
  8. Size: MB
  9. Form Factor: DIMM
  10. Set: None
  11. Locator: PROC DIMM
  12. Bank Locator: Not Specified
  13. Type: DDR4
  14. Type Detail: Synchronous Registered (Buffered)
  15. Speed: MHz
  16. Manufacturer: HP
  17. Serial Number: Not Specified
  18. Asset Tag: Not Specified
  19. Part Number: -
  20. Rank:
  21. Configured Clock Speed: MHz
  22. Minimum Voltage: 1.2 V
  23. Maximum Voltage: 1.2 V
  24. Configured Voltage: 1.2 V

(2)最大支持多少内存
[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'

(3)Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大:

(4)Linux 查看内存的频率:
[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'

(5)Linux 查看内存的详细信息:

  1. [root@Master ~]# cat /proc/meminfo |head -
  2. MemTotal: kB
  3. MemFree: kB
  4. Buffers: kB
  5. Cached: kB
  6. SwapCached: kB
  7. Active: kB
  8. Inactive: kB
  9. Active(anon): kB
  10. Inactive(anon): kB
  11. Active(file): kB
  12. Inactive(file): kB
  13. Unevictable: kB
  14. Mlocked: kB
  15. SwapTotal: kB
  16. SwapFree: kB
  17. Dirty: kB
  18. Writeback: kB
  19. AnonPages: kB
  20. Mapped: kB
  21. Shmem: kB

(6)Linux 查看内存的使用情况

  1. [root@Master ~]# free -m // -b,-k,-m,-g show output in bytes, KB, MB, or GB
  2. total used free shared buffers cached
  3. Mem:
  4. -/+ buffers/cache:
  5. Swap:

四、查看硬盘信息
(1)查看挂接的分区状态
[root@Master ~]# fdisk -l |grep Disk

(2)查看硬盘和分区分布

  1. [root@Master ~]# lsblk
  2. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
  3. sda : .4G disk
  4. ├─sda1 : 50M part /boot
  5. ├─sda2 : 100G part /
  6. ├─sda3 : 50G part /home
  7. ├─sda4 : 1K part
  8. ├─sda5 : 16G part [SWAP]
  9. ├─sda6 : .3G part /tmp
  10. └─sda7 : 100G part /usr
  11. sdb : .7T disk
  12. └─sdb1 : .7T part /PureDisk

(3)查看硬盘和分区的详细信息

  1. [root@Master ~]# fdisk -l
  2.  
  3. Disk /dev/sda: 300.0 GB, bytes
  4. heads, sectors/track, cylinders
  5. Units = cylinders of * = bytes
  6. Sector size (logical/physical): bytes / bytes
  7. I/O size (minimum/optimal): bytes / bytes
  8. Disk identifier: 0x000384d9
  9.  
  10. Device Boot Start End Blocks Id System
  11. /dev/sda1 * Linux
  12. Partition does not end on cylinder boundary.
  13. /dev/sda2 Linux
  14. /dev/sda3 Linux
  15. /dev/sda4 Extended
  16. /dev/sda5 Linux swap / Solaris
  17. /dev/sda6 Linux
  18. /dev/sda7 Linux
  19.  
  20. WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
  21.  
  22. Disk /dev/sdb: 92017.3 GB, bytes
  23. heads, sectors/track, cylinders
  24. Units = cylinders of * = bytes
  25. Sector size (logical/physical): bytes / bytes
  26. I/O size (minimum/optimal): bytes / bytes
  27. Disk identifier: 0x00000000
  28.  
  29. Device Boot Start End Blocks Id System
  30. /dev/sdb1 + ee GPT
  31. Partition does not start on physical sector boundary.

(4)查看挂接的分区状态

  1. [root@Master ~]# mount | column -t
  2. /dev/sda2 on / type ext4 (rw)
  3. proc on /proc type proc (rw)
  4. sysfs on /sys type sysfs (rw)
  5. devpts on /dev/pts type devpts (rw,gid=,mode=)
  6. tmpfs on /dev/shm type tmpfs (rw)
  7. /dev/sda1 on /boot type ext4 (rw)
  8. /dev/sda3 on /home type ext4 (rw)
  9. /dev/sda6 on /tmp type ext4 (rw)
  10. /dev/sda7 on /usr type ext4 (rw)
  11. /dev/sdb1 on /PureDisk type ext4 (rw)
  12. none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw

(5)查看挂接的分区状态

  1. [root@Master ~]# swapon -s
  2. Filename Type Size Used Priority
  3. /dev/sda5 partition -

(6)查看硬盘使用情况

  1. [root@Master ~]# df -hT
  2. Filesystem Type Size Used Avail Use% Mounted on
  3. /dev/sda2 ext4 99G 561M 93G % /
  4. tmpfs tmpfs 63G 76K 63G % /dev/shm
  5. /dev/sda1 ext4 45M 38M 4.9M % /boot
  6. /dev/sda3 ext4 50G 52M 47G % /home
  7. /dev/sda6 ext4 13G 34M 13G % /tmp
  8. /dev/sda7 ext4 99G 21G 73G % /usr
  9. /dev/sdb1 ext4 84T 41T 40T % /PureDisk

(7) 硬盘检测命令smartctl

  1. [root@Master ~]# smartctl -a /dev/sda
  2. smartctl 5.43 -- r3573 [x86_64-linux-2.6.-.el6.x86_64] (local build)
  3. Copyright (C) - by Bruce Allen, http://smartmontools.sourceforge.net
  4.  
  5. Vendor: HP
  6. Product: LOGICAL VOLUME
  7. Revision: 3.56
  8. User Capacity: ,,, bytes [ GB]
  9. Logical block size: bytes
  10. Logical Unit id: 0x600508b1001cc8a1b9ec4dacc5ab35dc
  11. Serial number: PDNNK0BRH9U0AG
  12. Device type: disk
  13. Local Time is: Mon Feb :: CST
  14. Device supports SMART and is Enabled
  15. Temperature Warning Disabled or Not Supported
  16. SMART Health Status: OK
  17.  
  18. Error Counter logging not supported
  19. Device does not support Self Test logging

五、查看网卡信息

(1)查看网卡硬件信息
[root@Master ~]#  lspci | grep -i 'eth'

(2)查看系统的所有网络接口

  1. [root@Master ~]# ifconfig -a
  2. [root@Master ~]# ip link show

(3)查看某个网络接口的详细信息,例如eth0的详细参数和指标

  1. [root@Master ~]# ethtool eth0
  2. Settings for eth0:
  3. Supported ports: [ FIBRE ]
  4. Supported link modes: 10000baseT/Full
  5. Supported pause frame use: No
  6. Supports auto-negotiation: No
  7. Advertised link modes: 10000baseT/Full
  8. Advertised pause frame use: No
  9. Advertised auto-negotiation: No
  10. Speed: 10000Mb/s
  11. Duplex: Full
  12. Port: FIBRE
  13. PHYAD:
  14. Transceiver: external
  15. Auto-negotiation: off
  16. Supports Wake-on: d
  17. Wake-on: d
  18. Current message level: 0x00000007 ()
  19. drv probe link
  20. Link detected: yes

(4)查看所有网卡的链路状态

  1. [root@Master ~]# for i in `seq `;do ethtool eth${i} | egrep 'eth|Link';done
  2. Settings for eth0:
  3. Link detected: yes
  4. Settings for eth1:
  5. Link detected: yes
  6. Settings for eth2:
  7. Link detected: no
  8. Settings for eth3:
  9. Link detected: no
  10. Settings for eth4:
  11. Link detected: no
  12. Settings for eth5:
  13. Link detected: no
  14. Settings for eth6:
  15. Link detected: no
  16. Settings for eth7:
  17. Link detected: no
  18. Settings for eth8:
  19. Link detected: no
  20. Settings for eth9:
  21. Link detected: no

六、列出所有PCI设备信息

  1. [root@Master ~]# lspci -tv | more
  2. -+-[:ff]-+-08.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
  3. | +-08.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
  4. | +-09.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
  5. | +-09.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
  6. | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
  7. | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
  8. | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
  9. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  10. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  11. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  12. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  13. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  14. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  15. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  16. | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  17. | +-0d. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  18. | +-0d. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
  19. | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
  20. | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
  21. | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
  22. | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent

Linux查看硬件信息命令的更多相关文章

  1. LINUX查看硬件配置命令

    LINUX查看硬件配置命令   系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinf ...

  2. Linux查看硬件信息(北桥芯片组、南桥、PCI接口、CPU等)

    Linux查看硬件信息(北桥芯片组.南桥.PCI接口.CPU等) Linux查看硬件信息(北桥芯片组.南桥.PCI接口.CPU等) 查看MCH(北桥) 查看ICH(南桥) 查看CPU 查看pci接口设 ...

  3. linux查看硬件信息及驱动设备相关整理

    查看声卡设备:cat /proc/asound/cards 查看USB设备:cat /proc/bus/usb/devices 常用命令整理如下:用硬件检测程序kuduz探测新硬件:service k ...

  4. LINUX 查看硬件配置命令

      系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # ...

  5. linux查看硬件常用命令

          最近整理了平时工作中经常使用的命令,主要分为两大块,一块是查看硬件信息的命令,另一块是监控硬件运转情况的命令.这一篇只涉及查看硬件信息的命令,有关监控硬件运转的命令,我会在下一篇博客中给大 ...

  6. Linux系统下查看硬件信息命令大全

    导读 有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各 ...

  7. linux查看硬件信息的命令(图文)

    发布:脚本学堂/Linux命令  编辑:JB02   2013-12-23 21:48:18  [大 中 小] 转自:http://www.jbxue.com/LINUXjishu/14996.htm ...

  8. Linux 系统下查看硬件信息命令大全

    有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各种硬件 ...

  9. Linux查看硬件信息以及驱动设备的命令

    用硬件检测程序kuduz探测新硬件:service kudzu start ( or restart) 查看CPU信息:cat /proc/cpuinfo 查看板卡信息:cat /proc/pci 查 ...

随机推荐

  1. 关于springcloud的一些问题总结.txt

    @Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCo ...

  2. Oracle执行SQL查询语句的步骤

    Oracle执行SQL查询语句的步骤 如果用户在SQL*Plus下输入了如下查询语句:SELECT * FROM dept: 查询语句的处理主要包括三个过程:编译(parse).执行(execute) ...

  3. 02-matplotlib-散点图

    import numpy as np import matplotlib.pyplot as plt ''' 散点图显示两组数据的值,每个点的坐标位置的值决定 用户观察两种变量的相关性: 正相关 负相 ...

  4. host命令详解

    基础命令学习目录首页 原文链接:https://blog.csdn.net/xin_y/article/details/53924763 分析域名查询工具,测试域名系统工作是否正常 语法: host ...

  5. Java多线程编程之不可变对象模式

           在多线程环境中,为了保证共享数据的一致性,往往需要对共享数据的使用进行加锁,但是加锁操作本身就会带来一定的开销,这里可以使用将共享数据使用不可变对象进行封装,从而避免加锁操作. 1. 模 ...

  6. 作业 20181127-3 互评Beta版本

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2448 组名:可以低头,但没必要 组长:付佳 组员:张俊余 李文涛 孙赛佳 ...

  7. 20172313『Java程序设计』课程结对编程练习_四则运算第二周阶段总结

    20172313『Java程序设计』课程结对编程练习_四则运算第二周阶段总结 结对伙伴 20172326康皓越 博客地址(http://www.cnblogs.com/326477465-a/p/90 ...

  8. 【每日scrum】第一次冲刺day3

    学习安卓,和小伙伴讨论百度API调用的问题,最后决定自己写地图

  9. 关于注册github

  10. html border画三角形

    最近遇到了问题就是画推进条类似于