You are on page 1of 1

[3] 6881

11. In the right terminal shell, note the process ID (PID) for the third monitor process.
View the CPU
percentage for the process, which is again expected to hover between 15% and 25%.

[student@servera ~]$ top

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

6881 student 20 0 222448 3032 2784 S 18.6 0.2 0:11.48 monitor

6498 student 20 0 222448 2996 2748 S 15.6 0.2 0:47.86 monitor

6071 student 20 0 222448 2964 2716 S 18.1 0.2 2:07.86 monitor

To push the load average above 1, you must start more monitor processes.
The classroom setup has two
CPUs, so only three processes are not enough to stress it.
Start three more monitor processes in the
background.
View again the one-minute load average, which is now expected to be above 1.
Wait at least
one minute for the calculation to adjust to the new workload.

[student@servera ~]$ monitor &

[4] 10708

[student@servera ~]$ monitor &

[5] 11122

[student@servera ~]$ monitor &

[6] 11338

top - 12:42:32 up 11 days, 1:28, 3 users, load average: 1.23, 2.50, 1.54

12. When you are finished observing the load average values, terminate each of the monitor processes from
within the top command.

12.1. In the right terminal shell, press k to observe the prompt below the headers and above the
columns.

...output omitted...

PID to signal/kill [default pid = 11338]

12.2. The prompt chooses the monitor processes at the top of the list.
Press Enter to kill the process.

...output omitted...

Send pid 11338 signal [15/sigterm]

12.3. Press Enter again to confirm the SIGTERM signal 15.

Verify that the selected process is no longer present in the top command.
If the PID exists, then
repeat these steps to terminate the processes, and substitute SIGKILL signal 9 when prompted.

6498 student 20 0 222448 2996 2748 R 22.9 0.2 5:31.47 monitor

6881 student 20 0 222448 3032 2784 R 21.3 0.2 4:54.47 monitor

11122 student 20 0 222448 2984 2736 R 15.3 0.2 2:32.48 monitor

6071 student 20 0 222448 2964 2716 S 15.0 0.2 6:50.90 monitor

10708 student 20 0 222448 3032 2784 S 14.6 0.2 2:53.46 monitor

13. Repeat the previous step for each remaining monitor process.
Verify that no monitor processes remain in
the top command.

14. In the right terminal shell, press q to exit the top command.
Close the right terminal.

15. Return to the workstation machine as the student user.

[student@servera ~]$ exit

logout

Connection to servera closed.

[student@workstation ~]$

Finish

On the workstation machine, change to the student user home directory and use the lab command to
complete this exercise. This step is important to ensure that resources from previous exercises do not impact
upcoming exercises.

[student@workstation ~]$ lab finish processes-monitor

This concludes the section.

Previous Next

You might also like