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