← All guides

uptime Command & Load Average on Linux: Check and Monitor

Updated:

Monitor System Uptime and Load Average

Set up continuous monitoring to track how long your Linux server has been running and monitor system uptime and load average. Detect server stability issues, track performance trends over time, and receive alerts when uptime resets or load exceeds thresholds.

Why Monitoring System Uptime and Load Average Matters

System uptime indicates how long your server has been running without reboots, which reflects server stability and reliability. Load average shows the average system load over 1, 5, and 15 minutes, indicating CPU and I/O pressure. Regular monitoring of uptime and load average helps you track server stability, detect performance problems early, monitor system load trends, and plan maintenance windows to prevent unexpected downtime.

Method 1: Check System Uptime with uptime Command

The uptime command is the simplest way to check system uptime and load average.

Basic Uptime Check

To see system uptime and load average:

# Check uptime and load average
uptime

This displays:

  • Current time
  • System uptime (days, hours, minutes)
  • Number of logged-in users
  • Load averages (1 minute, 5 minutes, 15 minutes)

Extract Uptime Only

To get just the uptime:

# Extract uptime
uptime -p

# Alternative method
uptime | awk '{print $3,$4}' | sed 's/,//'

This provides just the uptime duration.

Extract Load Average Only

To get just the load average:

# Extract 1-minute load average
uptime | awk -F'load average:' '{print $2}' | awk '{print $1}' | sed 's/,//'

# Extract 5-minute load average
uptime | awk -F'load average:' '{print $2}' | awk '{print $2}' | sed 's/,//'

# Extract 15-minute load average
uptime | awk -F'load average:' '{print $2}' | awk '{print $3}'

This helps extract specific load average values for monitoring scripts.

Method 2: Check Uptime with /proc/uptime

The /proc/uptime file contains uptime information in seconds.

Read Uptime from /proc

# Read uptime in seconds
cat /proc/uptime

# Convert to human-readable format
awk '{print int($1/86400)" days "int(($1%86400)/3600)" hours "int(($1%3600)/60)" minutes"}' /proc/uptime

This provides precise uptime in seconds, useful for calculations.

Method 3: Check Load Average with /proc/loadavg

The /proc/loadavg file contains load average information.

Read Load Average from /proc

# Read load average
cat /proc/loadavg

# Extract specific values
cat /proc/loadavg | awk '{print $1}'  # 1-minute load
cat /proc/loadavg | awk '{print $2}'  # 5-minute load
cat /proc/loadavg | awk '{print $3}'  # 15-minute load

This provides load average values directly from the kernel.

Method 4: Automated Uptime and Load Monitoring with Zuzia.app

Checking by hand tells you the state right now. Zuzia checks from outside, around the clock, with nothing installed on the server.

How it works in Zuzia

  • Add a URL, a TCP port or a DNS record with the value you expect. The first check runs within about 30 seconds.
  • Websites can be checked as often as once a minute, from agents in Poland, New York and Singapore. Zuzia records the HTTP status code and response time of every check.
  • Zuzia warns you 14, 7 and 3 days before an SSL certificate expires, and does the same for the domain registration.
  • Alerts go by email, Slack, Discord, push (through your Pushover account) or SMS (through your Vonage account). A public status page or an embeddable widget shows your client the same uptime you see.

Setting it up

  1. In the Zuzia dashboard, add the URL, port or DNS record.
  2. Choose the check interval and your notification channels.
  3. Optionally create a status page or a widget for the client.

For the checks in this guide that run on the server itself, install the Zuzia agent and save those commands as a scheduled task.

Method 5: Advanced Uptime and Load Monitoring Techniques

Calculate Load Average Percentage

Calculate load average as percentage of CPU cores:

# Get CPU core count
CPU_CORES=$(nproc)

# Get 1-minute load average
LOAD_1MIN=$(uptime | awk -F'load average:' '{print $2}' | awk '{print $1}' | sed 's/,//')

# Calculate percentage
LOAD_PERCENT=$(echo "scale=2; ($LOAD_1MIN / $CPU_CORES) * 100" | bc)
echo "Load average: ${LOAD_PERCENT}% of CPU capacity"

This helps understand load relative to system capacity.

Compare Load Averages

Compare different load average timeframes:

# Extract all load averages
uptime | awk -F'load average:' '{print $2}' | awk '{print "1-min:", $1, "5-min:", $2, "15-min:", $3}'

Understanding load trends helps identify if load is increasing or decreasing.

Monitor Uptime Trends

Track server uptime to identify stability patterns:

# Current uptime
uptime -p

# Track uptime over time
echo "$(date): $(uptime -p)"

Use Zuzia.app's historical data to track uptime trends and identify servers that reboot frequently.

Real-World Use Cases for Uptime and Load Monitoring

Server Stability Tracking

Monitor uptime to track server stability:

# Check uptime
uptime -p

# Alert if uptime is low (recent reboot)
UPTIME_SECONDS=$(awk '{print int($1)}' /proc/uptime)
if [ $UPTIME_SECONDS -lt 86400 ]; then
  echo "ALERT: Server rebooted in last 24 hours"
fi

Set up Zuzia.app to check uptime daily and alert if servers reboot unexpectedly.

Performance Issue Detection

Monitor load average to detect performance issues:

# Check load average
LOAD=$(uptime | awk -F'load average:' '{print $2}' | awk '{print $1}' | sed 's/,//')
CPU_CORES=$(nproc)

# Alert if load exceeds CPU cores
if (( $(echo "$LOAD > $CPU_CORES" | bc -l) )); then
  echo "ALERT: Load average exceeds CPU cores"
fi

Set up Zuzia.app to check load average every 15 minutes and alert when thresholds are exceeded.

Capacity Planning

Use historical load data to plan capacity:

# Track peak load
uptime | awk -F'load average:' '{print $2}' | awk '{print $3}' > /tmp/load-15min.txt

Zuzia.app's historical data helps you understand peak load requirements and plan server capacity accordingly.

Best Practices for Uptime and Load Monitoring

1. Monitor Regularly

Check uptime and load average at least every 15-30 minutes for active monitoring. Less critical systems can be checked every hour. Use Zuzia.app automated monitoring to ensure regular checks.

2. Set Appropriate Load Thresholds

Set different alert thresholds based on CPU cores:

  • Warning: Load > number of CPU cores
  • Critical: Load > 2x number of CPU cores
  • Emergency: Load > 3x number of CPU cores

3. Track Load Trends

Use Zuzia.app's historical data to track load trends over time. Understanding when load peaks helps plan capacity and optimize performance.

4. Monitor Uptime for Stability

Track server uptime to identify servers that reboot frequently. Frequent reboots may indicate hardware issues or configuration problems.

5. Correlate Load with Other Metrics

Monitor load average alongside CPU usage, memory usage, and I/O to get a complete picture of system performance.

Troubleshooting Common Uptime and Load Issues

High Load Average

If load average is high:

  1. Check CPU usage: top or htop
  2. Identify CPU-intensive processes: ps aux --sort=-%cpu | head -n 10
  3. Check I/O wait: iostat -x 1 5
  4. Review system logs: journalctl -p err -n 50

Low Uptime (Frequent Reboots)

If servers reboot frequently:

  1. Check system logs: journalctl -b -1 (previous boot)
  2. Review hardware logs: dmesg | grep -i error
  3. Check for kernel panics: journalctl -k
  4. Investigate hardware issues

Load Average Not Decreasing

If load average stays high:

  1. Identify stuck processes: ps aux | grep -v grep
  2. Check for zombie processes: ps aux | grep defunct
  3. Review I/O bottlenecks: iostat -x
  4. Consider system optimization or capacity upgrade

FAQ: Common Questions About Monitoring System Uptime and Load Average

How often should I check system uptime and load average?

We recommend checking uptime and load average every 15-30 minutes for active monitoring. Use Zuzia.app automated monitoring to check continuously without manual intervention. Less critical systems can be checked every hour.

What does load average mean on Linux?

Load average shows the average system load over 1, 5, and 15 minutes. It represents the average number of processes that are either running or waiting for CPU or I/O. A load average above the number of CPU cores indicates the system is overloaded.

What should I do if load average exceeds CPU cores?

If load average exceeds CPU cores, investigate: identify CPU-intensive processes, check for I/O bottlenecks, review system logs for errors, and consider optimizing processes or upgrading capacity. Use Zuzia.app to monitor load and receive alerts when thresholds are exceeded.

How can I see uptime and load trends over time?

Zuzia.app stores all uptime and load data historically in its database, allowing you to view trends over time. You can see historical data showing uptime and load averages on different dates, identify when load peaks occur, and track server stability trends.

What's a good load average for my server?

A good load average depends on your CPU cores. Generally, load average should be below the number of CPU cores for optimal performance. For example, on a 4-core server, load average below 4.0 is good, while above 4.0 indicates overload.

Can I monitor uptime and load across multiple Linux servers?

Yes, Zuzia.app allows you to add multiple servers and monitor uptime and load average across all of them simultaneously. Each server executes monitoring commands independently, and all results are stored in Zuzia.app's database for centralized monitoring and comparison.

Does Zuzia.app use AI to analyze uptime and load patterns?

On paid plans, AI can read the output of your scheduled tasks and commands, explain it in plain language and alert you only when it spots a problem. Metric alerts work without AI: Zuzia alerts when CPU, RAM or load drifts from the server's normal and forecasts when a disk will fill up.

We use cookies to ensure the proper functioning of our website.