溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Linux怎么查看CPU內存和系統版本

發布時間:2022-10-20 16:49:57 來源:億速云 閱讀:211 作者:iii 欄目:建站服務器

這篇文章主要介紹了Linux怎么查看CPU內存和系統版本的相關知識,內容詳細易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇Linux怎么查看CPU內存和系統版本文章都會有所收獲,下面我們一起來看看吧。

Linux查看CPU內存和系統版本

1.查看CPU信息

查看CPU信息的方式很多,我們這里分兩種情況來處理

1.1 查看CPU基本硬件信息
[whb@VM_0_12_centos test]$ cat /proc/cpuinfo
processor  : 0
vendor_id  : GenuineIntel
cpu family  : 6
model    : 79
model name  : Intel(R) Xeon(R) CPU E5-26xx v4
stepping  : 1
microcode  : 0x1
cpu MHz    : 2399.996
cache size  : 4096 KB
physical id  : 0
siblings  : 1
core id    : 0
cpu cores  : 1
apicid    : 0
initial apicid  : 0
fpu    : yes
fpu_exception  : yes
cpuid level  : 13
wp    : yes
flags    : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch bmi1 avx2 bmi2 rdseed adx xsaveopt
bogomips  : 4799.99
clflush size  : 64
cache_alignment  : 64
address sizes  :
1.2 查看CPU使用狀態信息, top && dstat
#方法一
[whb@VM_0_12_centos test]$ top #輸入top查看CPU使用情況,可以輸入1,查看多核CPU使用情況
asks:  74 total,   2 running,  72 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  1882892 total,   148092 free,   403032 used,  1331768 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  1274708 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 3677 root      20   0  162348  10684   1364 S  1.1  0.6  91:47.96 barad_agent
 3678 root      20   0  611460  13444   1484 S  1.1  0.7 462:59.39 barad_agent
    1 root      20   0   51644   3056   1840 S  0.0  0.2  12:14.31 systemd
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.66 kthreadd
    3 root      20   0       0      0      0 S  0.0  0.0   2:00.04 ksoftirqd/0
#方法二
[whb@VM_0_12_centos test]$ dstat -c #不存在,centos上可使用 yum -y install dstat 安裝
2.查看內存信息

查看內存信息的方式也很多,我們這里也分兩種情況來處理

2.1 查看內存基本容量信息
[whb@VM_0_12_centos test]$ cat /proc/meminfo 
MemTotal:        1882892 kB
MemFree:          147760 kB
MemAvailable:    1275048 kB
Buffers:          165600 kB
Cached:           878652 kB
SwapCached:            0 kB
Active:           891404 kB
...
2.2 查看內存運行空間信息
[whb@VM_0_12_centos test]$ free 
              total        used        free      shared  buff/cache   available
Mem:        1882892      403124      146836         544     1332932     1274648
Swap:             0           0           0
[whb@VM_0_12_centos test]$ free -k #安裝KB為單位顯示
              total        used        free      shared  buff/cache   available
Mem:        1882892      402988      146964         544     1332940     1274788
Swap:             0           0           0
[whb@VM_0_12_centos test]$ free -m #安裝MB為單位進行顯示
              total        used        free
3.查看Linux 查看系統版本
[whb@VM_0_12_centos test]$ uname -a
Linux VM_0_12_centos 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[whb@VM_0_12_centos test]$ cat /etc/redhat-release  #如果是centos機器,可以直接查看更細致版本
CentOS Linux release 7.5.1804 (Core)

關于“Linux怎么查看CPU內存和系統版本”這篇文章的內容就介紹到這里,感謝各位的閱讀!相信大家對“Linux怎么查看CPU內存和系統版本”知識都有一定的了解,大家如果還想學習更多知識,歡迎關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女