numpy
sublime
htmx
=
+
crystal
pnpm
hapi
--
+
bbedit
toml
+
+
+
+
+
apex
couchdb
netlify
+
+
vb
+
+
+
+
+
soap
+
+
+
strapi
postgres
f#
+
marko
unix
oauth
+
+
+
+
!==
echo
rs
istio
+
git
+
+
rider
โ‰ 
eclipse
play
+
+
istio
rollup
esbuild
+=
mocha
tls
gcp
+
ios
+
chef
react
+
clj
puppet
+
+
+
+
+
>=
redhat
+
โˆช
+
+
+
+
flask
laravel
+
+
termux
Back to Blog
๐Ÿ“Š AlmaLinux System Performance Monitoring Guide
almalinux monitoring performance

๐Ÿ“Š AlmaLinux System Performance Monitoring Guide

Published Sep 14, 2025

Master system performance monitoring on AlmaLinux! Complete guide to monitor CPU, memory, disk, and network. Perfect for system administrators and DevOps engineers.

18 min read
0 views
Table of Contents

๐Ÿ“Š AlmaLinux System Performance Monitoring Guide

Want to keep your AlmaLinux servers running like Formula 1 race cars? ๐ŸŽ๏ธ System performance monitoring is your secret weapon! In this comprehensive guide, weโ€™ll teach you how to watch, measure, and optimize every aspect of your serverโ€™s performance. From CPU usage to network traffic, youโ€™ll become a monitoring master! ๐ŸŽฏ

๐Ÿค” Why is Performance Monitoring Important?

System monitoring is like having a health checkup for your servers! ๐Ÿฅ Hereโ€™s why smart administrators monitor everything:

  • โšก Prevent Crashes: Catch problems before they bring down your system
  • ๐Ÿ” Find Bottlenecks: Identify whatโ€™s slowing down your applications
  • ๐Ÿ’ฐ Save Money: Optimize resources to reduce server costs
  • ๐Ÿ“ˆ Plan Growth: Know when to upgrade hardware or scale up
  • ๐Ÿ›ก๏ธ Security Alerts: Detect unusual activity that might indicate attacks
  • ๐Ÿ˜Š Happy Users: Keep applications fast and responsive
  • ๐ŸŽฏ Proactive Management: Fix issues before users complain
  • ๐Ÿ“Š Data-Driven Decisions: Make choices based on real metrics

Think of monitoring as your systemโ€™s dashboard - you wouldnโ€™t drive without one! ๐Ÿš—

๐ŸŽฏ What You Need

Letโ€™s make sure youโ€™re ready to become a monitoring expert! โœ…

  • โœ… AlmaLinux 8 or 9 server (physical or virtual)
  • โœ… Root or sudo access to install monitoring tools
  • โœ… Basic understanding of Linux command line
  • โœ… At least 1GB free disk space for monitoring data
  • โœ… Network access to install packages
  • โœ… Text editor skills (weโ€™ll use nano and vim)
  • โœ… 20 minutes of focus time
  • โœ… Coffee or tea to stay alert! โ˜•

Donโ€™t worry if youโ€™re new to monitoring - weโ€™ll start from the basics! ๐ŸŒŸ

๐Ÿ“ Step 1: Install Essential Monitoring Tools

First, letโ€™s install the core monitoring tools that every administrator needs! ๐ŸŽฏ

# Update your system first
sudo dnf update -y

# Install essential monitoring and system tools
sudo dnf install -y htop iotop nethogs ncdu sysstat

# Install additional performance tools
sudo dnf install -y glances nmon atop dstat

# Install network monitoring tools
sudo dnf install -y iftop bmon tcpdump nmap

# Verify installations
htop --version && iotop --version

Excellent! ๐ŸŽ‰ You now have a complete monitoring toolkit!

๐Ÿ”ง Step 2: Monitor CPU Performance

Letโ€™s start with CPU monitoring - the brain of your server! ๐Ÿง 

Real-Time CPU Monitoring

# Monitor CPU usage with htop (most popular tool)
htop

# Use top for basic CPU monitoring
top

# Monitor CPU with glances (comprehensive overview)
glances

# Check current CPU usage quickly
grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$3+$4+$5)} END {print usage "%"}'

CPU Performance Analysis

# Check CPU information and cores
lscpu

# Monitor CPU usage per process
ps aux --sort=-%cpu | head -10

# Check CPU load averages
uptime

# Advanced CPU monitoring with sar
sar -u 1 5  # CPU usage every 1 second for 5 times

Understanding CPU Metrics:

  • Load Average: Should be below number of CPU cores
  • CPU %: High values (>80%) indicate bottlenecks
  • Wait Time: High I/O wait suggests disk issues

๐ŸŒŸ Step 3: Monitor Memory Usage

Memory monitoring prevents the dreaded โ€œout of memoryโ€ crashes! ๐Ÿ’พ

Real-Time Memory Monitoring

# Check memory usage with free command
free -h

# Monitor memory with htop (visual interface)
htop

# Detailed memory information
cat /proc/meminfo

# Check memory usage by process
ps aux --sort=-%mem | head -10

Advanced Memory Analysis

# Monitor memory continuously
watch -n 2 'free -h'

# Check swap usage
swapon --show

# Analyze memory usage with sar
sar -r 1 5  # Memory statistics every 1 second

# Check for memory leaks
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head -20

Memory Health Indicators:

  • Available Memory: Should be >10% of total
  • Swap Usage: High swap usage indicates memory pressure
  • Buffer/Cache: Normal to see high usage here

โœ… Step 4: Monitor Disk Performance

Disk bottlenecks are performance killers! Letโ€™s monitor storage effectively. ๐Ÿ’ฟ

Disk Usage Monitoring

# Check disk space usage
df -h

# Find large files and directories
du -sh /* | sort -hr

# Use ncdu for interactive disk usage
ncdu /

# Monitor disk I/O in real-time
iotop

# Check disk I/O statistics
iostat -x 1 5

Advanced Disk Monitoring

# Monitor specific directory sizes
watch -n 5 'du -sh /var/log /tmp /home'

# Check disk read/write speeds
dd if=/dev/zero of=/tmp/testfile bs=1G count=1 oflag=direct
dd if=/tmp/testfile of=/dev/null bs=1G count=1 iflag=direct

# Monitor disk usage by process
lsof | grep -E "(deleted|tmp)" | wc -l

# Check disk health
sudo smartctl -a /dev/sda  # Requires smartmontools

Disk Performance Tips:

  • >90% Full: Critical - clean up immediately
  • High I/O Wait: Consider SSD upgrade
  • Many Small Files: Can slow down performance

๐Ÿ”ง Step 5: Monitor Network Performance

Network monitoring keeps your connections fast and reliable! ๐ŸŒ

Network Traffic Monitoring

# Monitor network traffic by process
nethogs

# Monitor network interfaces
iftop

# Beautiful network monitoring
bmon

# Check network connections
netstat -tuln

# Monitor network statistics
sar -n DEV 1 5

Network Troubleshooting

# Test network speed to specific server
curl -o /dev/null -s -w '%{speed_download}\n' http://speedtest.com/test.zip

# Check open ports and connections
ss -tuln

# Monitor DNS resolution times
dig google.com

# Check network latency
ping -c 5 8.8.8.8

# Advanced network analysis
tcpdump -i eth0 -n | head -20

Network Health Metrics:

  • Bandwidth Usage: Monitor against your limits
  • Latency: <50ms is excellent, >200ms needs investigation
  • Packet Loss: Should be 0% under normal conditions

๐ŸŒŸ Step 6: Set Up System Monitoring with SAR

SAR (System Activity Reporter) provides historical performance data! ๐Ÿ“ˆ

Configure SAR Data Collection

# Enable SAR data collection
sudo systemctl enable sysstat
sudo systemctl start sysstat

# Configure collection interval (every 2 minutes)
sudo nano /etc/cron.d/sysstat

# Add this line for more frequent collection:
*/2 * * * * root /usr/lib64/sa/sa1 1 1

# Restart cron to apply changes
sudo systemctl restart crond

Using SAR for Performance Analysis

# View today's CPU usage
sar -u

# Check memory usage for specific time
sar -r -s 14:00:00 -e 16:00:00

# Network statistics
sar -n DEV

# Disk I/O performance
sar -d

# Generate daily performance report
sar -A > /tmp/performance-report-$(date +%Y%m%d).txt

โœ… Step 7: Create Custom Monitoring Scripts

Letโ€™s create automated monitoring scripts! ๐Ÿค–

System Health Check Script

# Create monitoring script
sudo nano /usr/local/bin/system-health.sh

# Add this content:
#!/bin/bash

echo "๐Ÿ” System Health Report - $(date)"
echo "=================================="

# CPU Load
echo "๐Ÿ“Š CPU Load Average:"
uptime | awk '{print $10 $11 $12}'

# Memory Usage
echo "๐Ÿ’พ Memory Usage:"
free -h | grep Mem | awk '{print "Used: " $3 " / " $2 " (" $3/$2*100 "%)"}'

# Disk Usage
echo "๐Ÿ’ฟ Disk Usage:"
df -h | grep -E "(/$|/home|/var)" | awk '{print $6 ": " $5 " used"}'

# Network Connections
echo "๐ŸŒ Network Connections:"
ss -tuln | wc -l | awk '{print $1 " active connections"}'

echo "โœ… Health check completed!"

# Make script executable
sudo chmod +x /usr/local/bin/system-health.sh

# Run the health check
/usr/local/bin/system-health.sh

Performance Alert Script

# Create alert script
sudo nano /usr/local/bin/performance-alerts.sh

# Add this content:
#!/bin/bash

# Set thresholds
CPU_THRESHOLD=80
MEMORY_THRESHOLD=85
DISK_THRESHOLD=90

# Check CPU usage
CPU_USAGE=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$3+$4+$5)} END {print int(usage)}')

# Check memory usage
MEMORY_USAGE=$(free | grep Mem | awk '{print int($3/$2 * 100)}')

# Check disk usage
DISK_USAGE=$(df / | tail -1 | awk '{print int($5)}' | sed 's/%//')

# Send alerts
if [ $CPU_USAGE -gt $CPU_THRESHOLD ]; then
    echo "๐Ÿšจ ALERT: CPU usage is ${CPU_USAGE}% (threshold: ${CPU_THRESHOLD}%)"
fi

if [ $MEMORY_USAGE -gt $MEMORY_THRESHOLD ]; then
    echo "๐Ÿšจ ALERT: Memory usage is ${MEMORY_USAGE}% (threshold: ${MEMORY_THRESHOLD}%)"
fi

if [ $DISK_USAGE -gt $DISK_THRESHOLD ]; then
    echo "๐Ÿšจ ALERT: Disk usage is ${DISK_USAGE}% (threshold: ${DISK_THRESHOLD}%)"
fi

# Make executable and test
sudo chmod +x /usr/local/bin/performance-alerts.sh
/usr/local/bin/performance-alerts.sh

๐ŸŽฎ Quick Examples

Letโ€™s practice with real monitoring scenarios! ๐ŸŽฏ

Example 1: Find Resource-Hungry Processes

# Find top CPU consumers
echo "๐Ÿ”ฅ Top CPU Users:"
ps aux --sort=-%cpu | head -5

# Find top memory consumers
echo "๐Ÿ’พ Top Memory Users:"
ps aux --sort=-%mem | head -5

# Find processes using most disk I/O
echo "๐Ÿ’ฟ Top Disk I/O:"
iotop -a -o -d 1 -n 3

Example 2: Network Troubleshooting

# Check which processes use network
echo "๐ŸŒ Network Activity:"
nethogs -d 5

# Find heaviest network users
ss -tuln | head -10

# Test connection speeds
echo "โšก Connection Test:"
curl -o /dev/null -s -w 'Download: %{speed_download} bytes/sec\n' http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/setup-2.12.2-6.el8.noarch.rpm

Example 3: Complete System Overview

# One-command system overview
echo "๐Ÿ“Š Complete System Status"
echo "========================"
echo "CPU: $(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$3+$4+$5)} END {print int(usage)}')% | Memory: $(free | grep Mem | awk '{print int($3/$2 * 100)}')% | Disk: $(df / | tail -1 | awk '{print $5}') | Load: $(uptime | awk '{print $10}')"

# Visual system monitoring
glances --time 2

๐Ÿšจ Fix Common Problems

Monitoring issues? Letโ€™s troubleshoot together! ๐Ÿ”ง

Problem 1: High CPU Usage

Symptoms: System feels slow, high load averages

Solution:

# Find CPU-hungry processes
top -c

# Kill problematic processes
sudo kill -15 PID_NUMBER  # Replace with actual PID

# Check for runaway scripts
ps aux | grep -E "(bash|python|perl)" | head -10

# Restart services if needed
sudo systemctl restart httpd  # Example service

Problem 2: Memory Exhaustion

Symptoms: โ€œOut of memoryโ€ errors, system freezing

Solution:

# Find memory leaks
ps aux --sort=-%mem | head -10

# Clear system caches (safe operation)
sudo sync && sudo sysctl vm.drop_caches=3

# Add swap space if needed
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Problem 3: Disk Space Issues

Symptoms: โ€œNo space left on deviceโ€ errors

Solution:

# Find large files quickly
find / -type f -size +100M 2>/dev/null | head -10

# Clean up log files
sudo journalctl --vacuum-time=7d
sudo find /var/log -name "*.log" -type f -mtime +30 -delete

# Remove old package caches
sudo dnf clean all

Problem 4: Network Performance Issues

Symptoms: Slow connections, timeouts

Solution:

# Check network interface status
ip link show

# Test DNS resolution
nslookup google.com

# Check for network conflicts
netstat -rn

# Restart networking if needed
sudo systemctl restart NetworkManager

๐Ÿ“‹ Simple Commands Summary

Your monitoring command cheat sheet! ๐Ÿ“š

TaskCommandPurpose
CPU MonitoringhtopInteractive CPU/memory monitor
Memory Checkfree -hDisplay memory usage
Disk Usagedf -hShow disk space usage
Disk I/OiotopMonitor disk input/output
Network TrafficnethogsMonitor network by process
System OverviewglancesComprehensive system monitor
Process Listps auxList all running processes
Load AverageuptimeShow system load
Network Connectionsss -tulnShow active connections
Find Large Filesncdu /Interactive disk usage analyzer

๐Ÿ’ก Tips for Success

Master monitoring with these expert tips! ๐ŸŒŸ

  • ๐Ÿ“Š Baseline First: Establish normal performance metrics
  • โฐ Monitor Regularly: Check systems daily, not just when problems occur
  • ๐ŸŽฏ Set Thresholds: Define what โ€œnormalโ€ vs โ€œproblematicโ€ looks like
  • ๐Ÿ“ˆ Track Trends: Look for gradual changes over time
  • ๐Ÿ”” Automate Alerts: Set up notifications for critical issues
  • ๐Ÿ“ Document Patterns: Keep notes about recurring issues
  • ๐ŸŽฎ Practice Scenarios: Simulate problems to test your response
  • ๐Ÿค Team Communication: Share monitoring responsibilities
  • ๐Ÿ”„ Regular Reviews: Weekly performance review meetings
  • ๐Ÿ›ก๏ธ Proactive Approach: Fix small issues before they become big ones

๐Ÿ† What You Learned

Amazing progress! Look at your new monitoring superpowers! ๐ŸŽ‰

  • โœ… Installed monitoring tools for comprehensive system oversight
  • โœ… Mastered CPU monitoring to prevent performance bottlenecks
  • โœ… Learned memory management to avoid crashes and slowdowns
  • โœ… Configured disk monitoring to prevent storage disasters
  • โœ… Set up network monitoring for connectivity troubleshooting
  • โœ… Created automated scripts for proactive system health checks
  • โœ… Implemented alert systems to catch problems early
  • โœ… Learned troubleshooting techniques for common issues
  • โœ… Built monitoring workflows that save time and prevent disasters
  • โœ… Gained DevOps skills that are highly valued in the industry

Youโ€™re now a system monitoring expert! ๐ŸŒŸ

๐ŸŽฏ Why This Matters

Your monitoring expertise creates real value! ๐Ÿš€

For Your Career:

  • ๐Ÿ’ผ System administrators with monitoring skills earn 30% more
  • ๐ŸŽฏ DevOps roles require strong monitoring knowledge
  • ๐ŸŒŸ Monitoring skills lead to senior infrastructure positions
  • ๐Ÿค You become the go-to person for performance issues

For Your Organization:

  • โšก Prevent 99% of system outages before they happen
  • ๐Ÿ’ฐ Save thousands in downtime costs
  • ๐Ÿ“Š Make data-driven infrastructure decisions
  • ๐Ÿ˜Š Keep users happy with fast, reliable systems

For Your Projects:

  • ๐Ÿ›ก๏ธ Build confidence in your infrastructure
  • ๐Ÿ” Quickly identify and resolve performance issues
  • ๐Ÿ“ˆ Scale systems based on real usage data
  • ๐ŸŽฏ Optimize costs by rightsizing resources

Real-World Impact:

  • ๐Ÿฅ Healthcare systems stay online during critical moments
  • ๐Ÿ›’ E-commerce sites handle traffic spikes smoothly
  • ๐ŸŽฎ Gaming platforms provide lag-free experiences
  • ๐Ÿข Business applications run reliably 24/7

Youโ€™ve just learned skills that keep the digital world running! ๐Ÿ†

Remember, monitoring isnโ€™t just about watching numbers - itโ€™s about understanding your systems deeply and caring for them like a gardener tends their plants. With great monitoring comes great peace of mind! Keep practicing, keep learning, and soon youโ€™ll predict problems before they even think about happening! โญ

Happy monitoring! ๐Ÿ™Œ