0

There is service named filebeat. It works on oracle linux 6.8 machine,

chkconfig --list 

it does not show but when run this command

ps -ef | grep filebeat

ps -ef | grep filebeat root 2583 18280 0 10:10 pts/7 00:00:00 grep filebeat root 14456 1 0 Mar27 ? 00:00:00 /usr/share/filebeat/bin/filebeat-god -r / -n -p /var/run/filebeat.pid --

/usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat

root 14457 14456 2 Mar27 ? 16:41:54 /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat

I can see that the service is working and I also could not find in /etc/init.d

And I checked the log file it writes into log file.

lsof filebeat returns;

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

filebeat 14457 root 2w REG 252,1 8995935 529475 filebeat

and

  ps p 14457

  PID TTY      STAT   TIME COMMAND

  14457 ?        Sl   1001:57 /usr/share/filebeat/bin/filebeat -c 

  /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config 

  /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/fileb

how can I find where is the location of filebeat service file in order to start or stop?

  • systemd command works on redhat 7 OS not for redhat 6.8 OS – 1010111100011 Apr 25 '18 at 7:38
  • My oversight... Could it be installed manually then? – Rui F Ribeiro Apr 25 '18 at 7:39
  • No it can not be,it designed for RHEL 7. – 1010111100011 Apr 25 '18 at 7:42
  • Use the lsof command ti dicipher the process writing to the log file and work your way back from there. – Raman Sailopal Apr 25 '18 at 9:21
  • lsof filebeat command returns; filebeat 14457 root 2w REG 252,1 8995935 529475 filebeat ps p 14457 14457 ? Sl 1001:57 /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs but I am still not able start or stop service. I have already known that the service is working but the problem is not to find service binary in order to start or stop – 1010111100011 Apr 25 '18 at 10:24
0

If it's a port-based service, you can use netstat.

netstat -tulpn | grep filebeat 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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