Difference between revisions of "Introduction to Linux in HPC/Processes"

From HPC Wiki
Introduction to Linux in HPC/Processes
Jump to navigation Jump to search
Line 46: Line 46:
 
=== Exercises in Terminal === <!--T:5-->   
 
=== Exercises in Terminal === <!--T:5-->   
  
  1. Start a process (e.g. sleep 10m) and kill it from a second console.
+
  1. Start a process, bring it into background/foreground.
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      Start the process: sleep 10m
 
      Go to a second console.
 
      Start the process manager: top
 
      Filter process from your user account: press 'u' and type in your account name.
 
      Identify the job ('sleep') and note the associated PID.
 
      Kill it: press 'k' and type in the PID from previous step.
 
    |}
 
 
 
2. Start a process, bring it into background/foreground.
 
 
   {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
   {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
     | <strong>Hint:</strong>
 
     | <strong>Hint:</strong>
Line 72: Line 59:
 
     |}
 
     |}
  
  3. Start the task manager and identify the process with the largest memory usage.
+
  2. Start the task manager and identify the process with the largest memory usage.
 
   {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
   {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
     | <strong>Hint:</strong>
 
     | <strong>Hint:</strong>
 
     |-
 
     |-
 
     |
 
     |
       Start the procee manager: top
+
       Start the process manager: top
 
       Activate highlighting for current sort column: press 'x'
 
       Activate highlighting for current sort column: press 'x'
 
       Select column to sort for: press '>' or '<' until column '%MEM' is acitve
 
       Select column to sort for: press '>' or '<' until column '%MEM' is acitve
 
       (optional) Reverse sorting: press 'R'
 
       (optional) Reverse sorting: press 'R'
 +
    |}
 +
 +
3. Start the task manager and filter processes of your user account.
 +
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 +
    | <strong>Hint:</strong>
 +
    |-
 +
    |
 +
      Start the process manager: top
 +
      Select username to filter: press 'u' and type in username
 +
    |}
 +
 +
4. Start a process (e.g. sleep 10m) and kill it from a second console.
 +
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 +
    | <strong>Answer:</strong>
 +
    |-
 +
    |
 +
      Start the process: sleep 10m
 +
      Go to a second console.
 +
      Start the process manager: top
 +
      Filter process from your user account: press 'u' and type in your account name.
 +
      Identify the job ('sleep') and note the associated PID.
 +
      Kill it: press 'k' and type in the PID from previous step.
 
     |}
 
     |}
  

Revision as of 17:15, 30 November 2020

Tutorial
Title: Introduction to Linux in HPC
Provider: HPC.NRW

Contact: tutorials@hpc.nrw
Type: Multi-part video
Topic Area: HPC Platforms
License: CC-BY-SA
Syllabus

1. Background and History
2. The Command Line
3. Linux Directory Structure
4. Files
5. Text display and search
6. Users and permissions
7. Processes
8. The vim text editor
9. Shell scripting
10. Environment variables
11. System configuration
12. SSH Connections
13. SSH: Graphics and File Transfer
14. Various tips

Video

( Slides as pdf)


Quiz

What does PID stand for?

Packet Identifier
Process Identifier
Protocol Identifocation

How are the permissions of a process set?

By inheritance of owner's permissions.
Manually by user
Explicitly at startup by parameters.

Exercises in Terminal

1. Start a process, bring it into background/foreground.
2. Start the task manager and identify the process with the largest memory usage.
3. Start the task manager and filter processes of your user account.
4. Start a process (e.g. sleep 10m) and kill it from a second console.


<< Users and Permissions

Overview

The vim Text Editor >>