Linux教程

软著统计软件环境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 ~]$ 
这篇关于软著统计软件环境Linux命令的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!