0% found this document useful (0 votes)
94 views8 pages

Red Hat System Administration I: Document Version

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views8 pages

Red Hat System Administration I: Document Version

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

RED HAT SYSTEM ADMINISTRATION I

7.9. Lab: Monitoring and Managing Linux


Processes
Document Version: 2015-12-28

Copyright © 2015 Network Development Group, Inc.


www.netdevgroup.com

NETLAB Academy Edition, NETLAB Professional Edition, and NETLAB+ are registered trademarks of Network Development Group, Inc.

“Red Hat,” Red Hat Linux, and the Red Hat “Shadowman” logo are trademarks or registered trademarks of Red Hat, Inc. in the US
and other countries.
7.9. Lab: Monitoring and Managing Linux Processes

Contents
Introduction ........................................................................................................................ 3
Outcomes ............................................................................................................................ 3
Lab Topology ....................................................................................................................... 4
Lab Settings ......................................................................................................................... 5
1 Performance Checklist ................................................................................................ 6

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 2


7.9. Lab: Monitoring and Managing Linux Processes

Introduction

In this lab, students will locate and manage processes that are using the most resources
on a system.

Outcomes

Performing this lab will provide experience using the top utility as a process
management tool.

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 3


7.9. Lab: Monitoring and Managing Linux Processes

Lab Topology

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 4


7.9. Lab: Monitoring and Managing Linux Processes

Lab Settings

The information in the table below will be needed in order to complete the lab. The
task sections below provide details on the use of this information.

Virtual Machine IP Address Account Password


(if needed) (if needed)

Server1 Machine 172.25.1.11 student student

Desktop1 Machine 172.25.1.10 student student

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 5


7.9. Lab: Monitoring and Managing Linux Processes

1 Performance Checklist

Before you begin...

Access the graphical login screen of the Server1 virtual machine and log in as student.

The topology includes two virtual machines that are accessible to users. Take care to
perform the tasks as instructed, including using the appropriate virtual machine as
directed.

1. Open a terminal window and run lab processes setup on server1 to prepare
for this exercise.

[student@server1 ~]$ lab processes setup

2. Run the top utility. Size the window to be as tall as possible.

[student@server1 ~]$ top

3. Observe the top display. The default display sorts by CPU utilization, highest first.
What are the processes using the most CPU time?

In addition to the default GNOME shell, find the process named hippo.

4. Change the display to sort by the amount of memory in use by each process.

Press the m key.

5. What are the processes with the largest memory allocations?

In addition to the default GNOME shell and Xorg, find a process named
elephant.

6. Turn off the use of bold in the display. Save this configuration for reuse when
top is restarted.

a. Press the single uppercase keystroke B to toggle bold use off.


b. Press the single uppercase keystroke W to save this configuration. The
default configuration file is .toprc in the current user's home directory.

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 6


7.9. Lab: Monitoring and Managing Linux Processes

7. Exit top, then restart it again. Confirm that the new display uses the saved
configuration; i.e., the display starts sorted by memory utilization and bold is
turned off.

Press q to quit top.

[student@server1 ~]$ top

8. Modify the display to again sort by CPU utilization. Turn on the use of bold.
Observe that only Running or Runnable (state R) process entries are bold. Save
this configuration.

a. Press the single uppercase keystroke P to sort by CPU utilization.


b. Press the single uppercase keystroke B to toggle bold use on.
c. Press the single uppercase keystroke W to save this configuration.

9. Open another terminal window. As root, suspend the hippo process. In top,
observe that the process state is now T.

[student@server1 ~]$ su -
Password: redhat
[root@server1 ~]# pkill –SIGSTOP hippo

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 7


7.9. Lab: Monitoring and Managing Linux Processes

10. The hippo process quickly disappears from the display, since it is no longer
actively using CPU resources. List the process information from the command
line to confirm the process state.

[root@server1 ~]# ps –f $(pgrep hippo)

11. Resume execution of the hippo processes.

[root@server1 ~]# pkill -SIGCONT hippo

12. When finished observing the display, terminate the extra processes using the
command line. Confirm that the processes no longer display in top.

[root@server1 ~]# pkill elephant


[root@server1 ~]# pkill hippo

13. Check that the cleanup is successful by running the grading script. If necessary,
find and terminate processes listed by the grading script, and repeat grading.

[root@server1 ~]# lab processes grade

14. Exit the top display.

Press q to quit top.

15. Close your sessions with the bash shell.

12/28/2015 Copyright © 2015 Network Development Group, Inc. www.netdevgroup.com Page 8

You might also like