+
ractive
elasticsearch
solid
+
+
+
terraform
+
+
toml
+
+
clj
express
+
+
+
#
gradle
firebase
+
axum
+
+
angular
!!
>=
julia
+
+
+
aurelia
+
&&
+
+
+
+
graphql
+
+
vue
+
cobol
dns
istio
pascal
htmx
+
vault
+
+
dynamo
+
...
+
eslint
webpack
spacy
+
esbuild
+
!=
clion
+
mysql
+
+
bbedit
scheme
+
node
istio
+
0b
django
+
+
+
vercel
clion
+
rocket
haskell
+
ฮป
qdrant
vb
Back to Blog
๐Ÿ“Š System Resource Monitoring with top and htop in AlmaLinux: Beginner's Guide
AlmaLinux Monitoring System Resources

๐Ÿ“Š System Resource Monitoring with top and htop in AlmaLinux: Beginner's Guide

Published Aug 20, 2025

Learn how to monitor CPU, memory, and processes in AlmaLinux using top and htop. Simple guide with colorful visuals, keyboard shortcuts, and practical examples for system monitoring.

8 min read
0 views
Table of Contents

๐Ÿ“Š System Resource Monitoring with top and htop in AlmaLinux: Beginnerโ€™s Guide

Is your AlmaLinux system running slow? Want to see whatโ€™s using all your CPU or memory? ๐Ÿค” Letโ€™s learn how to monitor your system like a pro using top and htop! These tools show you everything happening in your computer in real-time. Itโ€™s like having X-ray vision for your system! ๐Ÿ‘๏ธโœจ

๐Ÿค” Why is System Monitoring Important?

Keeping an eye on your system helps you catch problems before they get serious! Hereโ€™s why monitoring rocks:

  • ๐Ÿš€ Find Slow Programs - See whatโ€™s making your system sluggish
  • ๐Ÿ’พ Memory Management - Know when youโ€™re running out of RAM
  • ๐Ÿ”ฅ CPU Usage - Identify programs hogging your processor
  • ๐Ÿ› Catch Problems Early - Spot issues before crashes
  • ๐Ÿ“ˆ Performance Tuning - Make your system run faster
  • ๐Ÿ›ก๏ธ Security - Detect suspicious processes

๐ŸŽฏ What You Need

Before we start monitoring, make sure you have:

  • โœ… AlmaLinux system running
  • โœ… Terminal access
  • โœ… Basic command line skills
  • โœ… 5 minutes to learn
  • โœ… Curiosity about your system!

๐Ÿ“ Step 1: Using the top Command

top is installed by default and shows live system info! ๐Ÿ“บ

Start top

# Simply type:
top

# Or with options:
top -u username    # Show only one user's processes
top -p 1234        # Monitor specific process ID

Example output:

top - 14:30:25 up 5 days, 3:15, 2 users, load average: 0.15, 0.20, 0.18
Tasks: 125 total, 1 running, 124 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.5 us, 1.0 sy, 0.0 ni, 96.5 id, 0.0 wa, 0.0 hi, 0.0 si
MiB Mem: 7821.0 total, 2145.3 free, 3421.7 used, 2254.0 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used, 3987.2 avail Mem

PID USER    PR  NI   VIRT   RES   SHR S  %CPU  %MEM    TIME+ COMMAND
1234 john   20   0  512000 45236  8920 S   5.3   0.6  12:34.56 firefox
5678 root   20   0  225544 11240  7832 S   2.0   0.1   1:23.45 systemd

What this shows: ๐Ÿ“–

  • load average = System load (lower is better)
  • %Cpu(s) = CPU usage breakdown
  • MiB Mem = Memory usage
  • PID = Process ID number
  • %CPU = CPU usage per process
  • %MEM = Memory usage per process

Keyboard Shortcuts in top

# While top is running, press:
h     # Help menu
q     # Quit top
k     # Kill a process
r     # Renice (change priority)
M     # Sort by memory usage
P     # Sort by CPU usage
1     # Show individual CPU cores
c     # Show full command paths

๐Ÿ”ง Step 2: Installing and Using htop

htop is like top but prettier and easier! ๐ŸŒˆ

Install htop

# Install htop
sudo dnf install -y htop

# Verify installation
htop --version

Start htop

# Just type:
htop

# Or with options:
htop -u username   # Show specific user
htop -t            # Tree view (shows parent/child)

Pro tip: ๐Ÿ’ก htop uses colors! Green = normal, red = kernel, blue = low priority

๐ŸŒŸ Step 3: Understanding the Display

Letโ€™s decode what youโ€™re seeing! ๐Ÿ”

CPU Meters

# In htop, CPU bars show:
[||||||||  ] 80%   # Green = user processes
[||        ] 20%   # Red = system/kernel
[|         ] 10%   # Blue = low priority

# Multiple cores shown as:
1 [||||      ] 40%
2 [||||||||||] 100%  # This core is maxed out!
3 [||        ] 20%
4 [|||       ] 30%

Memory Bar

# Memory display:
Mem[|||||||||||||     ] 4.2G/8.0G   # Green = used
Swp[                  ] 0K/2.00G     # Yellow = cache

Process List

# Columns explained:
PID    # Process ID (unique number)
USER   # Who owns the process
PRI    # Priority (lower = higher priority)
NI     # Nice value (process politeness)
VIRT   # Virtual memory size
RES    # Physical RAM used
SHR    # Shared memory
S      # State (S=sleeping, R=running)
CPU%   # CPU usage percentage
MEM%   # Memory usage percentage
TIME+  # Total CPU time used
Command # What's running

โœ… Step 4: Common Monitoring Tasks

Letโ€™s do some real monitoring! ๐ŸŽฏ

Find Memory Hogs

# In htop, press:
F6    # Sort menu
โ†“     # Arrow down to MEM%
Enter # Sort by memory

# Or in top:
M     # Sort by memory instantly

Kill Problematic Process

# In htop:
# 1. Arrow keys to select process
# 2. Press F9 for kill menu
# 3. Choose signal (usually 15 SIGTERM)
# 4. Press Enter

# In top:
k          # Press k
[PID]      # Enter process ID
[signal]   # Press Enter for default (15)

Monitor Specific Program

# Watch Firefox only:
top -p $(pgrep firefox)

# Or in htop:
F4         # Filter
firefox    # Type program name
Enter      # Apply filter

๐ŸŽฎ Quick Examples

Example 1: Check Whatโ€™s Slowing You Down ๐ŸŒ

# Start htop
htop

# Press F6 (Sort)
# Select CPU%
# Press Enter

# Now you see the CPU hogs at the top!
# If something uses 100% CPU constantly, that's your problem!

Example 2: Monitor During Heavy Task ๐Ÿ’ช

# Open two terminals

# Terminal 1: Start monitoring
htop

# Terminal 2: Run heavy task
tar -czf backup.tar.gz /large/directory

# Watch htop to see:
# - CPU spike during compression
# - Memory usage increase
# - Disk I/O activity

Example 3: Create Monitoring Script ๐Ÿ“œ

# Create monitor.sh
nano ~/monitor.sh

#!/bin/bash
echo "=== System Health Check ==="
echo "Date: $(date)"
echo ""
echo "Memory Usage:"
free -h
echo ""
echo "CPU Load:"
uptime
echo ""
echo "Top 5 CPU processes:"
ps aux | sort -rk 3,3 | head -6
echo ""
echo "Top 5 Memory processes:"
ps aux | sort -rk 4,4 | head -6

# Make executable
chmod +x ~/monitor.sh

# Run it
./monitor.sh

๐Ÿšจ Fix Common Problems

Problem 1: System very slow โŒ

Symptoms:

  • Everything takes forever
  • Mouse barely moves
  • Canโ€™t open programs

Try this:

# Quick check in terminal
top -b -n 1 | head -20

# Look for:
# - Load average > number of CPUs
# - CPU% near 100%
# - Memory full

# Emergency fix:
killall firefox   # Or whatever's using most resources

Problem 2: Canโ€™t see all processes โŒ

Try this:

# Run as root to see everything
sudo htop

# In top, toggle views:
V     # Forest view (tree)
H     # Show threads
u     # Filter by user

Problem 3: Numbers changing too fast โŒ

Slow down the refresh:

# In top:
d     # Change delay
3     # Enter 3 seconds
Enter # Apply

# Start htop with slower refresh:
htop -d 30   # Update every 3 seconds

๐Ÿ“‹ Simple Commands Summary

TaskCommand
๐Ÿ‘€ Start toptop
๐ŸŒˆ Start htophtop
๐Ÿ”„ RefreshSpace (in htop)
๐Ÿ’พ Sort by memoryM (top) or F6 (htop)
๐Ÿ”ฅ Sort by CPUP (top) or F6 (htop)
โŒ Kill processk (top) or F9 (htop)
๐Ÿ” SearchF3 (htop)
๐Ÿšช Quitq (both)

๐Ÿ’ก Tips for Success

  1. Check Regularly ๐Ÿ“… - Monitor weekly to know whatโ€™s normal
  2. Learn Your Baseline ๐Ÿ“Š - Know your systemโ€™s usual numbers
  3. Donโ€™t Panic ๐Ÿ˜Œ - High CPU/memory isnโ€™t always bad
  4. Use Colors ๐ŸŽจ - htopโ€™s colors make things clearer
  5. Take Screenshots ๐Ÿ“ธ - Save output when debugging

๐Ÿ† What You Learned

Youโ€™re now a monitoring master! You can:

  • โœ… Use top to monitor system resources
  • โœ… Navigate htopโ€™s colorful interface
  • โœ… Find resource-hungry processes
  • โœ… Kill problematic programs safely
  • โœ… Sort and filter process lists
  • โœ… Understand CPU and memory usage

๐ŸŽฏ Why This Matters

Now you can:

  • ๐Ÿš€ Keep your system running smoothly
  • ๐Ÿ” Diagnose performance problems quickly
  • ๐Ÿ’พ Manage memory usage effectively
  • ๐Ÿ›ก๏ธ Spot suspicious activity
  • ๐Ÿ“ˆ Optimize system performance
  • ๐Ÿ› Debug issues like a pro

Remember: Regular monitoring prevents big problems! Check your system weekly and youโ€™ll catch issues early! โญ

Happy monitoring! Your AlmaLinux system is now under your watchful eye! ๐Ÿ‘๏ธ๐ŸŽ‰