系统相关
首页 > 系统相关> > 软著统计软件环境Linux命令

软著统计软件环境Linux命令

作者:互联网

[ruanzhu@host ~]$ #查看内存总数
[ruanzhu@host ~]$ cat /proc/meminfo | grep MemTotal 
MemTotal:       263531624 kB
[ruanzhu@host ~]$ free -h
              total        used        free      shared  buff/cache   available
Mem:           251G         45G        154G        1.3G         51G        203G
Swap:          4.0G          0B        4.0G
[ruanzhu@host ~]$ #Linux查看当前操作系统版本信息
[ruanzhu@host ~]$ 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
[ruanzhu@host ~]$ #Linux查看版本当前操作系统发行版信息(红帽)
[ruanzhu@host ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[ruanzhu@host ~]$ #查看CPU型号
[ruanzhu@host ~]$ cat /proc/cpuinfo | grep name | uniq -c
     80 model name	: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz
[ruanzhu@host ~]$ # 查看物理CPU个数
[ruanzhu@host ~]$ cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2
[ruanzhu@host ~]$ # 查看物理CPU核数
[ruanzhu@host ~]$ cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores	: 20
[ruanzhu@host ~]$ # 查看逻辑CPU的个数
[ruanzhu@host ~]$ cat /proc/cpuinfo| grep "processor"| wc -l
80
[ruanzhu@host ~]$ 

标签:grep,host,cat,ruanzhu,Linux,软著,软件,proc,CPU
来源: https://blog.csdn.net/qq_36434219/article/details/121680227