Linux下檢視CPU型號,記憶體大小,硬碟空間的命令(詳解)
感謝有奉獻精神的人
轉自:http://www.jb51.net/article/97157.htm
1 檢視CPU
1.1 檢視CPU個數
# cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
2 **uniq命令:刪除重複行;wc –l命令:統計行數**
1.2 檢視CPU核數
# cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 4
1.3 檢視CPU型號
# cat /proc/cpuinfo | grep 'model name' |uniq
model name : Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
總結:該伺服器有2個4核CPU,型號Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
2 檢視記憶體
2.1 檢視記憶體總數
#cat /proc/meminfo | grep MemTotal
MemTotal: 32941268 kB //記憶體32G
下面是一些命令的集合,供參考:
- uname -a # 檢視核心/作業系統/CPU資訊的linux系統資訊
- head -n l /etc/issue # 檢視作業系統版本
- cat /proc/cpuinfo # 檢視CPU資訊
-
hostname # 檢視計算機名的linux系統資訊命令
- lspci -tv # 列出所有PCI裝置
- lsusb -tv # 列出所有USB裝置的linux系統資訊命令
- lsmod # 列出載入的核心模組
- env # 檢視環境變數資源
- free -m # 檢視記憶體使用量和交換區使用量
- df -h # 檢視各分割槽使用情況
- du -sh # 檢視指定目錄的大小
- grep MemTotal /proc/meminfo # 檢視記憶體總量
- grep MemFree /proc/meminfo # 檢視空閒記憶體量
- uptime # 檢視系統執行時間、使用者數、負載
-
cat /proc/loadavg # 檢視系統負載磁碟和分割槽
- mount | column -t # 檢視掛接的分割槽狀態
- fdisk -l # 檢視所有分割槽
- swapon -s # 檢視所有交換分割槽
- hdparm -i /dev/hda # 檢視磁碟引數(僅適用於IDE裝置)
- dmesg | grep IDE # 檢視啟動時IDE裝置檢測狀況網路
- ifconfig # 檢視所有網路介面的屬性
- iptables -L # 檢視防火牆設定
- route -n # 檢視路由表
- netstat -lntp # 檢視所有監聽埠
- netstat -antp # 檢視所有已經建立的連線
- netstat -s # 檢視網路統計資訊程序
- ps -ef # 檢視所有程序
- top # 實時顯示程序狀態使用者
- w # 檢視活動使用者
- id # 檢視指定使用者資訊
- last # 檢視使用者登入日誌
- cut -d: -f1 /etc/passwd # 檢視系統所有使用者
- cut -d: -f1 /etc/group # 檢視系統所有組
- crontab -l # 檢視當前使用者的計劃任務服務
- chkconfig –list # 列出所有系統服務
- chkconfig –list | grep on # 列出所有啟動的系統服務程式
- rpm -qa # 檢視所有安裝的軟體包
- cat /proc/cpuinfo :檢視CPU相關引數的linux系統命令
- cat /proc/partitions :檢視linux硬碟和分割槽資訊的系統資訊命令
- cat /proc/meminfo :檢視linux系統記憶體資訊的linux系統命令
- cat /proc/version :檢視版本,類似uname -r
- cat /proc/ioports :檢視裝置io埠
- cat /proc/interrupts :檢視中斷
- cat /proc/pci :檢視pci裝置的資訊
- cat /proc/swaps :檢視所有swap分割槽的資訊
2.2 檢視記憶體條數
本節內容引自新浪博文《Linux檢視記憶體條數》
檢視原文:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
相關推薦【linux】Linux下檢視CPU型號,記憶體大小,硬碟空間的命令(詳解)1 檢視CPU 1.1 檢視CPU個數 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2 **uniq命令:刪除重複行;wc –l命令:統計行數** 1.2 檢視CPU核數 # cat /proc/c Linux下檢視CPU型號,記憶體大小,硬碟空間的命令(詳解)感謝有奉獻精神的人 轉自:http://www.jb51.net/article/97157.htm 1 檢視CPU 1.1 檢視CPU個數 # cat /proc/cpuinfo | grep "physical id" | un linux下檢視cpu、記憶體和硬碟大小轉載至:http://blog.sina.com.cn/s/blog_535aa0930100ltz8.html 查cpu #dmesg |grep -i xeon CPU0: Intel(R) Xeon(R) CPU E5520 @ 2.27G Linux下檢視CPU、記憶體和硬碟型號及相關資訊命令smartctl version 5.33 [i386-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION linux下檢視cpu,記憶體,硬碟等硬體資訊的方法說明:Linux下可以在/proc/cpuinfo中看到每個cpu的詳細資訊。但是對於雙核的cpu,在cpuinfo中會看到兩個cpu。常常會讓人誤以為是兩個單核的cpu。原文地址: http://www.hpboys.com/659.html一、linux CPU大小 [ linux下檢視CPU、記憶體、磁碟資訊,資料夾資訊,GPU資訊1、檢視CPU資訊 # 總核數 = 物理CPU個數 X 每顆物理CPU的核數 # 總邏輯CPU數 = 物理CPU個數 X 每顆物理CPU的核數 X 超執行緒數 # 檢視物理CPU個數 cat /proc/cpuinfo| grep "physical id"| sort| uniq| w LINUX下檢視CPU、記憶體使用率的命令1.top 使用許可權:所有使用者 使用方式:top [-] [d delay] [q] [c] [S] [s] [i] [n] [b] 說明:即時顯示process的動態 d :改變顯示的更新速度,或是在交談式指令列( interactive command)按s Ubuntu下檢視CPU、記憶體和硬碟詳細資訊的幾個命令轉載自:【http://www.sijitao.NET/1749.html】 CPU: 型號:grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}' 數量:lscpu |grep "CPU socket" | Linux下檢視CPU、記憶體佔用率我們經常需要檢視CPU和記憶體佔用率,否則一旦存在情況很快就會有IDC(或客戶)找上門,Linux上檢視資源使用情況有多種命令可以參考,CPU、記憶體、IO、NETWORK等資源使用情況都可以通過某些命令查詢到,本文只說CPU/記憶體及簡單的問題追蹤方法。一、top檢視Linux資源佔用情況top命令可以檢視 linux下安裝ab壓力測試工具及ab命令詳解yum -y install httpd-tools ab -v 檢視ab版本 ab –help ab -n1000 -c 10 http://www.xxxx.com/ 以上命令-n訪問1000次, -c併發10個 ab壓力測試返回報文內容詳解: Server Soft Linux作業系統檢視CPU型號、個數、核數、邏輯CPU數、位數、發行版本、核心資訊、記憶體、伺服器生產廠家Linux下的CPU資訊全部都在/proc/cpuinfo這個檔案中,可以直接開啟看。 # 總核數 = 物理CPU個數 X 每顆物理CPU的核數 # 總邏輯CPU數 = 物理CPU個數 X 每顆物理CPU的核數 X 超執行緒數 判斷是否開啟了超執行緒: 如果多個邏輯CP linux如何檢視CPU,記憶體,機器型號,網絡卡資訊http://os.51cto.com/art/201005/200741.htm 做效能測試需要記錄效能測試機器的硬體資訊,現將需要的命令總結如下:檢視CPU資訊(型號)# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel Java 連線遠端Linux 伺服器執行 shell 指令碼檢視 CPU、記憶體、硬碟資訊/* * Written by wei.Li and released to the public domain * Welcome to correct discussion as explained at * * ------------------------------------------ linux系統下檢視CPU、記憶體負載情況$ vmstat procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so Ubuntu16下檢視CPU、記憶體和磁碟相關資訊1.記憶體 檢視記憶體#free -m total used free shared buff/cache available Mem: 96685 986 94887 Linux下檢視CPU和GPU使用情況Linux下檢視CPU和GPU使用情況 本文記錄瞭如何在Linux系統(以Ubuntu 16.04為例)檢視電腦的GPU和CPU使用情況,包括命令和查詢得到的介面。更新於2018.10.18。 CPU使用情況檢視 動態檢視 開啟終端,輸入: top 即可看到實時 make -j8以及linux下檢視cpu的核數# 總核數 = 物理CPU個數 X 每顆物理CPU的核數 # 總邏輯CPU數 = 物理CPU個數 X 每顆物理CPU的核數 X 超執行緒數 # 檢視物理CPU個數 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l # 檢視每個物 linux下更改tomcat啟動記憶體大小近期要把測試的4個服務遷移到某臺測試機器上,可是這臺機器的記憶體空間只剩下4g了, 每個服務要是分配1g的記憶體,這個機器在流程高峰,記憶體不夠用,可能就會kill掉某個服務了,這樣會影響服務的穩定性,如果把對應服務的記憶體分配減少到512那麼就應該很足夠了。 Linux下檢視CPU資訊[/proc/cpuinfo]最近在研究linux系統負載的時候,接觸到一些關於CPU資訊檢視的知識,和大家分享一下。通過對/proc/cpuinfo檔案中的引數的分析,也學到了不少東西。 在linux作業系統中,CPU的資訊在啟動的過程中被裝載到虛擬目錄/proc下的cpuinfo檔案中,我們可以通過 linux下檢視jvm使用記憶體狀況首先通過 Java程式碼 jstat -gcutil pid 1000 可以檢視GC情況。不需要額外的工具。這樣可以看看是不是有大量FullGC 如果卻是存在大量FullGC,那麼可以直接檢視記憶體 Java程式碼 jmap -histo pid |more 來看 |