Centos硬件信息

1.物理cpu个数

#cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

  

2.每个物理cpu核数

#cat /proc/cpuinfo | grep "cpu cores" | uniq

  

3.逻辑cpu个数(物理个数*核心数)

#cat /proc/cpuinfo | grep "processor" | wc -l

  

4.内存

#free -m
+ buffers/cache 可用内存 free+buffers+cached
- buffers/cache 已用内存 used - buffers - cached

  

5.查看磁盘和分区

#fdisk -l

  

6.检查磁盘空间占用

#df -lh

  

7.硬盘IO性能

#iostat -d -x 1
每一秒刷新一次,如果%util(%util 一秒中有百分多少的时间用于IO操作 )到100%,说明IO系统已经满负荷.await应该低于5ms

  

8.扇区/块(簇)/页的概念

扇区是磁盘物理上的概念,每个扇区为512字节,这是操作磁盘的最小单位

块是逻辑上的概念,是系统与磁盘的交换单位,一般是4k

查看:

tune2fs -l /dev/sda1|grep Block

  

其中的block_size就是块的大小

 

页是系统与内存打交道的单位:

查看(默认也是4k)

getconf PAGE_SIZE

  

原文地址:https://www.cnblogs.com/itfenqing/p/8041971.html