htop commad memory details
Total Virtual machine RAM 4GB or 3.84G
%MEM is directly related to RES, it’s the percentage use of total physical memory by the process.
VIRT is the total memory that this process has access to shared memory, mapped pages, swapped out pages, etc.
RES is the total physical memory used shared or private that the process has access to.
SHR is the total physical shared memory that the process has access to.
DATA is the total private memory mapped to process physical or not.
CODE also known as “text resident set” is total physical memory used to load application code.
SHR (shared physical memory) which mean it could have been used by some other process as well.
RES – SHR = Total estimated memory usage by the process.
Hide user threads (shift + H)
Process:
mysql
www-data
root
Difference between resident memory,shared memory and virtual memory in system monitor
resident memory typically refers to physical RAM installed in the machine.
virtual memory is Hard Disk space reserved for the O/S to act as RAM. The O/S “swaps” data in and out of the virtual memory to place it in RAM, or to take it out of RAM. Linux “swap” devices are exactly this.
shared memory refers to physical or virtual memory that is attached to more than one process – being shared.
- PID (Process ID) – Unique number designated to the process.
- USER – The owner of the process.
- PRI (Priority) – The kernel’s priority for the process.
- NI (Nice Value) – The process priority as viewed by the USER. (Higher nice value – Lower priority).
- VIRT (Virtual Memory) – The amount of virtual memory the process is consuming.
- RES (Resident Memory) – The proportion of RAM the process is using.
- SHR (Shared Memory) – The amount of shared memory the task is occupying.
- S (Status) – The current state of the process, S – Sleeping, R – Running, etc.
- CPU% – The percentage of CPU used by the process.
- MEM% – The percentage of Memory consumed by the process.
- TIME+ – The period of time since the process initiated.
- Command – The complete command for the process with program name and arguments