System Information
1. OS
# 1: Using os-release file available in Linux’s etc directory.
cat /etc/os-release
# 2. Using version file available in Linux’s proc directory.
cat /proc/version
# 3: Using lsb_release command.(LSB Stands for Linux Standard Base)
lsb_release -a
# 4. Get kernel version
uname -r
# 5. Get glibc version
rpm -q glibc
# 或
ldd --version
2. CPU
查看物理CPU型号
lscpu
查看物理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

浙公网安备 33010602011771号