bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/Bash/System Monitoring
Bash•System Monitoring

Bash uptime Command - System Runtime

Using the uptime Command

The uptime command is used to find out how long the system has been running.

It provides a quick overview of the system's performance, including: The current time How long the system has been up The number of users logged in The system load averages for the past 1, 5, and 15 minutes

  • The current time
  • How long the system has been up
  • The number of users logged in
  • The system load averages for the past 1, 5, and 15 minutes

Syntax

The basic syntax of the uptime command is:

uptime

This command displays information like the current time, uptime duration, number of users, and load averages.

Understanding the Output

The output of the uptime command shows information like:

  • Current Time: The time at which the command was run.
  • Uptime Duration: How long the system has been running since the last reboot.
  • Number of Users: The number of users currently logged into the system.
  • Load Averages: The system load averages for the past 1, 5, and 15 minutes.

Example Output

Here's an example of the uptime command output:

Example: Understanding Uptime Output

uptime
 14:36:01 up 10 days, 3:45, 4 users, load average: 0.75, 0.60, 0.50

In this example

  • The current time is 14:36:01 .
  • The system has been up for 10 days, 3 hours, and 45 minutes .
  • There are 4 users currently logged in.
  • The load averages are 0.75, 0.60, and 0.50 , indicating the system load over the last 1, 5, and 15 minutes.

Interpreting Load Averages

The load averages provide a snapshot of the system's workload:

  • A lower load average indicates a less busy system.
  • A higher load average suggests the system is busier.
  • Load averages above 1.0 per core may indicate the system is overloaded.

Example: Interpreting Load Averages

load average: 0.75, 0.60, 0.50

In this example, the system load is decreasing over time, indicating that the system is becoming less busy.

Common Uses

The uptime command is commonly used to:

  • Monitor system performance and stability.
  • Quickly check how long the system has been running.
  • Assess system load and determine if the system is under heavy use.

Previous

Bash kill Command - Terminate Processes

Next chapter

Networking

Start with Bash ping Command - Send Request to Network Hosts

This chapter

Overview
7

Lessons

23m

Read time

1. Bash ps Command - Snapshot of Current Processes2. Bash top Command - Display Linux Tasks3. Bash df Command - File System Disk Space Usage4. Bash du Command - File Space Usage5. Bash free Command - Display Free and Used Memory6. Bash kill Command - Terminate Processes7. Bash uptime Command - System Runtime

On this page

Using the uptime CommandUnderstanding the OutputExample OutputExample: Understanding Uptime OutputInterpreting Load AveragesExample: Interpreting Load AveragesCommon Uses