top of page
Motherboard

Service Management

In RHEL, you can manage services using systemctl, which allows you to start, stop, restart, enable, and check the status of systemd services. Additionally, you can find and manage running processes using their Process ID (PID) with commands like ps aux, pgrep <service-name>, or kill <PID> for manual control over service-related processes.

RHEL Service Administration

systemclt Commands

View Service Details

systemctl status firewalld

systemclt.png

Manage Services

Start a Service

Stop a Service

Soft Kill by Process ID

Hard Kill by Process ID

sudo systemctl start firewalld

sudo systemctl start firewalld

sudo kill 888

sudo kill -9 888

Service Dependancies

systemctl show NetworkManager.service | grep -E 'Requires=|After=|Wants='

dep.png

You can then query the required services to see if they are running...

dep1.png

ViewServices

systemctl --type=service --state=running | sort

view_services.png

PS

Check Process Memory Usage (KB):

ps -eo pid,user,s,comm,size,vsize,rss --sort -size | head -1; ps -eo pid,user,s,comm,size,vsize,rss --sort -size | grep firewalld

PID01.png

Check Process Usage:

ps aux | head -1; ps aux | grep 888

PID02.png

htop

Viewing with htop

​

Enable Required Repositories:

sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms

​

Install EPEL:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

​

Install htop

sudo dnf install -y htop

just run the command htop

htop.png

journalctl

You can see the logs for specific service. These are great for troubleshooting.

sudo journalctl -u NetworkManager.service

journalctl1.png
bottom of page