Resource Usage Monitoring Guide

This guide will show you how to track CPU, memory, disk, and network usage** on your server using built-in commands and advanced tools.

💡 Why monitor resources? Monitoring helps you detect problems early, optimize performance, and plan for scaling.


Key Metrics to Monitor

Resource
Metric Example
Why It Matters

CPU

Load average, process utilization

Detect overload or runaway processes

Memory (RAM)

Used vs. free memory

Prevent crashes due to memory leaks

Disk

Space usage, IOPS, read/write speed

Avoid downtime from full disks

Network

Bandwidth, packet loss, latency

Identify bottlenecks or DDoS attacks


Step 1: Monitoring CPU Usage

Check Load Average

uptime

Output example:

16:22:07 up 10 days,  3:44,  2 users,  load average: 0.25, 0.40, 0.35
  • 1 minute, 5 minutes, 15 minutes average load

  • If load > CPU cores, server may be overloaded.

Real-Time CPU Monitoring

htop

Interactive tool showing per-core usage and top processes.

⚠️ Warning If your CPU usage is consistently above 80%, consider optimizing applications or upgrading resources.


Step 2: Monitoring Memory Usage

Check Memory Stats

Output:

Real-Time Memory Usage

Updates memory and swap usage every 2 seconds.


Step 3: Monitoring Disk Usage

Check Disk Space

Shows available and used space:

Find Large Directories

Lists directories by size in current path.

Disk I/O Monitoring

Displays read/write performance and bottlenecks.

💡 Tip Keep at least 20% disk space free to avoid fragmentation and performance issues.


Step 4: Monitoring Network Usage

Check Bandwidth in Real-Time

Shows incoming and outgoing traffic by IP.

Check Network Errors

Displays dropped packets and errors.

Advanced Monitoring

Visual interface showing bandwidth usage.


Step 5: Using Monitoring Tools

For ongoing monitoring, install tools for visibility:

Tool
Function

htop

CPU, memory usage in real time

iotop

Disk I/O usage

iftop

Bandwidth monitoring

glances

All-in-one resource monitor

fastnetmon

DDoS detection

Example install (Ubuntu/Debian):


Step 6: Advanced Monitoring with Prometheus + Grafana

For long-term tracking and visualization:

  1. Install Prometheus on your server.

  2. Use Node Exporter to collect metrics.

  3. Connect Prometheus to Grafana.

  4. Create dashboards for CPU, RAM, disk, and network usage.

🚀 Pro Tip Clouduxe offers preconfigured Grafana dashboards for real-time monitoring of your VPS.


Step 7: Setting Alerts

Monitoring is incomplete without alerts.

Use Prometheus Alertmanager or third-party tools (like UptimeRobot, PagerDuty) to notify you when thresholds are exceeded.

Example thresholds:

  • CPU > 90% for 5 minutes

  • Memory usage > 80%

  • Disk usage > 85%

  • Network packet loss > 5%


Troubleshooting High Resource Usage

Issue
Possible Solution

High CPU load

Check processes with top / htop

Memory leak

Restart service, optimize code

Disk usage at 100%

Delete logs, rotate backups

High network traffic

Check for DDoS, use firewall rules


Conclusion

Monitoring resource usage is a critical part of server management. By regularly checking CPU, memory, disk, and network utilization, you can:

  • Detect issues before they become critical

  • Optimize server performance

  • Plan scaling efficiently

  • Protect against attacks

Next Step Integrate monitoring into your Clouduxe VPS Hosting to get proactive alerts and insights.

Last updated

Was this helpful?