How to check a service is running or not in Linux?

Syntax:
——-

Method 1: Using service command
========

#service servicename status

httpd (pid 7474) is running…
Method 2: Using init.d scripts which are located in /etc/init.d folder
========

Example:
/etc/init.d/cron status

Clipped output of init.d script:
cron start/running, process 1253
Method3: Using status command to check if the service is running or not
=======

Example:
status atd
Output:
======
atd start/running, process 1245

To check all the services state at a time use below command

#service –status-all

Please comment on this if you have any other way to check the status of a service.

 

l1@squarebrothers.com'About Support
We are working as a Server administrator at Squarebrothers Info tech Pvt Ltd. We are First ICANN accredited Domain Registrar in South India. We are partner with Cpanel NOC, Microsoft SPLA, APNIC member and Microsoft GOLD partner.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.