linux 系统中查看总内存、总硬盘、总逻辑CPU数目

 

001、总内存

[root@PC1 test]# free -h
              total        used        free      shared  buff/cache   available
Mem:           3.7G        830M        1.8G         38M        1.1G        2.5G
Swap:          3.9G          0B        3.9G

 

 

002、总硬盘

[root@PC1 test]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0  100G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   99G  0 part
  ├─centos-root 253:0    0   50G  0 lvm  /
  ├─centos-swap 253:1    0  3.9G  0 lvm  [SWAP]
  └─centos-home 253:2    0 45.1G  0 lvm  /home
sr0              11:0    1  4.3G  0 rom  /run/media/root/CentOS 7 x86_64

 

003、总逻辑CPU数目

[root@PC1 test]# nproc
6

 

posted @ 2023-05-13 11:22  小鲨鱼2018  阅读(87)  评论(0编辑  收藏  举报