Podcast
Questions and Answers
What is the primary function of the Nicariness value in process management?
What is the primary function of the Nicariness value in process management?
What is the unit of measurement for the RES column in the top command?
What is the unit of measurement for the RES column in the top command?
What is the purpose of the %CPU column in the top command?
What is the purpose of the %CPU column in the top command?
What is the purpose of the SHR column in the top command?
What is the purpose of the SHR column in the top command?
Signup and view all the answers
What is the purpose of the Swap column in the top command?
What is the purpose of the Swap column in the top command?
Signup and view all the answers
What is the shortcut to interrupt a process in Linux?
What is the shortcut to interrupt a process in Linux?
Signup and view all the answers
What is the purpose of the 'ps' command in Linux?
What is the purpose of the 'ps' command in Linux?
Signup and view all the answers
What does the 'D' state indicate in a process?
What does the 'D' state indicate in a process?
Signup and view all the answers
What is the meaning of the '+' character when used with process states?
What is the meaning of the '+' character when used with process states?
Signup and view all the answers
What is the unit of measurement for the RSS value in the 'ps' command output?
What is the unit of measurement for the RSS value in the 'ps' command output?
Signup and view all the answers
What does the '%' symbol indicate in the '%CPU' and '%MEM' columns of the 'ps' command output?
What does the '%' symbol indicate in the '%CPU' and '%MEM' columns of the 'ps' command output?
Signup and view all the answers
What is the purpose of the 'top' command in Linux?
What is the purpose of the 'top' command in Linux?
Signup and view all the answers
What is the purpose of the 'load average' metric in the system summary?
What is the purpose of the 'load average' metric in the system summary?
Signup and view all the answers
What is the significance of the 'nice' value in a Linux process?
What is the significance of the 'nice' value in a Linux process?
Signup and view all the answers
What is the meaning of the '%us' value in the system summary?
What is the meaning of the '%us' value in the system summary?
Signup and view all the answers
How long has the system been up, according to the system summary?
How long has the system been up, according to the system summary?
Signup and view all the answers
What is the primary purpose of the 'Tasks' field in the system summary?
What is the primary purpose of the 'Tasks' field in the system summary?
Signup and view all the answers
What is the significance of the 'wa' value in the system summary?
What is the significance of the 'wa' value in the system summary?
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
- Process States:
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.
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.