Linux下查看CPU型号,内存大小,硬盘空间的命令(详解)

news/2024/7/7 14:37:46

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

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# dmidecode |grep -A16 "Memory Device$"
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB //1条2G内存
Form Factor: DIMM
Set: 1
Locator: DIMM1
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 7F7F7F7F7F510000
Serial Number: 0403E324
Asset Tag: 450721
Part Number: 72T256220HR3SA
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB //1条2G内存
Form Factor: DIMM
Set: 1
Locator: DIMM2
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 7F7F7F7F7F510000
Serial Number: 0403E324
Asset Tag: 450721
Part Number: 72T256220HR3SA
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1个内存空槽
Form Factor: DIMM
Set: 2
Locator: DIMM3
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1个内存空槽
Form Factor: DIMM
Set: 2
Locator: DIMM4
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1个内存空槽
Form Factor: DIMM
Set: 3
Locator: DIMM5
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1个内存空槽
Form Factor: DIMM
Set: 3
Locator: DIMM6
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:

总结:该服务器有两条2G内存 ,空余4个插槽

3 查看硬盘

3.1 查看硬盘大小

# fdisk -l | grep Disk

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

总结:硬盘大小146.7G,即厂商标称的160G


http://www.niftyadmin.cn/n/3059535.html

相关文章

加拿大己亥猪年生肖邮票亮相 选用猪八戒形象

农历己亥年临近,加拿大邮政公司于当地时间1月17日正式揭晓新的猪年生肖邮票。这套邮票选用了中国古典名著《西游记》中猪八戒的形象。图为印有“福满人间”“笑口常开”“和气生财”及“瑞气祥和”字样的加拿大国内版己亥猪年生肖邮票四方联,以及国际版小…

『React Navigation 3x系列教程』createDrawerNavigator开发指南

这篇文章将向大家分享createDrawerNavigator的一些开发指南和实用技巧。 createDrawerNavigator抽屉效果,侧边滑出: createDrawerNavigator API createDrawerNavigator(RouteConfigs, DrawerNavigatorConfig): RouteConfigs(必选):路由配置对…

如何在内核中重新编译某一个ko模块

例如:SDIO 模块 1、用 lsmod 查看sdhci 相关的模块。 2、rmmod sdhci-pci 和 sdhci 3、make modules SUBDIRSdrivers/mmc 4、find. -name *.ko 查找生成的.ko文件 5、insmod sdhci-pci.ko 和sdhci.ko 这样可以只是编译drivers/mmc 目录下的ko模块

命令行方式查看windows下机器的配置

需要在C:/Program Files/Common Files/Microsoft Shared/MSInfo目录下执行Msinfo32 命令:C:/Program Files/Common Files/Microsoft Shared/MSInfo>Msinfo32 /report d:/cmpInfo.txt /categories SystemSummary进入d盘使用type查看生成的文件d:/> type cmp…

Linux内核编译过程

准备工作 硬件:笔记本 系统: Ubuntu18.04 64位 下载内核 1、先安装ubuntu18.04的系统。 2、到内核官网下载最新的内核code: https://www.kernel.org/ 如图所示下载最新kernel 例如 Linux-4.19: 3、将下载的内核 Linux-4.1…

Linux Shell nohup命令用法

在应用Unix/Linux时,我们一般想让某个程序在后台运行,于是我们将常会用 & 在程序结尾来让程序自动运行。比如我们要运行mysql在后台: /usr/local/mysql/bin/mysqld_safe –usermysql &。可是有很多程序并不想mysqld一样,这…

必应搜索昨日起出现大规模的无法访问

昨天下午,必应搜索在国内出现大规模的访问故障,显示“无法访问此网站”,具体原因未知。必应由微软公司在2009年推出,英文名为 Bing,是全球领先的搜索引擎之一。对昨天下午起国内出现的大规模访问故障,有网友…

python 正则匹配+爬虫+返回信息对比 实例(亲自测试)

①将输入两个文件的txt,正则匹配,进行拼接:(所有的)②将text信息(“找一下恒洁”),组成完整的URL链接,进行爬虫搜索 ③保存所有的content,匹配自己所需要的信…