歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Fedora下關於top和System Monitor的一點疑惑

Fedora下關於top和System Monitor的一點疑惑

日期:2017/2/28 16:25:47   编辑:Linux教程

在我剛剛接觸Linux時就知道了top這個命令,後來又發現了圖形界面下類似Windows任務管理器的System Monitor,但我發現二者在內存的統計方面有很大的不同,SEE:

注意Mem處的used,再看System Monitor

仔細觀察會發現,top的Mem used和System Monitor的差別很大,後來才知道,System Monitor的Mem是==used-cached,計算下確實如此,再回過頭來看看man top,同時水木上一位大哥給我介紹說:

The memory meter in htop says a low number, such as 9%, when top shows
something like 90%! (Or: the MEM% number is low, but the bar looks almost full.
What's going on?)

The number showed by the memory meter is the total memory used by processes.
The additional available memory is used by the Linux kernel for buffering and
disk cache, so in total almost the entire memory is in use by the kernel. I
believe the number displayed by htop is a more meaningful metric of resources
used
-----
htop的作者的解釋

看完頓時受益良多,二者其實都正確,只不過是對於內存的使用方式理解不同罷了。

Copyright © Linux教程網 All Rights Reserved