Understanding Linux System Performance Metrics

LuckyConcertina avatar
LuckyConcertina
·
·
Download

Start Quiz

Study Flashcards

18 Questions

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

To increase the priority of the process

What is the unit of measurement for the RES column in the top command?

Kilobytes

What is the purpose of the %CPU column in the top command?

To display the percentage of CPU time used by the process

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

To display the amount of memory that could be allocated to other processes

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

To display the amount of swap space being used in kilobytes

What is the shortcut to interrupt a process in Linux?

Ctrl + C

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

To display a snapshot of current processes

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

An uninterruptible sleep process

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

A process in the foreground process group

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

Kilobytes

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

A percentage of the total system resources

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

To display tasks

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

To measure the number of processes waiting to run

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

It determines the process's priority

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

The percentage of CPU time spent on user processes

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

3 hours

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

To display the number of processes running

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

It measures the percentage of CPU time spent on I/O wait

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)

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.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Linux Tools and Techniques Course
4 questions
Linux System Administration Basics
10 questions
Linux系統管理:用戶管理
16 questions
Use Quizgecko on...
Browser
Browser