在 CentOS 上停止 Filebeat 的方法,取决于你是如何安装和运行的。下面按常见情况说明:
如果你是通过官方 RPM 包安装的 Filebeat:
sudo systemctl stop filebeat
sudo systemctl status filebeat
sudo systemctl disable filebeat
如果是 CentOS 6 或 SysV 方式:
sudo service filebeat stop
如果你是手动启动的,比如:
./filebeat -e -c filebeat.yml
ps -ef | grep filebeat
kill <pid>
如果无法正常退出:
kill -9 <pid>
ps -ef | grep filebeat
或
systemctl status filebeat
systemctl stop filebeat
之后可随时:
systemctl start filebeat
如果你能告诉我:
我可以给你更精确的操作步骤。