0
0
Linux CLIscripting~10 mins

System resource monitoring (free, uptime, vmstat) 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 code to display the total and free memory on the system.

Linux CLI
free [1]
Drag options to blanks, or click blank then click option'
A-m
B-x
C-z
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Using options that do not display memory in a readable format.
Omitting the option and getting output in bytes.
2fill in blank
medium

Complete the code to show how long the system has been running.

Linux CLI
uptime [1]
Drag options to blanks, or click blank then click option'
A-p
B-t
C-s
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using uptime without options which shows more info than needed.
Using -s which shows boot time, not uptime duration.
3fill in blank
hard

Fix the error in the command to display CPU and memory statistics every 2 seconds.

Linux CLI
vmstat [1] 5
Drag options to blanks, or click blank then click option'
A-s
B-2
C2
Ds
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash before the interval number causes an error.
Using letters instead of numbers for interval.
4fill in blank
hard

Fill both blanks to create a command that shows memory usage in kilobytes and updates every 3 seconds.

Linux CLI
free [1] [2] 3
Drag options to blanks, or click blank then click option'
A-k
B-m
C-s
D-h
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up units and interval options.
Using -m instead of -k for kilobytes.
5fill in blank
hard

Fill all three blanks to create a vmstat command that shows statistics every 4 seconds, 6 times, and displays summary since boot.

Linux CLI
vmstat [1] [2] [3]
Drag options to blanks, or click blank then click option'
A4
B6
C-s
D-m
Attempts:
3 left
💡 Hint
Common Mistakes
Using options instead of numbers for interval and count.
Omitting the summary option.