Starting Services That Should Be Running RHEL

I recently came across a server that ran services, I was not familiar with, and services were unclear as to the issues I was troubleshooting. As a quick fix, I decided to get a list of services that should be running and start any that were not from that list:

chkconfig --list | grep "2:on" | grep "3:on" | grep "4:on" | grep "5:on" | awk '{print "service " $1 " status"}' >

In some cases, the service was not listed as I had expected, so to get the list I had to run the following, where $3 is the service name from the prior commands. In some cases, I had to use $5, as history had a different output:

history | grep start | grep service | grep -v grep | awk '{print $5}' | sort | uniq |  awk '{print "service " $0 " status"}' >

Now we can find out which are running:

chmod +x 
./ | grep " not " | awk '{print "service " $1 " start"}' >

Validate what you are starting, come on, be informed and intentful in what you are doing, and if safe, run the second and third command:

chmod +x 






Leave a Reply

Your email address will not be published. Required fields are marked *