5

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.

sg552
  • 389
  • 3
  • 4
  • 11

2 Answers2

13

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.
user9517
  • 114,104
  • 20
  • 206
  • 289
  • 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
4

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.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92