Understanding Linux System Performance Metrics
18 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary function of the Nicariness value in process management?

  • To decrease the priority of the process
  • To increase the priority of the process (correct)
  • To allocate memory to the process
  • To interrupt the process
  • What is the unit of measurement for the RES column in the top command?

  • Kilobytes (correct)
  • Bytes
  • Gigabytes
  • Megabytes
  • What is the purpose of the %CPU column in the top command?

  • To display the percentage of swap space used by the process
  • To display the priority of the process
  • To display the percentage of memory used by the process
  • To display the percentage of CPU time used by the process (correct)
  • What is the purpose of the SHR column in the top command?

    <p>To display the amount of memory that could be allocated to other processes</p> Signup and view all the answers

    What is the purpose of the Swap column in the top command?

    <p>To display the amount of swap space being used in kilobytes</p> Signup and view all the answers

    What is the shortcut to interrupt a process in Linux?

    <p>Ctrl + C</p> Signup and view all the answers

    What is the purpose of the 'ps' command in Linux?

    <p>To display a snapshot of current processes</p> Signup and view all the answers

    What does the 'D' state indicate in a process?

    <p>An uninterruptible sleep process</p> Signup and view all the answers

    What is the meaning of the '+' character when used with process states?

    <p>A process in the foreground process group</p> Signup and view all the answers

    What is the unit of measurement for the RSS value in the 'ps' command output?

    <p>Kilobytes</p> Signup and view all the answers

    What does the '%' symbol indicate in the '%CPU' and '%MEM' columns of the 'ps' command output?

    <p>A percentage of the total system resources</p> Signup and view all the answers

    What is the purpose of the 'top' command in Linux?

    <p>To display tasks</p> Signup and view all the answers

    What is the purpose of the 'load average' metric in the system summary?

    <p>To measure the number of processes waiting to run</p> Signup and view all the answers

    What is the significance of the 'nice' value in a Linux process?

    <p>It determines the process's priority</p> Signup and view all the answers

    What is the meaning of the '%us' value in the system summary?

    <p>The percentage of CPU time spent on user processes</p> Signup and view all the answers

    How long has the system been up, according to the system summary?

    <p>3 hours</p> Signup and view all the answers

    What is the primary purpose of the 'Tasks' field in the system summary?

    <p>To display the number of processes running</p> Signup and view all the answers

    What is the significance of the 'wa' value in the system summary?

    <p>It measures the percentage of CPU time spent on I/O wait</p> Signup and view all the answers

    Study Notes

    CPU and Memory Utilization

    • The % of time the CPU has been idle
    • The % of time the CPU has been waiting for I/O
    • The % of CPU time spent servicing hard interrupts
    • The % of CPU time spent servicing soft interrupts
    • The % of CPU time stolen from the current vm by the hypervisor

    Memory Utilization

    • 4 KiB Mem: The amount of RAM being used in kilobytes
    • 5 KiB Swap: The amount of swap space (virtual memory) being used in kilobytes

    Top Program Header

    • PID: Process ID
    • USER: Username under which the process is running
    • PR: Priority for the process, ranging from -20 (very important) to 19 (unimportant)
    • NI: Niceness value, negative increases priority, positive decreases priority
    • VIRT: Total amount of virtual memory used by the process
    • RES: Resident size in kb, non-swapped physical memory used by the process
    • SHR: Shared memory size in kb, memory that could be allocated to other processes
    • S: Process status
    • %CPU: Percentage of CPU time the process was using at the time top last updated
    • %MEM: Percentage of memory the process was using at the time top last updated
    • TIME+: Cumulative CPU time the process and children of the process have used
    • COMMAND: Name of the process or path to the command used to start the process

    Controlling Processes

    • To interrupt a process, press Ctrl + C

    Processes Characteristics

    • Can be started from the GUI or the command line
    • Can start another process
    • Can only be created by another process

    Commands Used in Viewing and Controlling Processes

    • ps: Reports a snapshot of current processes
    • top: Displays tasks
    • jobs: Lists active jobs
    • bg: Places a job in the background
    • fg: Places a job in the foreground

    Viewing Processes

    • ps Command:
      • Process States:
        • R: Running
        • S: Sleeping (waiting for an event)
        • D: Uninterruptible sleep (waiting for I/O)
        • T: Traced or stopped
        • Z: A defunct or “zombie” process (child process that has been terminated, but not cleaned up by its parent)
      • Characters used with Process States:
        • <: High priority process
        • N: Low priority process
        • L: Has pages locked into memory (for real-time and custom I/O)
        • s: A session leader
        • l: Multi-threaded
        • +: In the foreground process group

    ps Command with the aux option

    • Header Meaning:
      • USER: User ID, owner of the process
      • %CPU: CPU usage in percent
      • %MEM: Memory usage in percent
      • VSZ: Virtual Memory Size
      • RSS: Resident Set Size, amount of physical memory (in kilobytes) the process is using
      • START: Time when the process has started

    Top Program System Summary

    • Row Field 1:
      • Up: Uptime, amount of time since the machine was last booted
      • User: Number of users logged in
      • Load average: Number of processes waiting to run (in a runnable state and sharing the CPU)
      • Tasks: Number of processes and their various process states
      • %Cpu(s): CPU usage:
        • us: User processes
        • sy: System (kernel) processes
        • ni: “nice” (low priority) processes
        • id: Idle time
        • wa: Waiting for I/O
        • hi: Hardware interrupts
        • si: Software interrupts
        • st: Stolen time (from the hypervisor)

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge of Linux system performance metrics, including CPU usage, memory, and swap space. This quiz covers the various columns and headers in the top command output, including process IDs, usernames, and more.

    More Like This

    Cron Pop Quiz
    5 questions

    Cron Pop Quiz

    GuiltlessAshcanSchool avatar
    GuiltlessAshcanSchool
    Linux系統管理:用戶管理
    16 questions
    Sistem Operasi dan Linux Kernel
    48 questions
    Use Quizgecko on...
    Browser
    Browser