How to Understand Linux Memory Management
Memory management is the controlling, coordination, and management of computer memory. Understanding memory allocation and usage is important if you wish to debug certain functionality problems or are curious as to how your computer operates. Track memory usage and allocation by using the command prompt in Linux.
Instructions
-
-
1
Launch the "Terminal" by selecting "Applications," and clicking on "Accessories." You can also do this by pressing "Ctrl+Alt+T."
-
2
Type in "free" in the command line to view the basic memory processes of the system. This command will display free, used, and total memory in kilobytes. To check your memory in megabytes, type in "free-m."
-
-
3
Type "vmstat" to view information related to memory, processes and CPU activity.
-
4
Type "cat /proc/meminfo" for a detailed view of memory use.
-
5
Type "ipcs -m" to check your shared memory segments.
-
6
Type "ipcs -lm" to check your shared memory limits.
-
7
Type "cat /proc/sys/kernel/shmmax" to know the maximum size of one shared memory segment.
-
8
Type "cat /proc/sys/kernel/mni" to know the maximum number of shared memory segments.
-
1
References
Resources
- Photo Credit memory image by Zbigniew Nowak from Fotolia.com