Which of the following commands provide information on virtual memory, disk access, and CPU use?

  1. vmstat

  2. stat

  3. ps

  4. uptime


Correct Option: A

AI Explanation

To answer this question, you need to understand the different commands used to gather information about virtual memory, disk access, and CPU use. Let's go through each option to understand why it is correct or incorrect:

Option A) vmstat - This option is correct because vmstat is a command-line utility that provides information about virtual memory, including memory usage, paging activity, and swap usage. It also provides information about CPU usage and disk access statistics.

Option B) stat - This option is incorrect because the stat command is used to display file or file system status, such as file size, permissions, and timestamps. It does not provide information about virtual memory, disk access, or CPU use.

Option C) ps - This option is incorrect because the ps command is used to display information about active processes, including their process IDs, CPU usage, and memory usage. While it provides information about CPU use, it does not provide information about virtual memory or disk access.

Option D) uptime - This option is incorrect because the uptime command is used to display how long the system has been running and the current system load average. It does not provide information about virtual memory, disk access, or CPU use.

The correct answer is Option A) vmstat. This option is correct because vmstat provides information on virtual memory, disk access, and CPU use.

Find more quizzes: