dom_solariumdeparis
asked on
need explanation linux command "free -m"
Hello,
I need more explanation of "free -m" linux command.
As shown, we have 2G total, 1.8G used and 208 Megs free. Everybody will say that we need RAM, but
inline total : 4G total, 1.8G used, 2.2G free, so do I really need more memory ?
Is it good to use swap memory ?
We ask this question because the server is suddenly slow.
see this image ( Plesk shows 40% of memory used ) ?
thanks,
I need more explanation of "free -m" linux command.
[root@xxxxxx /]# free -t -m
total used free shared buffers cached
Mem: 2026 1817 208 0 404 1035
-/+ buffers/cache: 377 1648
Swap: 2047 17 2030
Total: 4074 1835 2238
As shown, we have 2G total, 1.8G used and 208 Megs free. Everybody will say that we need RAM, but
inline total : 4G total, 1.8G used, 2.2G free, so do I really need more memory ?
Is it good to use swap memory ?
We ask this question because the server is suddenly slow.
see this image ( Plesk shows 40% of memory used ) ?
thanks,
Hi!
I'd say you need more RAM. The swap is very slow compared to RAM. Try to use the 'top' command to see which processes that use your RAM. Sorting by memory usage (SHIFT-O n ENTER) will sort the top output by memory usage.
Regards, Tobias
I'd say you need more RAM. The swap is very slow compared to RAM. Try to use the 'top' command to see which processes that use your RAM. Sorting by memory usage (SHIFT-O n ENTER) will sort the top output by memory usage.
Regards, Tobias
ASKER
Hello TobiasHolm,
see picture of the output of Top.
Do you see which processes that it use a lot of memory ?
regards,
free-m-2.JPG
see picture of the output of Top.
Do you see which processes that it use a lot of memory ?
regards,
free-m-2.JPG
You must use sudo to start top to see processes from all users.
sudo top
You can also use ps to see where the memory are used:
sudo ps aux
Regards, Tobias
sudo top
You can also use ps to see where the memory are used:
sudo ps aux
Regards, Tobias
If your machine uses a lot of swap then you should really think about tuning the system and then adding more memory
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That being said. If you are bumping up that close to physical ram, you probably would benefit from adding some.
As an aside, to find out more information on any linux command, look at the manual. You can access the manual by typing:
# man [application]
for example:
# man free
hth - flub