# Pid file not found

**URL:** <https://discuss.elastic.co/t/pid-file-not-found/57659>\
**Category:** Beats\
**Created:** [August 10, 2016, 6:34am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659 "2016-08-10T06:34:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai\_Birada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_birada/32/142367_2.png) [@Sai\_Birada](https://discuss.elastic.co/u/Sai_Birada)\
**Post date:** [August 10, 2016, 6:34am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/1 "2016-08-10T06:34:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 10, 2016, 2:19pm UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/2 "2016-08-10T14:19:10Z")

</div>

What OS version are you running? My topbeat 1.2.3 installation seems to have a PID file.

```auto
$ 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

```

---

<div class="post-metadata">

**Author:** ![Sai\_Birada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_birada/32/142367_2.png) [@Sai\_Birada](https://discuss.elastic.co/u/Sai_Birada)\
**Post date:** [August 11, 2016, 4:44am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/3 "2016-08-11T04:44:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 11, 2016, 10:42am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/4 "2016-08-11T10:42:21Z")

</div>

Is CentOS 7.2 using systemd?

---

<div class="post-metadata">

**Author:** ![Sai\_Birada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_birada/32/142367_2.png) [@Sai\_Birada](https://discuss.elastic.co/u/Sai_Birada)\
**Post date:** [August 12, 2016, 4:54am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/5 "2016-08-12T04:54:04Z")

</div>

Yes, its using systemd.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 12, 2016, 1:54pm UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/6 "2016-08-12T13:54:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 12, 2016, 2:35pm UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/7 "2016-08-12T14:35:21Z")

</div>

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](https://serverfault.com/questions/270316/monit-check-process-without-pidfile)

---

<div class="post-metadata">

**Author:** ![Sai\_Birada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_birada/32/142367_2.png) [@Sai\_Birada](https://discuss.elastic.co/u/Sai_Birada)\
**Post date:** [August 16, 2016, 4:10am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/8 "2016-08-16T04:10:40Z")

</div>

Thanks, that solves my issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 31, 2016, 6:34am UTC](https://discuss.elastic.co/t/pid-file-not-found/57659/9 "2016-08-31T06:34:08Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
