View the status of processes and monitor resource usage.
Outcomes
Use the GNOME System Monitor application and command-line tools to monitor application usage.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.
[student@workstation ~]$ lab start network-process
Instructions
Launch the GNOME Calculator application and monitor the process resources.
Launch the GNOME Calculator.
Launch the GNOME System Monitor.
On the tab, click the column to sort by name.
Review the list of processes and locate the gnome-calculator process.
Review the user owner, CPU usage, memory, and other information for the gnome-calculator process.
Stop the GNOME Calculator application.
Select the entry for gnome-calculator and click in the bottom left corner to stop the application.
Confirm the operation by clicking .
Launch the GNOME Calculator again.
Find the GNOME Calculator PID on the command line.
List all active processes that are running in the system.
[student@workstation ~]$ ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 14:04 ? 00:00:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 31
root 2 0 0 14:04 ? 00:00:00 [kthreadd]
root 3 2 0 14:04 ? 00:00:00 [rcu_gp]
...output omitted...
root 36259 2 0 18:43 ? 00:00:00 [kworker/u8:1-events_unbound]
student 36260 3639 0 18:44 pts/5 00:00:00 ps -efThe process list is long, which makes it difficult to find a single process.
Find the GNOME Calculator PID by using the pgrep command.
[student@workstation ~]$ pgrep -f gnome-calculator
2958Find and terminate the GNOME Calculator PID interactively by using the top command.
[student@workstation ~]$ topPress uppercase L on your keyboard to enter the top search prompt.
Type calc and press Enter.
Your output might vary.
Press k to terminate the gnome-calculator process.
The top command suggests the first result as the process to stop.
Verify that the PID matches the ID for the gnome-calculator process.
If the suggested PID does not match the gnome-calculator process, then enter the PID manually.
Press Enter to confirm the PID and press Enter again to accept the default signal to stop the process.
Press q on your keyboard to exit the top command.
Verify that the gnome-calculator process is no longer running by using the pgrep command.
As expected, the pgrep command returns no results.
[student@workstation ~]$ pgrep -f gnome-calculator