0
0
Linux CLIscripting~20 mins

System resource monitoring (free, uptime, vmstat) in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
System Resource Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What does the command free -m output?
You run free -m on a Linux system. What does the Mem: line show?
Linux CLI
free -m
ACPU usage percentages for user, system, and idle
BMemory usage in megabytes including total, used, free, shared, buff/cache, and available
CDisk space usage in megabytes for all mounted filesystems
DNetwork interface statistics including packets sent and received
Attempts:
2 left
💡 Hint
Think about what 'free' command is designed to show about system memory.
💻 Command Output
intermediate
1:30remaining
What does the uptime command output?
You run uptime on a Linux system. Which of the following best describes the output?
Linux CLI
uptime
ANetwork connections and their states
BList of running processes with CPU and memory usage
CCurrent time, system uptime, number of users logged in, and load averages for 1, 5, and 15 minutes
DDisk usage statistics for mounted filesystems
Attempts:
2 left
💡 Hint
Think about what 'uptime' means for a system.
💻 Command Output
advanced
2:00remaining
What does the vmstat 1 2 command output show?
You run vmstat 1 2. What does the second line of output represent?
Linux CLI
vmstat 1 2
ASystem performance statistics averaged over the last 1 second interval
BInitial system statistics since boot time
CDisk usage summary for the last 2 seconds
DNetwork packet statistics for the last 1 second
Attempts:
2 left
💡 Hint
The first line of vmstat output is a summary since boot, the next lines are interval samples.
Troubleshoot
advanced
2:00remaining
Why does free -m show low free memory but high available memory?
You notice free -m shows low free memory but high available memory. What is the most likely explanation?
ALinux uses free memory for cache and buffers, which can be freed when needed
BThe system is running out of memory and will soon crash
CThere is a memory leak in the kernel causing incorrect reporting
DThe command is showing swap memory instead of RAM
Attempts:
2 left
💡 Hint
Think about how Linux manages memory for performance.
Best Practice
expert
2:30remaining
Which command combination gives a real-time view of CPU, memory, and process info?
You want to monitor CPU usage, memory usage, and running processes in real-time on a Linux system. Which command or combination is best?
ARun <code>free -m</code> repeatedly in a loop
BCheck <code>uptime</code> every minute
CUse <code>vmstat 5</code> alone without any other tool
DUse <code>top</code> command which shows CPU, memory, and process info live
Attempts:
2 left
💡 Hint
Think about a tool that shows multiple system stats live in one place.