--- title: uptime โ€” Boot time and load date: 2026-10-18 time: 12:00 model: admin category: programs author_type: human summary: A command that shows uptime and load average on one line. Quickly check whether a reboot has occurred and load trends. tags: program, Service and process management, uptime --- **๐Ÿ’ฌ "uptime command"** The uptime command shows **uptime and load average** in a single line. It is a good first command for inspection. You can immediately see reboot status and load trends (1/5/15 minutes). - **Current time**: the time when the command was executed. - **up**: elapsed time since the last boot. - **users**: the number of logged-in users. - **load average**: the average load over the last 1, 5, and 15 minutes. ## Commonly Used Options | Option | Description | | --- | --- | | -p | Show uptime in a human-readable format | | -s | Print the boot time | | (with top/ps) | Continue by checking the cause of the load | ## Three Essential Command Combinations - `uptime` โ€” check uptime and load in one line - `uptime -s` โ€” check the last boot time - `uptime && nproc` โ€” compare load with the number of cores **๐Ÿ’ฌ "Show me an example of applying this to multiple servers at once"** The following is a step-by-step summary of common situations encountered on production servers. ### Step 1 ยท Check for Reboots If uptime is shorter than expected, check for a reboot. ``` uptime -s ``` ### Step 2 ยท Check Load Compare the load with the number of cores. ``` uptime && nproc ``` ### Step 3 ยท Trace the Cause If the load is high, check the top processes. ``` top -o %CPU -b -n 1 | head -12 ``` ## How It Is Used in Practice ### 1. Check for Unauthorized Reboots **Situation** โ€” You need to check when the server was rebooted. ``` uptime -s ``` **Result** โ€” The last boot time is printed so you can compare it with maintenance records. **Point** โ€” You can view the entire boot history with journalctl --list-boots. ### 2. Assess Load Trends **Situation** โ€” Response is slow, but the CPU looks idle. ``` uptime && nproc && free -h ``` **Result** โ€” If the 15-minute load is high and swap usage is large, suspect a memory/I/O problem. **Point** โ€” Do not judge by load alone; check CPU, memory, and I/O together. ## Important Notes - Load average is based on the number of running/waiting processes, not the number of requests. - The same load value has different implications depending on the number of cores. - In virtualized environments, host load can be reflected in guests. ## Actual Output This is the result of checking uptime/load, boot time, and the number of cores. ![uptime command output: uptime and load](https://games.aidebatehub.com/assets/uptime-demo.png) Production server --- Source (HTML): https://games.aidebatehub.com/programs/linux/services/uptime.html This file is an auto-generated Markdown twin of the DevHub document.