Determine the last system boot time and the workload on the system
Author: name contact BSD flavour
Reviewer: name contact BSD flavour
Reviewer: name contact BSD flavour
Concept
Be able to monitor the system's workload using the time since last system reboot, as well as the system load over the last 1, 5 and 15 minutes in order to determine operation parameters.
Introduction
The uptime
command can be used to show how long the system has been running since it last booted. It also shows the current time, how many users are logged in,
and the system's load averages over the past minute, five minutes and 15 minutes. For example:
""$ uptime "" 6:17AM up 16 days, 12:28, 3 users, load averages: 0.18, 0.14, 0.09
The number of users is from the "utmp" database. (This is covered in section Determine who is currently on the system or the last time a user was on the system.)
The time the system was booted is recorded in the kern.boottime
sysctl. (The sysctl functionality is covered in section Modify a kernel parameter on the fly.)
The load average, also available from the vm.loadavg
sysctl, is basically the number of processes in the system's run queue averaged over one minute, five minutes,
and 15 minutes. These are processes that are ready to run -- not sleeping.
The system is fully utilized when this number is above 1.0.
TODO: what about I/O blocking?
TODO: discuss workload and performance related to this load average
TODO: discuss that load average may be different per system or architecture and is not always a good reference
Examples
Practice Exercises
More information
uptime(1), w(1), top(1)