Challenge your understanding of Linux system monitoring tools, covering essential commands and utilities for resource tracking, performance analysis, and troubleshooting. Perfect for those aiming to deepen their knowledge of the Linux tools ecosystem for system monitoring.
Which Linux command provides an interactive, real-time view of processes and CPU usage, updating automatically without manual refresh?
Explanation: The 'top' command is designed to display real-time information about running processes and CPU utilization, automatically refreshing every few seconds. 'grep' is used for searching text within files, while 'ls' lists directory contents but shows no resource usage. 'nano' is a text editor without any monitoring capabilities. Only 'top' offers live, continually updating process and resource statistics.
If you want to see disk space usage for each mounted file system in Linux, which command should you use for a human-readable summary?
Explanation: 'df -h' displays disk space usage for each file system in a format that is easy for humans to read, such as using MB or GB. 'ps aux' displays process information rather than disk space. 'du -x' summarizes disk usage for a directory, not the mounted file systems. 'pwd' shows the present working directory and does not relate to disk usage. Therefore, 'df -h' is the correct answer.
Which tool is commonly used to monitor and display real-time network interface statistics, such as bytes sent and received, in Linux?
Explanation: 'iftop' is a popular command-line tool for real-time monitoring of network traffic on Linux interfaces, showing data rates and usage. 'chmod' changes file permissions, not network statistics. 'w' lists users logged on but does not focus on network usage. 'touch' is used to create empty files or update file timestamps. Only 'iftop' provides live network traffic information.
After a system slowdown, an administrator uses a command to display load averages for the past 1, 5, and 15 minutes. Which command provides this summary along with uptime and logged-in users?
Explanation: The 'uptime' command shows how long the system has been running, the number of logged-in users, and the load averages for 1, 5, and 15 minutes. 'rm' is used to remove files, 'cat' concatenates and displays file contents, and 'tar' archives files. Only 'uptime' includes information about load averages and user sessions in one summary.
Which Linux command provides a detailed breakdown of physical and swap memory usage, including buffers and cache, in megabytes or gigabytes?
Explanation: The 'free -m' command shows statistics about total, used, and available physical and swap memory, with details on buffers and cache, in megabytes. 'cp' is used for copying files, not monitoring memory. 'stat' reports file or file system status, and 'find' locates files based on criteria. Only 'free -m' delivers comprehensive, readable memory usage information.