1、查看

1
systemctl status logstash

2、启动

1
systemctl start logstash

3、停止服务

1
systemctl stop logstash

4、添加config.reload.automatic命令参数,自动加载配置,不需要重新启动logstash

1
/usr/share/logstash/bin/logstash -f /home/fxd/logstash/tizi-fxd.conf --config.reload.automatic

5、通过配置文件启动logstash

1
/usr/share/logstash/bin/logstash -f /home/fxd/logstash/tizi-fxd.conf

6、后台运行logstash 加&

1
/usr/share/logstash/bin/logstash -f /home/fxd/logstash/tizi-fxd.conf --config.reload.automatic &

7、 查看后台运行的程序

1
jobs

8、 结束后台运行的程序

1
kill %后台进程id