0
0
Linux CLIscripting~10 mins

top and htop (live monitoring) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to start the basic system monitor tool.

Linux CLI
[1]
Drag options to blanks, or click blank then click option'
Atop
Bps
Chtop
Dvmstat
Attempts:
3 left
💡 Hint
Common Mistakes
Typing 'htop' instead of 'top' when htop is not installed.
2fill in blank
medium

Complete the command to start the enhanced system monitor with a user-friendly interface.

Linux CLI
[1]
Drag options to blanks, or click blank then click option'
Ahtop
Btop
Ciotop
Dglances
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'top' when 'htop' is requested.
3fill in blank
hard

Fix the error in the command to quit the top or htop program.

Linux CLI
Press [1] to exit the program.
Drag options to blanks, or click blank then click option'
ACtrl+C
BEsc
Cq
DCtrl+Z
Attempts:
3 left
💡 Hint
Common Mistakes
Trying Ctrl+C which sends interrupt but may not exit cleanly.
4fill in blank
hard

Fill both blanks to filter processes by user and sort by CPU usage in top.

Linux CLI
top -u [1] -o [2]
Drag options to blanks, or click blank then click option'
Ausername
Bpid
Ccpu
Dmem
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pid' or 'mem' for sorting when CPU is requested.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps process IDs to their memory usage if memory usage is above 100MB.

Linux CLI
{pid: mem for pid, mem in processes.items() if mem [1] [2]
Drag options to blanks, or click blank then click option'
A>
B100
CMB
Dand
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'and' in place of comparison operator.