So the main utility to use to monitor system activity is TOP.
TOP is a dashboard.
It allows you to monitor what is currently going on.
In TOP, you get some default fields.
If you want to see different fields, use F, and you can select whatever you want to see.
In TOP, by default, activity is sorted on CPU usage.
If you want to sort on memory usage, you can do that by typing uppercase M, and press W
to save new display settings if you change anything.
Let's go check it out.
So here we have the TOP utility.
Now what exactly do we see in TOP?
Well it starts on the top line, which is mentioning the current time as well as the uptime of
the system.
Then we can see that currently five users are active, and the load average is giving
an impression of the runnable processes.
So not a lot is going on here.
So as mentioned before, this is 1, 5, and 15 minutes.
And you want to see all of that, because if your system is currently very active, that
doesn't mean anything.
It only means something if your system has been very active for the last 15 minutes.
Then you should take action.
Then we get task information, including the running tasks, the sleeping tasks, which are
not currently doing anything, and stopped or zombie.
In the CPU's line, you can see where your tasks are.
The important parameters are US for user space.
User space is for processes that have been started by a user and are not running in kernel
space.
That's the other one, SY for system space, which is the same as kernel space.
What I like a lot is the 95% of idle.
The idle indicates the amount of time as a percentage that the system isn't doing anything
at all.
The other parameters are not as important.
Then we have the memory information.
That's the same as what you have just seen in 3 minus M. And next, we have the list of
active processes.
For all these processes, you see the most active process sorted on CPU utilization on
the top list.
And that makes management of these processes a little bit easier.
Also, you see extended information about what is going on, like the priority, which is indicating
how important the process is.
Where the fun thing is that RT is the highest priority, stands for real time.
The second highest is the lower numbers.
So zero is serviced with a higher priority than priority of 20.
And then we have memory usage.
Most important, the resident memory, because resident memory is really about the RAM that
the process is using.
In Linux, there's also this thing called virtual memory.
Virtual memory is just a reservation of memory that the process eventually might be using.
So here, this PTYXIS has 2 gigabytes of virtual memory and only half a gigabyte of resident
memory.
So resident memory is what counts.
And that is what relates to the use memory that you can see right here.
Now, if ever you want to see something else, press F to get an overview of the different
fields.
So what can we see in the different fields?
Well, let's use P for last used CPU as an example.
Let's imagine I like this option, then I can use spacebar to select it.
And to get back to my main interface and all the way to the right, I can now see the last
used CPU for each of my processes, which is giving a nice impression of preemptive multitasking
because you can see that processes like 11501, our most active process, is jumping around
between CPU 0 and CPU 1.
If you like this output, use uppercase W to write it and use it again the next time and
use Q to get out of here.