uptime
Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
uptime
Command | Explanation | Example |
---|---|---|
uptime | Shows the time the system has been up and the system load averages the last 1, 5 and 15 minutes | 23:10:18 up 5:12, 1 user, load average: 0.27, 0.40, 0.35 |
uptime --pretty | Shows the uptime in a pretty format without load averages | up 5 hours, 12 minutes |
uptime --since | Shows the uptime in full date format without load averages | 2018-12-15 17:58:14 |
cat /proc/uptime | Time in seconds since boot. First number: The number of seconds the system has been up. Second number: The total system idle time, in seconds. On multi core systems the second number is the sum of the idle time of each CPU or thread. So a dual core with to threads per core counts for 4 cores | cat /proc/uptime gives 18884.21 222468.89 on a 6 core systems with two treads per core. 222468/12=18539 is the idle time per thread. Which tells us that the system has been idle most of the time |
Boot time in epoch | Calculate the boot time in epoch | See “Calculate boottime in epoch” below |
last -F reboot | Show the uptimes since ? |
Calculate boottime in epoch
daynowepoch=`date +%s` uptimeepoch=`cat /proc/uptime | cut -d " " -f 1 | cut -d "." -f 1` boottimeepoch=$(( $daynowepoch - $uptimeepoch )) echo Boottime in epoch is $boottimeepoch
Output examples
The first character in all examples is a space
14:30:01 up 0 min, 1 user, load average: 1,14, 0,27, 0,09 12:00:01 up 2 min, 1 user, load average: 0,58, 0,60, 0,26 11:35:01 up 14 min, 1 user, load average: 0,10, 0,18, 0,17 13:00:01 up 1:02, 1 user, load average: 0,08, 0,10, 0,09 22:55:01 up 11:34, 7 users, load average: 0,27, 0,25, 0,19 00:30:01 up 1 day, 3 min, 7 users, load average: 0,32, 0,24, 0,19 00:40:01 up 1 day, 13 min, 7 users, load average: 0,02, 0,12, 0,15 15:35:01 up 1 day, 7:52, 0 users, load average: 0,00, 0,01, 0,00 08:30:01 up 1 day, 20:26, 7 users, load average: 0,76, 0,72, 0,37 07:50:01 up 2 days, 7 min, 1 user, load average: 0,28, 0,30, 0,49 08:20:01 up 2 days, 37 min, 1 user, load average: 0,12, 0,23, 0,26 13:40:01 up 2 days, 2:19, 7 users, load average: 0,02, 0,06, 0,07 22:05:01 up 2 days, 14:22, 7 users, load average: 0,01, 0,05, 0,07 14:20:01 up 25 days, 6 min, 11 users, load average: 0,37, 0,45, 0,51 14:55:01 up 25 days, 41 min, 11 users, load average: 0,19, 0,19, 0,31 15:25:01 up 25 days, 1:11, 11 users, load average: 0,38, 0,23, 0,22 10:00:01 up 25 days, 19:46, 11 users, load average: 0,13, 0,24, 0,26 09:21:27 up 229 days, 57 min, 10 users, load average: 0,00, 0,00, 0,00
Load averages
Load averages are shown for 1,5 and 15 minutes intervals
Load averages are not normalized for the number of CPUs in a system
A load average of 1 means a single CPU system is loaded all the time
A load average of 1 on a 4 CPU system it means the system was loaded 25% of the time. Which means the system was loaded for the equivalent of one core for 100% of the time
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.
uptime.txt · Last modified: 16-06-2021 09:57 by wim