Top and System Load
top is a command that shows the busiest processes. The load average is a set of three numbers that show how busy the machine is.
One view from top
This command prints one view from top and stops. The CPU is the part of the computer that runs programs.
$ top -b -n 1 | head -15How long, how busy
uptime prints the load average in one line. The numbers differ on every machine.
$ uptimeMemory in plain sizes
Memory is the fast storage where running programs keep their work. free -h prints it in sizes like Gi and Mi.
$ free -hExample
$ cd ~/practice
$ uptime
$ free -hKey points
- top -b -n 1 prints one view and stops.
- Use uptime to print the load average alone.
- Use free -h to print memory in sizes like Gi.
- In short, top shows the busiest processes, and the numbers change as the machine works.
In this example, the first command moves into the practice folder. uptime prints the load average in one line. free -h prints the memory next. The numbers change as the machine works, so yours will differ.
Note
The numbers differ on every machine, and they change from minute to minute.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
What does uptime print?