1.cpu 

查看CPU信息
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 
# 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数

# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo| grep "cpu cores"| uniq

# 查看逻辑CPU个数
cat /proc/cpuinfo| grep "processor"| wc -l

# 查看CPU信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

#lscpu命令,查看的是cpu的统计信息.(部分旧版本不支持)

 

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 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: 0x0000859f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        7833    62401536   8e  Linux LVM

Disk /dev/mapper/vg_qdy-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x00000000

 

 

使用#cat  /proc/cpuinfo ,可以知道每个cpu信息,如每个CPU的型号,主频等。


2.内存

#free -m # 查看内存使用量和交换区使用量   

  total       used       free     shared    buffers     cached
Mem:          3690        288       3401          0         15        119
-/+ buffers/cache:        153       3536
Swap:         3951          0       3951

 # cat /proc/meminfo 

#dmidecode -t memory 查看内存硬件信息

 

grep MemTotal /proc/meminfo# 查看内存总量

grep MemFree /proc/meminfo # 查看空闲内存量

lsmod # 列出加载的内核模块


3.磁盘

# lsblk 查看硬盘与分区分而

1 NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
2 sda                         8:0    0   60G  0 disk 
3 ├─sda1                      8:1    0  500M  0 part /boot
4 └─sda2                      8:2    0 59.5G  0 part 
5   ├─vg_qdy-lv_root (dm-0) 253:0    0   50G  0 lvm  /
6   ├─vg_qdy-lv_swap (dm-1) 253:1    0  3.9G  0 lvm  [SWAP]
7   └─vg_qdy-lv_home (dm-2) 253:2    0  5.7G  0 lvm  /home
8 sr0                        11:0    1 1024M  0 rom  
View Code

相关文章:

  • 2021-11-18
  • 2022-12-23
  • 2021-08-11
  • 2022-02-24
  • 2021-08-21
  • 2021-09-25
  • 2022-12-23
猜你喜欢
  • 2021-10-13
  • 2022-12-23
  • 2021-07-27
  • 2021-12-10
  • 2022-02-01
相关资源
相似解决方案