Linux command – Memtester
之前用過 Memtest86+ http://benjr.tw/491 ,無法直接在 Linux 環境下直接來使用,Memtester 可以直接在 Linux 環境下執行,且可以從 apt-get 下載使用,官方網站 http://pyropus.ca/software/memtester/
|
使用上也很簡單,只需要指定要測試的記憶體大小 (單位: B/K/M/G) 以及測試次數 (Loops) 即可.
|
我的系統是 Ubuntu16.04 1G 記憶體 的 VMware 虛擬機器.
|
Memtester 主要會針對記憶體做以下的測試
- Stuck Address
- Random Value -test random value
- Compare XOR – test xor comparison
- Compare SUB – test sub comparison
- Compare MUL – test mul comparison
- Compare DIV – test div comparison
- Compare OR – test or comparison
- Compare AND – test and comparison
- Sequential Increment – test seqinc comparison
- Solid Bits – test solidbits comparison
- Block Sequential – test blockseq comparison
- Checkerboard – test checkerboard comparison
- Bit Spread – test bitspread comparison
- Bit Flip – test bitflip comparison
- Walking Ones – test walk bits 1 comparison
- Walking Zeroes – test_walk bits 0 comparison
- 8-bit Writes – test 8bit wide random
- 16-bit Writes -test 16bit wide random
memtester 是透過 malloc 函數來要求記憶體空間,所以在設定測試記憶體空間時沒有辦法把全部的記憶體都拿來測試.
|
透過 free 可以看到,系統大概還有 700M 可以用,所以上限大概也就在這裡.
Linux 底下記憶體的使用區分下面幾種.
- Total Memory
系統所有的記憶體容量. - Used Memory
Total(998,312) – Free(740632) – Buffers/Cache(99416) 就是目前所有有在使用中的記憶體數量. - Free Memory
尚未使用到的的記憶體. - shared Memory
used by tmpfs , 允許 processes (程序) 透過 Shared memory 共享儲存於記憶體中的 common structures 和 Data. - Buffered Memory
資料還來不及儲存到硬碟中暫儲在記憶體的資料. - Cached Memory
資料已經由硬碟中讀取出來,提供給應用程式接下來使用,用以提高存取效能. - Available
估計有多少記憶體可用於啟動新應用程式,無需透過 swapping
超過系統能給的時候 memtester 就不會繼續執行.
|
|