我的笔记本电脑上安装了 8GB RAM。BIOS 和 Windows 启动时显示 8GB,但当我登录 Ubuntu 时,只显示 2GB 内存。
我不明白如何充分发挥我的计算机的功能。
输出 free -h
$ free -h
total used free shared buff/cache available
Mem: 2,0G 1,1G 132M 320M 829M 402M
Swap: 7,5G 1,0G 6,5G
sudo dmidecode -t memory 的输出
$ sudo dmidecode -t memory
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
Handle 0x0007, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 1
Handle 0x0008, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0007
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: SK Hynix
Serial Number: 00493032
Asset Tag: 9876543210
Part Number: HMT41GS6BFR8A-PB
Rank: 2
Configured Clock Speed: 1600 MHz
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: 1.35 V
为便于查看,我附上了相同的截图。 终端窗口视图
grep 命令的输出
zaidshakil@Zaid-Ubuntu:~$ grep -i cgroup /var/log/syslog*
Apr 1 02:19:09 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 02:19:09 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 02:19:10 Zaid-Ubuntu dockerd[14939]: time="2017-04-01T02:19:10.982530054+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 02:19:10 Zaid-Ubuntu dockerd[14939]: time="2017-04-01T02:19:10.982549819+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 15:30:45 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 15:30:45 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 15:30:51 Zaid-Ubuntu dockerd[1206]: time="2017-04-01T15:30:51.597146555+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 15:30:51 Zaid-Ubuntu dockerd[1206]: time="2017-04-01T15:30:51.597157997+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 14:37:30 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 14:37:30 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 14:37:34 Zaid-Ubuntu dockerd[1312]: time="2017-04-01T14:37:34.589461797+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 14:37:34 Zaid-Ubuntu dockerd[1312]: time="2017-04-01T14:37:34.589469876+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 14:56:40 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 14:56:40 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 14:56:43 Zaid-Ubuntu dockerd[1239]: time="2017-04-01T14:56:43.260545225+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 14:56:43 Zaid-Ubuntu dockerd[1239]: time="2017-04-01T14:56:43.260717199+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 18:34:08 Zaid-Ubuntu dockerd[9228]: time="2017-04-01T18:34:08.790148286+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 18:34:08 Zaid-Ubuntu dockerd[9228]: time="2017-04-01T18:34:08.790218963+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 18:35:31 Zaid-Ubuntu dockerd[9383]: time="2017-04-01T18:35:31.250522713+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 18:35:31 Zaid-Ubuntu dockerd[9383]: time="2017-04-01T18:35:31.250563699+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 18:38:08 Zaid-Ubuntu dockerd[10604]: time="2017-04-01T18:38:08.740614885+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 18:38:08 Zaid-Ubuntu dockerd[10604]: time="2017-04-01T18:38:08.740689843+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 19:12:12 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 19:12:12 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 19:12:16 Zaid-Ubuntu dockerd[1314]: time="2017-04-01T19:12:16.925265862+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 19:12:16 Zaid-Ubuntu dockerd[1314]: time="2017-04-01T19:12:16.925280062+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 19:28:59 Zaid-Ubuntu dockerd[6356]: time="2017-04-01T19:28:59.190885292+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 19:28:59 Zaid-Ubuntu dockerd[6356]: time="2017-04-01T19:28:59.190944277+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 21:08:20 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 1 21:08:20 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 1 21:08:25 Zaid-Ubuntu dockerd[1345]: time="2017-04-01T21:08:25.398993195+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 1 21:08:25 Zaid-Ubuntu dockerd[1345]: time="2017-04-01T21:08:25.399004818+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 1 21:25:52 Zaid-Ubuntu snap[2201]: time="2017-04-01T21:25:52+02:00" level=error msg="containerd: notify OOM events" error="read /sys/fs/cgroup/freezer/docker/21b666be1ea4d12abeee0c949f578946b3dff173fe70b417eccbf168f7b6fb46/freezer.state: no such device"
Apr 1 22:09:01 Zaid-Ubuntu systemd[1]: Stopping LSB: Set up cgroupfs mounts....
Apr 2 19:08:15 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 2 19:08:15 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 2 19:08:20 Zaid-Ubuntu dockerd[1340]: time="2017-04-02T19:08:20.939806472+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 2 19:08:20 Zaid-Ubuntu dockerd[1340]: time="2017-04-02T19:08:20.939814976+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 2 18:00:33 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 2 18:00:33 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 2 18:00:37 Zaid-Ubuntu dockerd[1333]: time="2017-04-02T18:00:37.716538593+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 2 18:00:37 Zaid-Ubuntu dockerd[1333]: time="2017-04-02T18:00:37.716554988+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 3 12:40:22 Zaid-Ubuntu systemd[1]: Starting LSB: Set up cgroupfs mounts....
Apr 3 12:40:22 Zaid-Ubuntu systemd[1]: Started LSB: Set up cgroupfs mounts..
Apr 3 12:40:29 Zaid-Ubuntu dockerd[1317]: time="2017-04-03T12:40:29.374244538+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 3 12:40:29 Zaid-Ubuntu dockerd[1317]: time="2017-04-03T12:40:29.374252542+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
答案1
尝试安装 htop 并从终端运行 htop 并查看输出。
Open up an SSH session.
Log in with your root user log in credentials.
Type “apt-get install htop”.
To run htop, type “htop”.
If you wish to quit htop at any point, press F10
它应该会显示一个条形图,其中包含所有可用 RAM 以及已使用的 RAM 量。在我看来,这是显示系统使用情况的更好方法。它还允许您按 RAM 使用情况对进程进行排序。