Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My syslog is running correctly but out of curiosity how to check that syslog daemon is running. Is there anyway I could check the status like apache

root@server1:/etc# /etc/init.d/apache2 status
Apache2 is running (pid 12894).

I'm running Debian wheezy. Thanks in advance.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can use the pidof utility to check whether pretty much any program is running (if it gives out at least one pid, the program is running). If you are using syslog-ng, this would be pidof syslog-ng; if you are using syslogd, it would be pidof syslogd.

share|improve this answer
    
That would do. Thank you. –  sg552 Jul 14 '13 at 7:43
    
@sg552 : pgrep is another possibility. –  Deer Hunter Jul 14 '13 at 7:58
add comment

Debian uses rsyslog and you can check it is running pretty much exactly like checking apache is running

/etc/init.d/rsyslog status
[ ok ] rsyslogd is running.

Or you could use the service command (which does pretty much the same thing)

service rsyslog status
[ ok ] rsyslogd is running.
share|improve this answer
    
I'm using syslogd. I install rsyslogd just now because I think the service command is much simple. Thanks again. –  sg552 Jul 14 '13 at 23:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.