Bird
Raised Fist0
Intro to Computingfundamentals~20 mins

Task manager and system monitoring in Intro to Computing - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Task Manager & Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Identify the output of the 'top' command snapshot
Given the following snapshot from the top command on a Linux system, what is the value of the CPU usage percentage for the user processes (us)?
top - 15:20:01 up 1 day,  3:45,  2 users,  load average: 0.15, 0.10, 0.05
Tasks: 150 total,   1 running, 149 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5.0 us,  2.0 sy,  0.0 ni, 92.0 id,  1.0 wa,  0.0 hi,  0.0 si,  0.0 st
Mem:   8000000k total,  2000000k used,  6000000k free,   500000k buffers
Swap:  2000000k total,        0k used,  2000000k free,  1000000k cached
A2.0%
B5.0%
C92.0%
D1.0%
Attempts:
2 left
💡 Hint
Look for the '%Cpu(s):' line and find the 'us' value which stands for user CPU usage.
🧠 Conceptual
intermediate
1:00remaining
Understanding process states in a task manager
Which of the following process states indicates that a process is currently executing on the CPU?
ASleeping
BStopped
CZombie
DRunning
Attempts:
2 left
💡 Hint
Think about which state means the process is actively doing work.
Troubleshoot
advanced
1:30remaining
Diagnosing high memory usage with 'ps' command
You run the command ps aux --sort=-%mem | head -5 to find processes using the most memory. Which option correctly describes what this command does?
ALists all processes sorted by memory usage descending, showing top 5
BLists all processes sorted by CPU usage ascending, showing top 5
CLists all processes sorted by process ID ascending, showing top 5
DLists only 5 processes with highest CPU usage
Attempts:
2 left
💡 Hint
Look at the options: --sort=-%mem means sort by memory descending.
🔀 Workflow
advanced
2:00remaining
Sequence to monitor and kill a high CPU process
What is the correct order of commands to find a process consuming high CPU and terminate it safely?
A2,1,3,4
B1,3,2,4
C1,2,3,4
D1,4,2,3
Attempts:
2 left
💡 Hint
First find the process, then try gentle kill, check, then force kill if needed.
Best Practice
expert
1:30remaining
Choosing the best tool for continuous system monitoring
Which tool is best suited for continuous, real-time monitoring of system metrics with alerting capabilities in a production environment?
ANagios
Bhtop
Cps
Dkill
Attempts:
2 left
💡 Hint
Consider tools designed for monitoring and alerting, not just viewing or managing processes.

Practice

(1/5)
1. What is the main purpose of a task manager in a computer system?
easy
A. To create backups of files
B. To install new software applications
C. To update the operating system automatically
D. To view and control running programs and processes

Solution

  1. Step 1: Understand what a task manager does

    A task manager shows running programs and processes on your computer.
  2. Step 2: Identify the main function

    It allows you to monitor and control these running tasks, like ending a frozen program.
  3. Final Answer:

    To view and control running programs and processes -> Option D
  4. Quick Check:

    Task manager = control running programs [OK]
Hint: Task manager = see and manage running programs [OK]
Common Mistakes:
  • Confusing task manager with software installer
  • Thinking task manager creates backups
  • Assuming task manager updates OS
2. Which command is used on Linux to display currently running processes in a terminal?
easy
A. install
B. top
C. copy
D. format

Solution

  1. Step 1: Recall Linux commands for process monitoring

    The top command shows active processes and system resource usage.
  2. Step 2: Eliminate unrelated commands

    install installs software, copy copies files, format prepares disks.
  3. Final Answer:

    top -> Option B
  4. Quick Check:

    Linux process list = top command [OK]
Hint: Use 'top' to see running processes on Linux [OK]
Common Mistakes:
  • Using 'install' instead of 'top' to view processes
  • Confusing 'copy' with process commands
  • Trying 'format' which erases disks
3. What will be the output of the following command on Windows?
tasklist | findstr chrome.exe
medium
A. Lists the 'chrome.exe' processes if active
B. Starts the Chrome browser
C. Deletes the chrome.exe process
D. Shows network connections of Chrome

Solution

  1. Step 1: Understand the 'tasklist' command

    This command lists all running processes on Windows.
  2. Step 2: Understand the pipe and 'findstr' usage

    The pipe sends output to 'findstr' which filters lines containing 'chrome.exe'.
  3. Final Answer:

    Lists the 'chrome.exe' processes if active -> Option A
  4. Quick Check:

    tasklist + findstr = filtered process list [OK]
Hint: Pipe tasklist to findstr to filter processes [OK]
Common Mistakes:
  • Thinking it launches or deletes Chrome
  • Confusing process listing with network info
  • Assuming it modifies processes
4. You run the command top -d on Linux but get an error. What is the likely problem?
medium
A. You need to run 'top' as root user always
B. The 'top' command does not support any options
C. The '-d' option requires a number to specify delay in seconds
D. The '-d' option is misspelled and should be '-D'

Solution

  1. Step 1: Check the '-d' option usage in 'top'

    The '-d' option sets the delay between screen updates and requires a number argument.
  2. Step 2: Identify the error cause

    If the number is missing or invalid, 'top' will show an error.
  3. Final Answer:

    The '-d' option requires a number to specify delay in seconds -> Option C
  4. Quick Check:

    top -d needs number argument [OK]
Hint: Use '-d' with a number for delay in top command [OK]
Common Mistakes:
  • Thinking 'top' has no options
  • Believing root is always needed to run 'top'
  • Using wrong option case '-D' instead of '-d'
5. You want to monitor CPU and memory usage on a Linux server and save the output every 10 seconds to a file named usage.log. Which command correctly does this?
hard
A. top -b -n 0 -d 10 > usage.log
B. top -d 10 > usage.log
C. top -b -d10 >> usage.log
D. top -d10 -b > usage.log

Solution

  1. Step 1: Understand 'top' options for batch mode and delay

    The '-b' option runs 'top' in batch mode (non-interactive) suitable for logging. The '-n 0' option sets unlimited iterations for continuous output. The '-d 10' sets 10 seconds delay between updates.
  2. Step 2: Check correct syntax for options and redirection

    Options must be separated by space: '-b -n 0 -d 10'. Using '>' overwrites the file, which is fine for fresh logs.
  3. Final Answer:

    top -b -n 0 -d 10 > usage.log -> Option A
  4. Quick Check:

    Batch mode + unlimited iterations + delay + redirect = top -b -n 0 -d 10 > usage.log [OK]
Hint: Use 'top -b -n 0 -d 10 > file' to log every 10 seconds [OK]
Common Mistakes:
  • Omitting '-b' for batch mode causes interactive output
  • Writing '-d10' without space can cause errors
  • Using '>>' appends instead of overwriting unintentionally