FIGURE 12.1 Use the top command to monitor and control processes.
The default sort order in top shows the most CPU-intensive tasks first. The
first command there should be the yes process you just launched from the
other terminal, but there should be many others also. Say that you want to
filter out all the other users and focus on the user running yes. To do this,
press u and enter the username you used when you ran yes. When you press
Enter, top filters out processes not being run by that user.
The next step is to kill the PID of the yes command, so you need to
understand what each of the important fields means:
PID—The process ID
User—The owner of the process
PR—Priority
NI—Niceness
Virt—Virtual image size, in kilobytes
Res—Resident size, in kilobytes
Shr—Shared memory size, in kilobytes
S—Status
%CPU—CPU usage
%Mem—Memory usage