top and free commands

LPIC1-101LINUX

2/24/2026

The top Header Essentials

When you run top, focus on these specific fields for the exam:

  • Tasks: Shows total processes and how many are "zombie" (defunct).

  • %Cpu(s):

    • us (user): Time spent running non-kernel processes.

    • sy (system): Time spent running kernel processes.

    • id (idle): Unused CPU capacity.

  • Mem / Swap: Total, free, and used memory.

Essential top Interactive Commands

The LPIC-1 wants to know if you can manipulate top while it's running. You only need to memorize these five keys for the 101 exam by the time this entry is being created:

Key Action Why it's on the exam

h Help Shows all available commands.

k Kill Lets you enter a PID to stop a process

r Renice Changes the priority of a running process.

M Memory Sorts the list by memory usage.

P Processor Sorts the list by CPU usage (default).

q Quit Exits the program.

A Note on "Zombie" Processes
  • A process in the Z state has finished executing but still has an entry in the process table because its parent hasn't "reaped" it yet.

  • Crucial fact: You cannot kill -9 a zombie. It's already dead! You must kill its parent or wait for the parent to finish.

  • Another command to find zombie processes: ps aux | grep -w Z

Load average explained
The "Core" Logic
  • On a 1-core CPU, a load of 1.0 is 100% utilization.

  • On a 4-core CPU, a load of 1.0 is only 25% utilization.

Exam Rule of Thumb: You generally start "worrying" when the load average reaches the total number of CPU cores you have. If you have 4 cores, a load of 4.0 means you are at 100% capacity.

Why are there three numbers?

As we mentioned, they represent the 1, 5, and 15-minute windows. This tells you the trend.

Scenario (4-core CPU) Load Average What's happening?

Increasing Stress 2.0, 1.0, 0.5 The 1-minute load is higher than the 15-minute. The system is getting busier.

Recovery 0.5, 1.0, 2.0 The 1-minute load is lower than the 15-minute. The system is getting less busier.

Stable Load 1.0, 1.0, 1.0 The load is consistent across the last 15 minutes.

How to check your Cores

To know if a load of 1.0 is bad, you need to know your core count: grep -c 'processor' /proc/cpuinfo or lscpu | grep "^CPU(s):"

The Math for my System

Since I have 16 processors:

  • Load of 1.0: My system is barely breaking a sweat (6.25% utilization).

  • Load of 8.0: My system is at 50% capacity.

  • Load of 16.0: My system is "full." Every processor has exactly one task to do.

  • Load of 32.0: I am in trouble. For every 1 task being processed, there is 1 task waiting in line.

Note: Besides the top command, you can also see the load average with the uptime and w commands. (The w command is not necessary for the 101 exam).

free command

Let's look at free -m (-h, -g) (Weight 4, Topic 103.5): Available vs Free memory.

Column Meaning for the Exam

total Your actual physical RAM.

used RAM currently held by the system and programs.

free RAM that is literally doing nothing.

buff/cache RAM used to speed up disk access. The kernel can give this back instantly if an app needs it.

available The most important number. This is free + buff/cache. It tells you how much RAM you can actually start a new program with.