查看CentOS伺服器的cpu、記憶體、作業系統版本資訊

來源:互聯網
上載者:User

標籤:cpu linux 記憶體

經常要查看Linux伺服器的CPU、記憶體、作業系統版本等資訊,總結一下常用的命令

1.查看CPU型號(32個邏輯CPU)

[[email protected] ~]# cat /proc/cpuinfo |grep "name" |cut -f2 -d: |uniq -c

     32  Intel(R) Xeon(R) CPU E5-4620 v2 @ 2.60GHz


2.查看物理CPU個數(兩個16核CPU)


[[email protected] ~]# cat /proc/cpuinfo | grep "physical"| sort |uniq -c

     32 address sizes: 46 bits physical, 48 bits virtual

     16 physical id: 0

     16 physical id: 1


3.查看CPU運行在多少位元模式下面

[[email protected] ~]# getconf LONG_BIT

64


4.下面的結果大於0,說明支援64位作業系統


[[email protected] ~]# cat /proc/cpuinfo | grep flags | grep ‘ lm ‘ | wc -l

32


5.查看系統實體記憶體的大小

[[email protected] ~]# free -m

             total       used       free     shared    buffers     cached

Mem:         32051      31806        244          0         58      30654

-/+ buffers/cache:       1093      30958

Swap:        15999          0      15999


6.查看記憶體詳細資料
[[email protected] ~]# cat /proc/cpuinfo


processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 62

model name      : Intel(R) Xeon(R) CPU E5-4620 v2 @ 2.60GHz

stepping        : 4

microcode       : 1064

cpu MHz         : 2600.065

cache size      : 20480 KB

physical id     : 0

siblings        : 16

core id         : 0

cpu cores       : 8

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 dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms

bogomips        : 5200.13

clflush size    : 64


7.查看伺服器安裝的是哪個發行版本

[[email protected] ~]# cat /etc/redhat-release

CentOS release 6.6 (Final)


8.查看OS的版本是64位的還是32位的

[[email protected] ~]# uname -r

2.6.32-504.el6.x86_64

[[email protected] ~]# uname -a

Linux nginx.yc.jzhnm.com 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


9.查看伺服器的硬體資訊


[[email protected] ~]# dmidecode |grep Vendor          #處理器廠商

Vendor: Dell Inc.

[[email protected] ~]# dmidecode |grep Product         #伺服器型號

Product Name: PowerEdge R820

Product Name: 0JC2W3

本文出自 “Linux營運的自我修養” 部落格,請務必保留此出處http://ywliyq.blog.51cto.com/11433965/1765787

查看CentOS伺服器的cpu、記憶體、作業系統版本資訊

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.