在我的服务器死机并不得不重新安装 Ubuntu 服务器 19.04 之后,Linux 只能看到我的 RAM 中的 2.90 GB,而不是像以前一样可以看到我的全部 8 GB……尽管我将 RAM 条从双通道改为单通道。插槽 ABAB。
它们都是 4 GB 模块,我的 Bios 读取正确的 8192 MB,我知道我的系统为 iGPU 占用了一些内存,但不是全部!这是我通过 SSH 进入的用于开发和托管服务的服务器。
这种情况发生在我认为busybox
是被绊倒了之后,并且在启动时不断出现,我没有发生过什么的日志,但我记得我遗漏了init
某个地方rc.d
。我的硬盘也很旧(大约 10 年了),我用一个新的硬盘替换了它,同样的问题,2.90 GB。
free -m
显示交换内存和主内存都只有 2.9 GB。
lshw
显示正确插槽中的所有 RAM,总计 8 GB
我很困惑这怎么会发生……即使是在全新安装的情况下(是的,我多次重新安装 RAM 以查看它是否有故障。并运行了内存测试。一切正常)我确定我也安装了 x64 操作系统,这似乎很奇怪为什么它在发生故障之前可以看到所有 8 GB,但现在看不到了
输出lsb
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
输出cmdline
BOOT_IMAGE=/boot/vmlinuz-5.0.0-32-generic root=UUID=7d120bf8-27bf-46de-83cc-50bc6b9f19fc ro
输出memtotal
MemTotal: 3038856 kB
输出uname
Linux a123 5.0.0-32-generic #34-Ubuntu SMP Wed Oct 2 02:06:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
输出free -m
total used free shared buff/cache available
Mem: 2967 166 2062 1 739 2574
Swap: 2966 0 2966
输出dmesg | grep "Memory"
[ 0.058346] Memory: 2916468K/3183812K available (14339K kernel code, 2335K rwdata, 4448K rodata, 2588K init, 5192K bss, 267344K reserved, 0K cma-reserved)
[ 0.224591] x86/mm: Memory block size: 128MB
dmidecode
内存的输出
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x002D, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x002F, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM 1
Bank Locator: CHANNEL A
Type: DDR3
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 1600 MT/s
Manufacturer: <BAD INDEX>
Serial Number: 00000000
Asset Tag: A1_AssetTagNum0
Part Number: 1600 CL9 Series
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0030, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM 2
Bank Locator: CHANNEL A
Type: DDR3
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 1600 MT/s
Manufacturer: <BAD INDEX>
Serial Number: 00000000
Asset Tag: A1_AssetTagNum1
Part Number: 1600 CL9 Series
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0031, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: SODIMM
Set: None
Locator: DIMM 3
Bank Locator: CHANNEL B
Type: DDR3
Type Detail: None
Speed: Unknown
Manufacturer: A1_Manufacturer2
Serial Number: A1_SerialNum2
Asset Tag: A1_AssetTagNum2
Part Number: A1_PartNum2
Rank: Unknown
Configured Memory Speed: Unknown
Handle 0x0032, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x002D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: SODIMM
Set: None
Locator: DIMM 4
Bank Locator: CHANNEL B
Type: DDR3
Type Detail: None
Speed: Unknown
Manufacturer: A1_Manufacturer3
Serial Number: A1_SerialNum3
Asset Tag: A1_AssetTagNum3
Part Number: A1_PartNum3
Rank: Unknown
Configured Memory Speed: Unknown
答案1
lsb_release -a 将显示您的操作系统描述和发布信息
uname -a 将显示你的内核版本,以确定你是否正在处理 64 位
cat /proc/cmdline 将显示当前启动系统的内核命令行参数
此外,cat /proc/meminfo |grep MemTotal 也会为您提供已安装的内存。
运行 memtest 并验证 RAM 是否良好。