LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   checking service status (https://www.linuxquestions.org/questions/linux-newbie-8/checking-service-status-4175518066/)

dicky238hk 09-09-2014 11:04 PM

checking service status
 
I am confusing how to check the status.

I use service xxx status (for xxx = postfix), but for some (for example openssl) it returned error. Sometimes I use rpm -qa xxx (for example postfix again) it returned version. But return version does not mean it is running.

Checked out that to use systemctl.

Is there any further command to check the status?

dyto 09-10-2014 12:38 AM

ps aux|grep postfix

/etc/init.d/postfix status

dicky238hk 09-10-2014 01:15 AM

Thanks

How about the others? Is it depending on using "which xxxx" (for example xxxx = procmail) to determine the folder location and then follow but just for this example "procmail" I type:-

/usr/bin/procmail status

but it is waiting the next input like.

Where can get common idea how to check?

thanks

unSpawn 09-10-2014 01:36 AM

How about using Monit or Nagios instead?

pratik.oturkar 09-10-2014 02:49 AM

hi try below command which shows you the service status with runlevel

/sbin/chkconfig --list this will display huge list of service with their current status
/sbin/chkconfig --list | grep xxx for specific service

to enable specific service on specific level

/sbin/chkconfig --level 5 syslog on
above command will configure syslog service to be run on runlevel

dicky238hk 09-10-2014 03:43 AM

2 Attachment(s)
please see the attachment (jpg format).

After looking then my feeling is:-

Again stuck.

What can be next? Remove Nagios, try another Monit? Or...

Thanks for help.

pratik.oturkar 09-10-2014 04:37 AM

try service httpd restart and post entire output or find error log file in/var/log/httpd and also please post httpd.conf file
need to set some parameter in httpd.conf
and you are trying to run system service instead of systemctl type service cyrus-sasi status

dicky238hk 09-10-2014 09:50 PM

Hi,

For service httpd restart, it returned error as:-

Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

the httpd.conf is attached (I think nothing I made change as I do not have idea)


All times are GMT -5. The time now is 06:04 AM.