Lpic 2 Linux Engineer · Free Practice Question Medium
Question 21
- A netstat -rn
- B vmstat 1
- C pstree
- D iostat -x 1
Reveal correct answer
Correct answer: B
A. The command "netstat -rn" is used to display the routing table and network interface statistics. It does not provide information about memory usage or swap space utilization, so it is not relevant to diagnosing a memory leak on a production server.
B. The command "vmstat 1" is used to provide a snapshot of memory usage, including swap space utilization, on a Linux system. It displays information such as memory, swap, disk I/O, and CPU usage at regular intervals. This command is essential for diagnosing memory-related issues like potential memory leaks.
C. The command "pstree" is used to display a tree diagram of processes on a Linux system. It does not provide information about memory usage or swap space utilization, so it is not helpful in diagnosing a potential memory leak on a production server.
D. The command "iostat -x 1" is used to display CPU and input/output statistics for devices and partitions. It does not provide information about memory usage or swap space utilization, so it is not the correct choice for diagnosing a potential memory leak on a production server.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
