Managing and Troubleshooting System Services and Processes

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will be investigating process activity and managing services on a development system. You use the `ps` and `top` commands to review process activity and locate the `PID` for a specific process. You will use this information to kill an active process that shouldn’t be running. To ensure the process isn’t restarted by the service, you will use the `systemctl` command to mask the service so it doesn’t start automatically and cannot be manually started by an administrator.

*This course is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

View Process Information Using the PS and TOP Commands
  • Use top to view process activity.
  • Use grep to filter ps output for mariadb.
Cycle the Problematic Service
  • Use the systemctl command to cycle the mariadb.
  • Confirm mariadb service is running using the systemctl command.
Identify the PID and KILL the Problematic Process
  • Use the ps command to identify the PID for the mariadb process.
  • Use the kill command to terminate the mariadb using the SIGKILL parameter.
Stop and Mask the Problematic Service to Prevent It from Restarting
  • Check the mariadb service status using systemctl.
  • Use systemctlto stop the mariadb service.
  • Mask the mariadb service using systemctl.
  • Attempt to start the mariadb service to confirm it is properly masked.

Additional Resources

SCENARIO:

The development team has been having issues with MariaDB on one of the new servers provided to them. The DevOps manager, Peter Gibbons, has requested you review the system and temporarily disable the service if no issues are apparent while his team continues to investigate code and other issues that could be causing the performance issues. You will need to review process activity and to determine if there are any issues with MariaDB, ensure it is stopped and configured so that it won't start again while the development team investigates the issues from their side.

Note: In this lab, the MariaDB service is not actually misbehaving but for the purposes of this exercise we will assume it is and perform the necessary steps to resolve the request.

To complete the request and create the collaborative directory for the devops team, you will need to:

  • View process information using the ps and top commands.
  • Use the systemctl command to cycle MariaDB and check again with the ps or top command.
  • Identify the PID for the process and use the kill command to stop the process.
  • Use the systemctl command to mask the service to prevent it from being started again until the issues are resolved. <br>

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?