A system administrator has noticed that over time, a Linux server's available memory decreases, even when the workload on the server remains consistent. The 'top' command shows a particular process gradually increasing its memory usage without releasing it back to the system. Which of the following tools should the administrator use to further investigate this suspected memory leak in the problematic process?
The valgrind tool is used to detect memory leaks and memory management problems in programs. When a process is suspected of having a memory leak because it progressively consumes more memory without freeing it, valgrind can be employed to analyze the process and identify where memory is not being appropriately released.
free is a command that displays the amount of free and used memory in the system but does not detect memory leaks in processes.
vmstat reports information about processes, memory, paging, block IO, traps, disks, and cpu activity, but does not specifically analyze memory leaks in individual processes.
mpstat is used to monitor CPU utilization but does not analyze memory leaks in a process.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are some common causes of memory leaks in programs?
Open an interactive chat with Bash
How does Valgrind detect memory leaks?
Open an interactive chat with Bash
What are some alternatives to Valgrind for detecting memory leaks?