World map

 

BM: Baca dalam Bahasa Melayu

World L2: Keys & Staff

Processes: ps and top

You will learn: to see every program at work on the server and spot the one hogging the CPU.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

The server feels slow. Customers wait 10 seconds for the menu page. What do you check first?

Pick one answer.

Watch

You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~$

Folder ~

  • bin/ (folder)drwxrwxr-xstock-check.sh

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Busy programs

  • 1241bash /home/you/bin/stock-check.shusing the CPU

Every program at work is a process: A program at work right now, like a cook on shift. Each one has a number, its PID., like a cook on shift. ps aux lists them all. Each has a staff number: its PID.

Check

Tap the process that eats the CPU. Look at the %CPU column.

0 of 1 found

Try it

top shows the same, live, busiest first. Run top, look at the top row, then press q.

You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~$

Folder ~

  • bin/ (folder)drwxrwxr-xstock-check.sh

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Busy programs

  • 1241bash /home/you/bin/stock-check.shusing the CPU

Check

Which column tells you what?

Drag a card into a box. Or tap the card, then tap the box.

        Try it

        Long lists are tiring. Ask for the PID by name: pgrep -f stock-check.

        You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.

        You are hereyou@kedai:~$

        Folder ~

        • bin/ (folder)drwxrwxr-xstock-check.sh

        + 3 hidden (ls -a)

        Services

        • cronrunningstarts at boot
        • sshrunningstarts at boot
        • nginxrunningstarts at boot

        Busy programs

        • 1241bash /home/you/bin/stock-check.shusing the CPU

        Predict

        You type plain ps, with no aux. Do you see stock-check.sh?

        Pick one answer.

        You did it!

        You can now list the server’s processes and find the one hogging the CPU.

        Go deeper (optional)

        In top, M sorts by memory and P by CPU. ps aux | grep nginx filters the list with a pipe. htop is a friendlier top: you install it in lesson 10.

        Real rep (optional): on Linux, run top for ten seconds, then press q. Which process is busiest?