100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Bash

Monitoring Processes with ps and top

Learn to inspect running processes with ps snapshots and the interactive top monitor, reading CPU, memory, and state columns to diagnose system load.

Processes & JobsBeginner9 min readJul 9, 2026
Analogies

Monitoring Processes with ps and top

Every running program on a Linux system is represented by a process, and understanding what is running, how much CPU and memory it consumes, and what state it's in is fundamental to system administration. The ps command takes a point-in-time snapshot of processes, while top (and its modern successor htop) provides a continuously refreshing, interactive view. Together they form the primary toolkit for answering 'what is my system doing right now, and why is it slow?'

🏏

Cricket analogy: ps is like a single freeze-frame photo of the scoreboard at one moment; top is like watching the live scoreboard refresh ball by ball — together they answer "what's happening in this match right now, and why has the run rate stalled?"

ps: the process snapshot

ps by itself, with no options, only shows processes attached to your current terminal session — usually just your shell and the ps command itself. To see the whole system you need option combinations. The BSD-style ps aux and the UNIX-style ps -ef are the two most common invocations, and while they originate from different standards they both work on Linux because GNU ps supports both syntaxes. aux shows all processes (a), including those without a controlling terminal (x), in user-oriented format (u) with the owning username; -ef shows every process (-e) in full format (-f) with parent PID included, which is handy for tracing process trees.

🏏

Cricket analogy: Plain ps only shows your own team's dugout, not the whole stadium; ps aux shows all players (a) including support staff off-camera (x) with names labeled (u), while ps -ef is the same full stadium view (-e) with coaching lineage shown (-f) — different broadcasters, same ground, both valid.

bash
# BSD-style: all processes, user format
ps aux | head -20

# UNIX-style: full listing with parent PIDs
ps -ef | grep nginx

# Show a process tree (who spawned whom)
ps -ef --forest
# or, more compact:
ps auxf

# Custom columns: PID, %CPU, %MEM, elapsed time, command
ps -eo pid,pcpu,pmem,etime,cmd --sort=-pcpu | head -10

# Threads for a specific process
ps -eLf | grep 1234

Reading the columns

Key ps aux columns: USER (owner), PID (process ID), %CPU (recent CPU usage, can exceed 100% on multi-core systems if a process uses several threads), %MEM (resident memory as a percentage of physical RAM), VSZ (virtual memory size in KB), RSS (resident set size — actual physical RAM in use), TTY (controlling terminal, or ? if none), STAT (process state code), START (start time), and TIME (cumulative CPU time consumed, not wall-clock time). The STAT column uses codes such as R (running or runnable), S (interruptible sleep, waiting for an event), D (uninterruptible sleep, usually waiting on disk I/O and cannot be killed with SIGKILL until the I/O completes), Z (zombie — terminated but not yet reaped by its parent), and T (stopped, e.g. by SIGSTOP or Ctrl+Z). A trailing + means the process is in the foreground process group of its terminal.

🏏

Cricket analogy: In a scorecard, USER is the batsman's name, PID their unique cap number, %CPU their current strike rate, %MEM their share of team runs, TTY which ground they're playing at; STAT codes mirror match states — R for actively batting, S for waiting in the pavilion for a partnership, D for stuck on a DRS review that can't be interrupted, Z for a retired-out batsman not yet removed from the card, and T for a rain-delayed player.

top: the interactive monitor

top refreshes its display every few seconds (3 by default) and lets you sort, filter, and act on processes without leaving the screen. The header summarizes uptime and load averages, task counts by state, overall CPU usage broken into user/system/nice/idle/wait time, and memory/swap totals. Inside top, pressing P sorts by CPU usage, M sorts by memory usage, k prompts for a PID to kill, r renices a process, 1 toggles per-core CPU breakdown, and q quits. The load average figures (e.g. '0.52, 0.75, 0.91') represent the average number of processes wanting CPU time over the last 1, 5, and 15 minutes — on a system with 4 cores, a sustained load average above 4 indicates processes are queuing for CPU.

🏏

Cricket analogy: top refreshing every few seconds is like a live scoreboard updating each ball; pressing P sorts batsmen by strike rate, M sorts by total runs, k retires a batsman, r adjusts a bowler's over allocation, 1 shows each pitch condition, and q returns to the pavilion; the load average is like the overs still queued over the last 1, 5, and 15 overs — too many queued overs on a 4-bowler attack means it's overloaded.

bash
# Launch top, sorted by memory by default
top -o %MEM

# Batch mode: one snapshot, useful for scripting/logging
top -b -n 1 | head -15

# Show only a specific user's processes
top -u www-data

# htop is usually a separate package (more readable, mouse support)
sudo apt install htop   # Debian/Ubuntu
sudo yum install htop   # RHEL/CentOS

The %CPU figure in both ps and top can legitimately exceed 100% on multi-core machines because it represents the sum of CPU time across all cores a process's threads are using — a process with 4 busy threads on a 4-core box can show close to 400%. Don't mistake this for a bug.

A process stuck in D state (uninterruptible sleep) cannot be killed with kill -9 — it is blocked inside a kernel operation, typically slow or failing disk/NFS I/O, and will only exit once that operation completes or times out. Repeated D-state processes are a strong signal of a storage subsystem problem, not an application bug.

  • ps aux (BSD style) and ps -ef (UNIX style) both list all system processes; combine with --sort or custom -eo columns for targeted views.
  • STAT codes matter: R=running, S=sleeping, D=uninterruptible I/O wait, Z=zombie, T=stopped.
  • %CPU can exceed 100% on multi-core systems since it sums usage across all threads/cores.
  • top is a live, interactive view; press P/M to sort by CPU/memory, k to kill, q to quit.
  • Load average (1/5/15 min) approximates demand for CPU time; compare it against the core count, not against 1.0.
  • htop is a friendlier, usually separately installed alternative to top with color and mouse support.

Practice what you learned

Was this page helpful?

Topics covered

#Bash#LinuxShellScriptingStudyNotes#DevOps#MonitoringProcessesWithPsAndTop#Monitoring#Processes#Top#Process#StudyNotes#SkillVeris

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse