0
0
Linux CLIscripting~20 mins

top and htop (live monitoring) in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Live Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Understanding the default output of top
What does the first line of the top command output typically show?
Linux CLI
top -b -n 1
ASystem uptime, number of users, and load averages
BMemory usage details only
CList of running processes with CPU usage
DDisk usage statistics
Attempts:
2 left
💡 Hint
Look at the very top line of the top output.
💻 Command Output
intermediate
1:30remaining
Identifying process sorting in htop
By default, how does htop sort the list of processes when you open it?
Linux CLI
htop
ABy process ID, ascending
BBy CPU usage, highest first
CAlphabetically by process name
DBy memory usage, lowest first
Attempts:
2 left
💡 Hint
Look at the column headers and which column is highlighted.
Configuration
advanced
2:00remaining
Customizing top to show only processes of a specific user
Which command will show top output filtered to only display processes owned by user alice?
Atop -p alice
Btop --user=alice
Ctop -U alice
Dtop -u alice
Attempts:
2 left
💡 Hint
Check the top manual for the option to filter by user.
Troubleshoot
advanced
2:00remaining
Resolving htop not showing colors correctly
If htop shows no colors and looks plain, which environment variable is most likely misconfigured?
AHOME
BPATH
CTERM
DUSER
Attempts:
2 left
💡 Hint
This variable tells programs what kind of terminal you are using.
Best Practice
expert
2:30remaining
Choosing the best tool for live system monitoring with process tree view
Which tool is best suited for live monitoring of system processes with an interactive tree view showing parent-child relationships?
Ahtop
Bps
Ctop
Dvmstat
Attempts:
2 left
💡 Hint
One tool provides an interactive interface and can show process trees.