Processes and Monitoring

14. Processes and Monitoring#

This chapter explains how Bash interacts with running programs, background jobs, resource information, and process-oriented monitoring scripts.

  • Processes: Inspect running programs and the identifiers attached to them.

  • Job control: Move work between foreground and background execution.

  • Resources: Check disk, memory, and system load before automation fails.

  • Process substitution: Give commands file-like inputs backed by command output.

  • Monitoring: Combine checks into scripts that surface performance problems.

Chapter Video

Linux Crash Course: Managing Processes (9:22) by Learn Linux TV

Hosted on YouTube; property of its original creator, embedded here for educational reference only.

Learning Objectives

By the end of this chapter, you will be able to:

  1. Inspect running processes and interpret process information.

  2. Manage foreground and background jobs.

  3. Monitor disk, memory, and system resource use.

Chapter Flow

Glossary

#

Term

Explanation

1

Process

A running instance of a program.

2

PID

A process identifier assigned by the operating system.

3

Parent process

The process that started another process.

4

Signal

A notification sent to a process to request or force an action.

5

ps

A command that lists process information.

6

pgrep

A command that finds processes by name or pattern.

7

kill

A command that sends a signal to a process.

8

Foreground job

A job attached to the terminal for input and output.

9

Background job

A job running while the shell accepts more commands.

10

jobs

A shell builtin that lists current shell jobs.

11

fg

A shell builtin that brings a background job to the foreground.

12

bg

A shell builtin that resumes a stopped job in the background.

13

wait

A shell builtin that waits for jobs or processes to finish.

14

Disk usage

The amount of storage used or available on filesystems.

15

Memory usage

The amount of RAM used, free, or available.

16

Load average

A measure of runnable or waiting work over recent time windows.

17

Process substitution

The <(...) or >(...) syntax that presents command output as a file-like path.

18

Resource constraint

A limit on CPU, memory, disk, or process behavior.

19

Monitoring

Repeated observation of processes or resources for health and performance.

20

Alert

A notification produced when a monitored condition crosses a threshold.