linux 查询内存和核心数,Linux下查看操作系统信息、内存情况及cpu信息:cpu个数、核心数、线程数...
1、查看物理CPU的個數(shù)
[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
1
2、查看邏輯CPU的個數(shù)
[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "processor"|wc -l
4
3、查看CPU是幾核(即,核心數(shù))
[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "cores"|uniq
cpu cores?? ?: 4
4、查看CPU的主頻
[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep MHz|uniq
cpu MHz?? ??? ?: 2499.982
5、當前操作系統(tǒng)內核信息
[root@MysqlCluster01 ~]# uname -a
Linux MysqlCluster01 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
6、當前操作系統(tǒng)發(fā)行版信息
[root@MysqlCluster01 ~]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
7、內存使用情況
[root@MysqlCluster01 ~]# free -m
total ? ? ? used ? ? ? free ? ? shared ? ?buffers ? ? cached
Mem: ? ? ? ? ?7863 ? ? ? 2738 ? ? ? 5125 ? ? ? ? ?0 ? ? ? ?141 ? ? ? ?835
-/+ buffers/cache: ? ? ? 1761 ? ? ? 6102
Swap: ? ? ? ? 3967 ? ? ? ? ?0 ? ? ? 3967
其他命令:
[root@MysqlCluster01 ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
4 ?AMD Opteron(tm) Processor 6380
看到有8個邏輯CPU, 也知道了CPU型號
[root@MysqlCluster01 ~]# getconf LONG_BIT
64
說明當前CPU運行在64bit模式下
[root@MysqlCluster01 ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
4
結果大于0, 說明支持64bit計算. lm指long mode, 支持lm則是64bit
Linux 下查看操作系統(tǒng)信息
1.uname -a??可顯示電腦以及操作系統(tǒng)的相關信息. 2.輸入"cat /proc/version",說明正在運行的內核版本. 3.輸入"cat /etc/issu ...
【轉】Linux下查看TCP網(wǎng)絡連接情況
查看TCP網(wǎng)絡連接情況 命令:netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}’ www.2cto.com 返回結 ...
Linux下查看進程占用內存的最好方式
今天看到stackoverflow上關于linux下如何查看某個進程占用的內存是多少的回答,覺得非常棒,不過是全英文的,很多人可能看不懂,所以我翻譯一下 翻譯自http://stackoverflow ...
Linux下查看操作系統(tǒng)的位數(shù)和系統(tǒng)名稱版本信息
Linux下如何明確地查看操作系統(tǒng)的位數(shù) 如何知曉操作系統(tǒng)是32位還是64位?這里介紹一種簡單的方式: [plain] [root@localhost mysql-5.1.57]# getconf L ...
查看windows電腦CPU核心數(shù),線程數(shù)
在Windows中,在cmd命令中輸入“wmic”,然后在出現(xiàn)的新窗口中輸入“cpu get *”即可查看物理CPU數(shù).CPU核心數(shù).線程數(shù).其中,? Name:表示物理CPU數(shù)? NumberOfC ...
linux下查看端口的占用情況
前提:首先你必須知道,端口不是獨立存在的,它是依附于進程的.某個進程開啟,那么它對應的端口就開啟了,進程關閉,則該端口也就關閉了.下次若某個進程再次開啟,則相應的端口也再次開啟.而不要純粹的理解為關閉 ...
Linux下查看Apache的請求數(shù)
在Linux下查看Apache的負載情況,以前也說過,最簡單有有效的方式就是查看Apache Server Status(如何開啟Apache Server Status點這里),在沒有開啟Apach ...
linux 下查看系統(tǒng)內存使用情況的方法
在Windows系統(tǒng)中查看內存的使用情況很簡單,想必大家都已經(jīng)耳熟能詳了,那么在linux系統(tǒng)如何查看內存使用情況呢?下面和大家分享在Linux 下查看內存使用情況的free命令: [root@scs ...
Linux下查看CPU和內存(很詳細)
在系統(tǒng)維護的過程中,隨時可能有需要查看 CPU 使用率,并根據(jù)相應信息分析系統(tǒng)狀況的需要.在 CentOS 中,可以通過 top 命令來查看 CPU 使用狀況.運行 top 命令后,CPU 使用狀態(tài)會 ...
隨機推薦
換個角度理解云計算之MapReduce(二)
接上篇 3.Combiner操作 前面講完Map操作,總結一下就是:一個大文件,分成split1~5,對應于Map1~5,每一個Map處理一個split,每一個split的每一行,會用每一個Map的m ...
Lintcode--010(最長上升子序列)
給定一個整數(shù)序列,找到最長上升子序列(LIS),返回LIS的長度.LIS(longestIncreasingSubsequence) 說明: 最長上升子序列的定義: 最長上升子序列問題是在一個無序的給 ...
centos linux中怎么查看和修改計算機名/etc/sysconfig/network
centos linux中怎么查看和修改計算機名 查看計算機名:在終端輸入hostname 修改的話 hostname +計算機名(重啟后失效)要永久修改的話要修改配置文件/etc/sysconfig ...
dedecms給圖片加水印覆蓋整張圖片
位置: /include/image.class.php $wmwidth = $imagewidth - $logowidth; $wmheight = $imageheight - $logohe ...
JavaScript實現(xiàn)input輸入框限制輸入值的功能
限制只能輸入正整數(shù)
總結
以上是生活随笔為你收集整理的linux 查询内存和核心数,Linux下查看操作系统信息、内存情况及cpu信息:cpu个数、核心数、线程数...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux pro*c环境配置,打造ub
- 下一篇: linux搭建环境经验,经验总结54--