The free command displays the amount of used and free memory in the system, including RAM and swap space. It helps you understand how much memory is available and how much is being used.
Click to reveal answer
beginner
What information does the uptime command provide?
The uptime command shows how long the system has been running, the current time, how many users are logged in, and the system load averages for the last 1, 5, and 15 minutes.
Click to reveal answer
intermediate
What is the purpose of the vmstat command?
The vmstat command reports information about processes, memory, paging, block IO, traps, and CPU activity. It helps monitor system performance and resource usage over time.
Click to reveal answer
intermediate
How can you interpret the load average numbers shown by uptime?
Load averages represent the average number of processes waiting to run over 1, 5, and 15 minutes. A load average close to the number of CPU cores means the system is busy but not overloaded. Higher numbers indicate more demand than the CPU can handle.
Click to reveal answer
intermediate
Which vmstat fields indicate CPU usage?
In vmstat, the CPU usage fields are us (user time), sy (system time), id (idle time), and wa (time waiting for IO). These help understand how the CPU is spending its time.
Click to reveal answer
What does the free command NOT show?
AMemory usage details
BSwap space usage
CAvailable RAM
DCPU load averages
✗ Incorrect
The free command shows memory and swap usage but does not show CPU load averages.
Which command shows how long the system has been running?
Avmstat
Buptime
Cfree
Dtop
✗ Incorrect
The uptime command displays the system running time along with load averages.
In vmstat, what does the id field represent?
AIdle CPU time
BInput device usage
CInterrupts per second
DDisk IO
✗ Incorrect
The id field in vmstat shows the percentage of CPU time spent idle.
What does a high load average compared to CPU cores indicate?
ASystem is overloaded
BSystem is under low load
CSystem is idle
DSystem has no users logged in
✗ Incorrect
A load average higher than the number of CPU cores means more processes want CPU time than available, indicating overload.
Which command would you use to monitor memory and CPU usage over time?
Auptime
Bfree
Cvmstat
Dls
✗ Incorrect
vmstat provides ongoing reports of memory, CPU, and other system resource usage.
Explain how you would use free, uptime, and vmstat together to monitor a Linux system's health.
Think about what each command tells you and how they complement each other.
You got /4 concepts.
Describe what the load average numbers mean and how they relate to CPU cores.
Imagine how busy your kitchen is with cooks compared to the number of stoves.
You got /4 concepts.
Practice
(1/5)
1. What does the free command primarily display on a Linux system?
easy
A. System uptime and load average
B. Disk usage statistics
C. CPU temperature
D. Memory usage and availability
Solution
Step 1: Understand the purpose of free
The free command shows information about the system's memory usage, including total, used, free, and available memory.
Step 2: Compare with other commands
uptime shows system running time and load, vmstat shows detailed CPU and memory stats, but free focuses on memory.
"command not found" means vmstat (from procps package) is not installed.
Final Answer:
vmstat is not installed on the system -> Option A
Quick Check:
command not found = not installed [OK]
Hint: vmstat missing? Install procps package [OK]
Common Mistakes:
Assuming syntax error for missing command
Thinking root needed for vmstat
Believing interval too small
5. You want to monitor CPU and memory usage every 2 seconds for 5 samples using vmstat. Which command will correctly do this and what will be the total monitoring time?
hard
A. vmstat 2 5; total time 10 seconds
B. vmstat 5 2; total time 10 seconds
C. vmstat 2 5; total time 8 seconds
D. vmstat 5 2; total time 8 seconds
Solution
Step 1: Understand vmstat interval and count
vmstat 2 5 runs vmstat every 2 seconds, 5 times total.
Step 2: Calculate total monitoring time
vmstat prints the first line immediately, then 4 intervals of 2 seconds each, so total time = 2 * (5 - 1) = 8 seconds.
Final Answer:
vmstat 2 5; total time 8 seconds -> Option C
Quick Check:
Total time = interval * (count - 1) [OK]
Hint: Total time = interval x (count - 1) for vmstat [OK]
Common Mistakes:
Multiplying interval by count instead of count-1
Swapping interval and count values
Assuming total time equals interval x count
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.