12. 查看系統硬件配置
1、內存:內存的信息 主要在 /proc/meminfo 文件中 (free 命令可以查看內存的基本信息)
# 所有可用 RAM 的大小
MemTotal: 1907580 kB
# LowFree 和 HighFree 的總和
MemFree: 234816 kB
# 緩存大小
Buffers: 54020 kB
# 被高速緩存器使用的內存的大小
Cached: 1116392 kB
# 被高速緩存器使用的交換空間的大小
SwapCached: 8 kB
# 在活躍使用中的緩沖或高速緩沖存儲器頁面文件的大小
Active: 811652 kB
# 在不經常使用中的緩沖或高速緩沖存儲器頁面文件的大小
Inactive: 648288 kB
Active(anon): 161188 kB
Inactive(anon): 132688 kB
Active(file): 650464 kB
Inactive(file): 515600 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4194296 kB
# 交換空間的總大小
SwapFree: 4194288 kB
# 未被使用交換空間的大小
Dirty: 0 kB
# 被寫回到磁盤的內存大小
Writeback: 0 kB
# 未映射頁的內存大小
AnonPages: 289568 kB
# 設備和文件等映射的大小
Mapped: 78980 kB
Shmem: 4348 kB
Slab: 145712 kB
SReclaimable: 81736 kB
SUnreclaim: 63976 kB
KernelStack: 2072 kB
PageTables: 30376 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 5148084 kB
Committed_AS: 923588 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 157936 kB
VmallocChunk: 34359567308 kB
HardwareCorrupted: 0 kB
AnonHugePages: 147456 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 6144 kB
DirectMap2M: 2091008 kB
DirectMap1G: 0 kB
2、CPU:CPU 的信息 主要在 /proc/cpuinfo 文件中
# vim /proc/cpuinfo
# 編號
processor : 0
# 制造商
vendor_id : GenuineIntel
# 產品系列代號
cpu family : 6
# 系列中的某一代產品
model : 60
# CPU 的名字、編號和主頻
model name : Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
# CPU 屬于制作更新版本
stepping : 3
# 實際使用主頻
cpu MHz : 3698.989
# 二級緩存大小
cache size : 3072 KB
# 是否具有浮點運算單元
fpu : yes
# 是否支持浮點計算異常
fpu_exception : yes
# 執行 cpuid 指令之前,eax 寄存器中的值
cpuid level : 13
# 是否支持對用戶空間的寫保護
wp : yes
# 當前 CPU 支持的功能
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss
syscall nx pdpe1gb rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock
pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor
lahf_lm abm arat xsaveopt pln pts dts fsgsbase bmi1 avx2 smep bmi2 invpcid
# 系統內核啟動時, CPU 的執行速度
bogomips : 7397.97
# 每次刷新緩存的大小單元
clflush size : 64
# 緩存地址對齊單位
cache_alignment : 64
# 可訪問地址空間總數
address sizes : 42 bits physical, 48 bits virtual
# 對電源管理的支持
power management:
3、磁盤
# 使用 fdisk -l 查看
[root@Demon proc]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d62df
Device Boot Start End Blocks Id System
/dev/sda1 * 1 52 409600 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 52 574 4194304 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 574 13055 100252672 83 Linux
4、網卡
# 使用 dmesg 查看
[root@Demon proc]# dmesg | grep eth0
e1000 0000:02:01.0: eth0: (PCI:66MHz:32-bit) 00:0c:29:fa:56:4d
e1000 0000:02:01.0: eth0: Intel(R) PRO/1000 Network Connection
ADDRCONF(NETDEV_UP): eth0: link is not ready
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device eth0
eth0: no IPv6 routers present
e1000: eth0 NIC Link is Down
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_UP): eth0: link is not ready
8021q: adding VLAN 0 to HW filter on device eth0
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
ADDRCONF(NETDEV_UP): eth0: link is not ready
8021q: adding VLAN 0 to HW filter on device eth0
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
ADDRCONF(NETDEV_UP): eth0: link is not ready
8021q: adding VLAN 0 to HW filter on device eth0
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
ADDRCONF(NETDEV_UP): eth0: link is not ready
8021q: adding VLAN 0 to HW filter on device eth0
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present