查看cpu类型

以我的笔记本为例,看看相关命令。

HP-NX6120,赛扬1.5G,2根内存条(1G + 512M),操作系统Ubuntu8.04。

查看Linux版本、内核

  1. ~$  cat /etc/issue
  2. Ubuntu  8.04 .3 LTS \n \l
  1. ~$  cat /proc/version
  2. Linux version  2.6 .24 -26-generic  (buildd@vernadsky )  ( gcc version  4.2 .4  (Ubuntu  4.2 .4-1ubuntu3 ) ) #1 SMP Tue Dec 1 18:37:31 UTC 2009
  1. ~$  uname -r
  2. 2.6 .24 -26-generic

查看CPU

在我的赛扬CPU笔记本上:

  1. ~$  cat /proc/cpuinfo
  2. processor   :  0
  3. vendor_id   : GenuineIntel
  4. cpu family  :  6
  5. model       :  13
  6. model name  : Intel (R ) Celeron (R ) M processor          1.50GHz
  7. stepping    :  8
  8. cpu MHz     :  1499.869
  9. cache  size  :  1024 KB
  10. fdiv_bug    : no
  11. hlt_bug     : no
  12. f00f_bug    : no
  13. coma_bug    : no
  14. fpu     :  yes
  15. fpu_exception   :  yes
  16. cpuid level :  2
  17. wp      :  yes
  18. flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts
  19. bogomips    :  2999.73
  20. clflush  size    :  64

在一台PC服务器上(双U双核):

  1. ~$  cat /proc/cpuinfo
  2. processor   :  0
  3. vendor_id   : GenuineIntel
  4. cpu family  :  6
  5. model       :  15
  6. model name  : Intel (R ) Xeon (R ) CPU             5130  @  2.00GHz
  7. stepping    :  6
  8. cpu MHz     :  2000.070
  9. cache  size  :  4096 KB
  10. physical  id :  0
  11. siblings    :  2
  12. core  id     :  0
  13. cpu cores   :  2
  14. fdiv_bug    : no
  15. hlt_bug     : no
  16. f00f_bug    : no
  17. coma_bug    : no
  18. fpu     :  yes
  19. fpu_exception   :  yes
  20. cpuid level :  10
  21. wp      :  yes
  22. flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl tm2 xtpr
  23. bogomips    :  4004.56
  24.  
  25. processor   :  1
  26. vendor_id   : GenuineIntel
  27. cpu family  :  6
  28. model       :  15
  29. model name  : Intel (R ) Xeon (R ) CPU             5130  @  2.00GHz
  30. stepping    :  6
  31. cpu MHz     :  2000.070
  32. cache  size  :  4096 KB
  33. physical  id :  0
  34. siblings    :  2
  35. core  id     :  1
  36. cpu cores   :  2
  37. fdiv_bug    : no
  38. hlt_bug     : no
  39. f00f_bug    : no
  40. coma_bug    : no
  41. fpu     :  yes
  42. fpu_exception   :  yes
  43. cpuid level :  10
  44. wp      :  yes
  45. flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl tm2 xtpr
  46. bogomips    :  4000.02
  47.  
  48. processor   :  2
  49. vendor_id   : GenuineIntel
  50. cpu family  :  6
  51. model       :  15
  52. model name  : Intel (R ) Xeon (R ) CPU             5130  @  2.00GHz
  53. stepping    :  6
  54. cpu MHz     :  2000.070
  55. cache  size  :  4096 KB
  56. physical  id :  3
  57. siblings    :  2
  58. core  id     :  6
  59. cpu cores   :  2
  60. fdiv_bug    : no
  61. hlt_bug     : no
  62. f00f_bug    : no
  63. coma_bug    : no
  64. fpu     :  yes
  65. fpu_exception   :  yes
  66. cpuid level :  10
  67. wp      :  yes
  68. flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl tm2 xtpr
  69. bogomips    :  4000.08
  70.  
  71. processor   :  3
  72. vendor_id   : GenuineIntel
  73. cpu family  :  6
  74. model       :  15
  75. model name  : Intel (R ) Xeon (R ) CPU             5130  @  2.00GHz
  76. stepping    :  6
  77. cpu MHz     :  2000.070
  78. cache  size  :  4096 KB
  79. physical  id :  3
  80. siblings    :  2
  81. core  id     :  7
  82. cpu cores   :  2
  83. fdiv_bug    : no
  84. hlt_bug     : no
  85. f00f_bug    : no
  86. coma_bug    : no
  87. fpu     :  yes
  88. fpu_exception   :  yes
  89. cpuid level :  10
  90. wp      :  yes
  91. flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl tm2 xtpr
  92. bogomips    :  4000.12

可以过滤一下:

  1. ~$  grep  "model name" /proc/cpuinfo
  2. model name  : Intel (R ) Celeron (R ) M processor          1.50GHz

多U多核的环境中查看CPU物理个数:

  1. ~$  cat /proc/cpuinfo |  grep  "physical id" |  sort |  uniq |  wc -l

多U多核的环境中查看CPU核数:

  1. ~$  cat /proc/cpuinfo |  grep  "cores" |  uniq

查看内存

  1. ~$  cat /proc/meminfo
  2. MemTotal:       1547292 kB
  3. MemFree:          82216 kB
  4. Buffers:          74720 kB
  5. Cached:          895940 kB
  6. SwapCached:           0 kB
  7. Active:          712544 kB
  8. Inactive:        599772 kB
  9. HighTotal:       646976 kB
  10. HighFree:          1116 kB
  11. LowTotal:        900316 kB
  12. LowFree:          81100 kB
  13. SwapTotal:       979924 kB
  14. SwapFree:        979924 kB
  15. Dirty:               84 kB
  16. Writeback:            0 kB
  17. AnonPages:       341708 kB
  18. Mapped:           83216 kB
  19. Slab:             80324 kB
  20. SReclaimable:     67092 kB
  21. SUnreclaim:       13232 kB
  22. PageTables:        2936 kB
  23. NFS_Unstable:         0 kB
  24. Bounce:               0 kB
  25. CommitLimit:    1753568 kB
  26. Committed_AS:    886988 kB
  27. VmallocTotal:    114680 kB
  28. VmallocUsed:       6852 kB
  29. VmallocChunk:    107508 kB

可以过滤一下:

  1. ~$  grep MemTotal /proc/meminfo
  2. MemTotal:       1547292 kB

查看系统位数

当前的Linux计算机,基本上就是32位或64位之分,可以通过查看long整形的位数确定,看看是32位还是64位:

  1. ~$ getconf LONG_BIT
  2. 32

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
查看Linux操作系统的CPU类型,可以使用以下命令:cat /proc/cpuinfo | grep "model name"。这个命令会显示CPU的型号信息。\[2\]另外,你也可以使用cat /proc/cpuinfo命令来查看CPU的详细信息,包括型号、核数、逻辑CPU、物理CPU个数等。\[1\] #### 引用[.reference_title] - *1* [Linux操作系统如何查看CPU型号信息?一条命令搞定](https://blog.csdn.net/tengxunyun/article/details/130605577)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [linux如何查看cpu类型](https://blog.csdn.net/weixin_39673972/article/details/116866982)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [linux查看CPU类型和内存大小命令](https://blog.csdn.net/weixin_32271479/article/details/116684355)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值