Linux system resources view (walker)

Time:2019-10-23

OS version

lsb_release -a
uname -a
cat /proc/version

System resource overview

top

memory

free -h
cat /proc/meminfo

disk

Disk capacity and partition status (unmounted partitions cannot be viewed)
df -Th

Disk capacity and partition status (you can view unmounted partitions)
sudo fdisk -l
sudo lsblk -f

# /lib directory size
du -sh /lib
 
# /lib subdirectory size
du -sh /lib/*

CPU

# view CPU information
cat /proc/cpuinfo

Check the CPU model
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

Total number of cores = number of physical cpus X number of cores per physical CPU 
Total logical CPU = number of physical cpus X number of cores per physical CPU X number of hyperthreads

Check the number of physical cpus
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# view the number of cores per physical CPU
cat /proc/cpuinfo| grep "cpu cores"| uniq

Check the number of logical cpus
cat /proc/cpuinfo| grep "processor"| wc -l

This article is from walker snapshot