I installed topbeat in my centos box, and i am running topbeat by /etc/init.d/topbeat start. But i couldn't find /var/run/topbeat.pid file. I need that file to monit topbeat. I went through init script and it seems its writing to that file. But that file is not there. How to get the topbeat pid into such a file, is there something i am missing regarding this?
What OS version are you running? My topbeat 1.2.3 installation seems to have a PID file.
$ cat /etc/redhat-release
CentOS release 6.8 (Final)
$ ls -la /var/run/topbeat.pid
-rw-r--r-- 1 root root 5 Aug 2 10:08 /var/run/topbeat.pid
$ rpm -qa topbeat
topbeat-1.2.3-1.x86_64
I am using CentOS Linux release 7.2.1511 (Core)
And Topbeat is actively running. But there is no pidfile, i tried multiple restarts to check, but still its not creating pid file in /var/run/ folder
Is CentOS 7.2 using systemd?
Yes, its using systemd.
it depends on what you want monit to do, there might be some support already built into systemd for it (like restart service if down). Googling for monit and systemd will get you quite some results.
I haven't used monit, but it looks like it can be used with processes that don't have pid files. https://serverfault.com/questions/270316/monit-check-process-without-pidfile
Thanks, that solves my issue.
This topic was automatically closed after 21 days. New replies are no longer allowed.