Processes & Signals: glossary
87 terms, in plain words, with where each one is taught.
- -Xmx (Xmx, heap limit)
- The Java option that caps the heap:
-Xmx512m= "use at most 512 MB for your data". Lesson 3.14 - $$
- A shell variable holding your own shell's PID. Lesson 3.1
- avail Mem (available memory)
- How much memory programs could still get right now, counting cache the kernel would give back. The memory number to read, not "free". Lesson 3.5
- batch mode (top -b)
- top printing plain text instead of redrawing the screen:
top -b -n 1is one snapshot you can paste into a ticket. Lesson 3.5 - bind (Address already in use)
- A program claiming a port so it can listen on it. Only one process can hold a port; the next gets "Address already in use".
- catchable (catch a signal)
- A signal the program may handle or ignore. Every signal except SIGKILL and SIGSTOP is catchable. Lesson 3.6
- context switch (context switches)
- The CPU stopping one process or thread and switching to another. vmstat's cs column counts them per second. Lesson 3.5
- controlling terminal
- The one terminal a session is attached to. When it closes, the kernel sends SIGHUP to the session leader. Lesson 3.10
- core (cores, CPU core)
- One CPU that can run one thing at a time.
nprocprints how many the box has. Lesson 3.3 - D state (uninterruptible sleep, D-state)
- State D: the process is stuck inside the kernel waiting for a disk or a network file server, and signals are not delivered - not even kill -9. Many D processes = find what they wait for (
/proc/<pid>/wchan,stack), not a bigger hammer. Lesson 3.1 - default action
- What the kernel does with a signal the program has no handler for. For most signals, including SIGTERM, SIGHUP and SIGUSR1, it is "terminate". Lesson 3.6
- deploy pipeline
- The automated script that builds a new version of a service and installs it.
- disown
- Tells bash to forget a job (or, with -h, not to pass SIGHUP to it) after it has already started. Lesson 3.10
- drain (draining)
- Stopping gracefully: accept no new work, finish what is in flight, close connections, then exit. Lesson 3.18
- EIO
- The "input/output error" a program gets when it reads or writes a terminal (or device) that is gone. Lesson 3.10
- epoll (epoll_wait, epoll_pwait)
- The system call a server uses to wait for activity on many sockets at once. Seeing it idle is normal. Lesson 3.12
- exit code 143 (143)
- 128 + 15: the process ended on SIGTERM - a normal stop. Lesson 3.18
- futex
- The system call a thread uses to wait until another thread wakes it. Lesson 3.12
- graceful reload
- Re-reading the configuration without dropping connections: new workers start with the new config while old ones finish their requests. Lesson 3.6
- htop
- A friendlier top with colour bars per core, mouse support and a tree view. Lesson 3.3
- interrupt (interrupts)
- A device such as a network card or disk telling the CPU "data arrived, deal with it". top shows the time spent as hi and si. Lesson 3.5
- interruptible sleep (S state)
- State S: the process is waiting for something (input, a network packet, a timer) and a signal can wake it. Healthy and normal. Lesson 3.1
- iowait (%wa)
- CPU time spent idle while some process it ran waits for a disk. A kind of idle, not work. Waits on NFS requests do not count as iowait, so zero wa does not rule out I/O trouble. Lesson 3.3
- Java
- A programming language. Java programs are not run directly by the kernel; they run inside the JVM. On this box the orders, payments and inventory services are Java programs (
java -jar ...). Lesson 3.1 - job (background job, job spec, %1)
- A command your interactive shell started and keeps track of.
&runs it in the background;%1means job 1 wherever a PID is expected.jobslists them,fg/bgmove them to the foreground/background. Lesson 3.6 - journalctl -k (kernel log)
- Shows only the kernel's own log messages from the journal (the same messages dmesg reads).
- JVM (Java Virtual Machine, Java runtime)
- The Java Virtual Machine: the program that runs Java programs. It is the
javaprocess you see in ps. It reserves big address ranges up front, which is why a JVM's VSZ looks huge. Chapter 25 is all JVM. Lesson 3.1 - keepalive
- A periodic "are you still there?" message on a connection; when it goes unanswered, the connection is treated as dead. Lesson 3.10
- kernel panic
- The kernel hitting a fatal error and stopping the whole machine. Killing PID 1 would cause one, which is why PID 1 is protected; so can running out of memory with nothing left to kill (Chapter 5). Lesson 3.8
- kernel stack (/proc/<pid>/stack)
- The chain of kernel functions a process is inside right now, innermost first. Root can read it from /proc/<pid>/stack. Lesson 3.3
- kernel thread (I state, idle kernel thread)
- A helper that runs inside the kernel itself, shown in ps with a name in [brackets]; state I means idle. Lesson 3.1
- killable wait (TASK_KILLABLE)
- A kind of D-state wait that SIGKILL can still end. Its wchan name usually ends in _killable. Lesson 3.3
- killall
- Sends a signal to every process with exactly this name. Lesson 3.6
- limits.conf (/etc/security/limits.conf)
- The file that sets limits for logins. It does not affect services started by systemd. Lesson 3.16
- LISTEN
- The state of a socket that is waiting for new connections on a port: a server that is up and ready.
ss -tlnandlsof -ishow it. - logrotate
- The tool that renames or deletes old log files on a schedule and starts fresh ones.
- lsof
- Lists open files of processes - files, sockets, pipes.
-i :PORTa port,-p PIDa process, a path = who has it open,-tPIDs only. Needs sudo to see other users. Lesson 3.12 - master process (worker process)
- In nginx, the root-owned process that reads the config and manages the worker processes that actually serve requests. Lesson 3.6
- NFS (Network File System, NFS mount)
- Network File System: a directory that really lives on another server and is reached over the network. When the server stops answering, processes using it get stuck in D state. Lesson 3.3
- nice (niceness, niced)
- A process's politeness about CPU, from -20 (greedy) to 19 (polite). 0 is normal; a "niced" process runs at low priority. Lesson 3.1
- nohup
- Starts a command with SIGHUP ignored, so it survives the terminal going away. Output goes to nohup.out unless you redirect it. Lesson 3.10
- NUL byte (NUL)
- The byte with value 0. /proc/<pid>/cmdline and environ use it to separate entries, so it prints as nothing;
tr '\0' ' 'makes them readable. Lesson 3.14 - page cache
- RAM the kernel uses to keep copies of file data, so reads are fast and writes can be finished later (writeback). Chapter 5 goes deep: it looks "used" but is given back when programs need memory.
- pgrep
- Lists PIDs of processes whose name matches a pattern.
-aadds command lines,-fmatches the full command line,-opicks the oldest. Always pgrep before pkill: same arguments, but it only looks. Lesson 3.6 - pkill
- Sends a signal (SIGTERM by default) to every process whose name - or with
-f, whose whole command line - matches a pattern. Lesson 3.6 - process group (PGID)
- One job - a command or a whole pipeline - as the kernel groups it. Ctrl+C and Ctrl+Z go to the foreground group only. Lesson 3.10
- process table
- The kernel's list of every running process: its PID, parent, owner, state and what it is using.
psprints it once;topprints it over and over. Lesson 3.1 - ps (ps aux, ps -ef, ps -eo)
- Prints the process table once and exits.
auxand-efare two classic column sets;-eo col,colpicks your own columns.ps -eo pid,ppid,user,rss,stat,comm --sort=-rss | head- every process, chosen columns, biggest memory first.ps Llists all column names. Lesson 3.1 - pseudo-terminal (pty, pts, pts/0)
- A fake terminal device sshd creates for each connection, shown as pts/0, pts/1... Lesson 3.10
- pstree
- Draws the process table as a tree of parents and children, from PID 1 down.
-padds PIDs. - ptrace
- The kernel's debugging interface that strace uses; it pauses the traced process at every system call. Lesson 3.12
- re-parenting (re-parented)
- The kernel giving an orphan a new parent, usually PID 1. Lesson 3.8
- RPC (remote procedure call)
- Remote procedure call: one machine asking another to do something and waiting for the answer. NFS works this way. Lesson 3.3
- RSS (resident set size)
- The physical RAM a process is really using right now, in KiB in ps. The memory number to sort by. top calls it RES; /proc/PID/status calls it VmRSS. Lesson 3.1
- runnable (R state, running or runnable)
- State R: the process is on a CPU right now, or waiting in the queue for one. Lesson 3.1
- scope (session scope, session-N.scope)
- A cgroup systemd makes for processes it did not start itself, such as everything from one login (session-N.scope). "abandoned" in systemctl status = the user of that session has logged out. Lesson 3.14
- session (SID, login session)
- Everything started from one login. Its ID (SID) is the PID of the session leader, your login shell. Lesson 3.10
- session leader
- The first process of a login session, usually your login shell. ps marks it with a lowercase s in STAT. Lesson 3.1
- setsid
- Runs a command in a brand-new session with no terminal, so there is nothing to hang up. Lesson 3.10
- SIGCONT (CONT)
- The resume signal: a paused (T) process carries on. Lesson 3.6
- SIGPIPE
- The signal a program gets when it writes to a pipe or connection whose other end is gone. Default action: terminate. Lesson 3.10
- SIGSTOP (STOP)
- The pause signal. It cannot be caught; the process freezes in state T until SIGCONT. Lesson 3.6
- SIGUSR1 (USR1, SIGUSR2, USR2)
- Two "user-defined" signals whose meaning each program chooses (often "reopen your log files"). Without a handler they terminate the process.
- slice (system.slice, user.slice)
- systemd's folder of cgroups: system.slice holds services, user.slice holds logins. Lesson 3.14
- socket (sockets)
- An open network connection, or a listening point for new ones. On Linux it is also a file descriptor. Lesson 3.12
- ss (ss -tlnp)
- Lists sockets.
ss -tlnp= TCP, listening only, numbers not names, with the owning process. Needs sudo to show other users' processes. Lesson 3.12 - sshd-session
- The helper processes the SSH server starts for each connection; your shell's parent.
- STAT (process state, state column)
- The ps column that says what a process is doing right now, as a letter (R, S, D, Z, T, I) plus modifiers. First letter = state. Then
ssession leader,lmulti-threaded,+foreground,<high priority,Nlow priority.Sslis a normal service. Lesson 3.1 - steal (steal time)
- CPU time your virtual machine wanted but the hypervisor gave to something else. Shown as st in top and vmstat. Lesson 3.5
- stopped process (T state)
- State T: a process that has been paused (Ctrl+Z or SIGSTOP). It keeps its memory and open files until it is resumed. Lesson 3.1
- strace
- Prints every system call a process makes, as it happens.
-p PIDattach,-fall threads,-e trace=...filter,-csummary. Slows the process down. Lesson 3.12 - subreaper
- A process that asked the kernel to adopt its orphaned descendants instead of PID 1. Lesson 3.8
- supervisor
- The program that starts, watches and stops your service. On this box, systemd. Lesson 3.18
- system call (syscall, syscalls, system calls)
- A request a program makes to the kernel, such as "open this file", "read from this socket" or "start a process".
straceprints them as they happen. Lesson 3.3 - thread pool
- A fixed set of threads a server keeps ready, each handling one request at a time. When all are stuck, the service stops responding. Lesson 3.12
- tmux (screen, terminal multiplexer)
- Keeps your shells running inside a server process that is not tied to your SSH connection; detach (Ctrl+b d), reconnect,
tmux attach. Lesson 3.10 - top
- A full-screen, refreshing view of the process table plus CPU and memory summaries. P sorts by CPU, M by memory, 1 splits cores, q quits. Lesson 3.3
- transient unit
- A systemd service created on the fly by systemd-run, with no unit file: its own cgroup and journal, and it disappears when it finishes. Lesson 3.10
- TTY (tty)
- The terminal a process is attached to.
pts/0is an SSH login;?means no terminal (a background service). Lesson 3.1 - ulimit (ulimit -n)
- A shell built-in that shows or sets limits for the current shell and what it starts.
-n= open files,-H= the hard limit. Lesson 3.16 - uptime
- Prints the time, how long the box has been up, how many users are logged in, and the three load averages. Lesson 3.3
- vmstat
- Prints one line of system-wide numbers per interval: r (runnable), b (blocked in D), swap, disk I/O, CPU.
vmstat 1 5= every second, five times; ignore the first line. Lesson 3.5 - VSZ (virtual size, VIRT)
- All the memory address ranges a process has reserved, including memory it never touched. Usually far bigger than RSS and mostly meaningless. Lesson 3.1
- wait()
- The system call a parent uses to collect a finished child's exit status. Until it does, the child stays a zombie. Lesson 3.8
- wchan (wait channel)
- The name of the kernel function a sleeping process is waiting in, read from /proc/<pid>/wchan.
nfs_*/rpc_*= NFS,io_schedule= a local disk,folio_wait_*= writeback,sk_wait_data= a socket. Lesson 3.3 - write-ahead log (WAL)
- A journal of changes a database writes before applying them, so it can replay them after a crash. Lesson 3.6
- writeback
- The kernel writing data a program already "saved" (into RAM) out to the real disk or file server. Lesson 3.3