liunx查詢配置命令

2021-10-07 13:43:10 字數 712 閱讀 1929

一、查詢cpu資訊

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

8  intel(r) xeon(r) cpu   e5410   @ 2.33ghz

1、檢視cpu資訊

# 總核數 = 物理cpu個數 x 每顆物理cpu的核數 

# 總邏輯cpu數 = 物理cpu個數 x 每顆物理cpu的核數 x 超執行緒數

# 檢視物理cpu個數

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 檢視每個物理cpu中core的個數(即核數)

cat /proc/cpuinfo| grep "cpu cores"| uniq

# 檢視邏輯cpu的個數

cat /proc/cpuinfo| grep "processor"| wc -l

二、linux檢視版本當前作業系統發行版資訊

cat /etc/issue  或cat /etc/redhat-release

getconf long_bit 或 /uname -a 

查詢系統型別 32位還是64位

三、查詢儲存資訊

df -h 查詢磁碟資訊

du -h 查詢檔案夾資訊  (max-depth=1)

free -m 查詢記憶體資訊

Liunx常用查詢,授權,啟動命令

查詢檔案 模糊匹配查詢 find name zookeeper 精準查詢 find name redis 啟動zookeeper 在每台機器上執行 bin zkserver.sh start 檢視執行狀態 bin zkserver.sh status 啟動redis redis server 以配置...

liunx命令基礎

命令格式 命令 選項 引數1 引數2 和 命令列的區別 後面選項是單詞 後面是單個字母的組合檔案及資料夾操作 ls 顯示目錄內容 語法 ls 引數 目錄或檔名 引數 l 詳情顯示 a 顯示隱藏檔案 h 檔案大小 t 檔案修改時間排序 r 遞迴顯示指定目錄各個子目錄的檔案 s 以檔案大小排序 cd 切...

liunx增強命令

格式 grep option pattern file 例項 ps ef grep sshd 查詢指定 ssh 服務程序 ps ef grep sshd grep v grep 查詢指定服務程序,排除 gerp 本身 ps ef grep sshd c 查詢指定程序個數 cat test.txt g...