美文网首页
查看 Linux 系统信息

查看 Linux 系统信息

作者: CNSDHH | 来源:发表于2017-12-09 11:21 被阅读0次

#001:查看 Kernel、GCC 以及 RedHat 版本信息

cat /proc/version
Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017

uname -a
Linux localhost.localdomain.com 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

uname -r
3.10.0-693.el7.x86_64

more /etc/system-release
CentOS Linux release 7.4.1708 (Core)

more /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

more /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

#002:查看操作系统的位数

getconf LONG_BIT
64

getconf WORD_BIT
64

file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3d705971a4c4544545cb78fd890d27bf792af6d4, stripped

#003:查看 CPU 个数、核心数和线程数

# 查看 CPU 的物理个数
grep 'physical id' /proc/cpuinfo | sort -u | wc -l
1

# 查看 CPU 的核心数量
grep 'core id' /proc/cpuinfo | sort -u | wc -l
2

# 查看 CPU 的线程数量
grep 'processor' /proc/cpuinfo | sort -u | wc -l
4

# 查看 CPU 的型号
dmidecode -s processor-version
Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz

# 查看 内存 方法
grep MemTotal /proc/meminfo
MemTotal: 3750308 kB

相关文章

网友评论

      本文标题:查看 Linux 系统信息

      本文链接:https://www.haomeiwen.com/subject/pvsuixtx.html