启动
正常启动
bin/flume-ng agent -n a1 -c conf -f conf/my.conf -Dflume.root.logger=INFO,console
解释:
agent:运行一个 agent-c conf:指定配置目录-f dir-log.conf:指定要运行的配置文件-n a1:配置文件中 agent 的名字-Dflume.root.logger=INFO,console:将信息打印到控制台中
后台启动
在命令前面加 nohup,在末尾加 &,如下:
nohup bin/flume-ng agent -n a1 -c conf -f conf/my.conf -Dflume.root.logger=INFO,console &
停止
查看进程
jps
找到下面的进程:
56548 Application
kill
kill -9 56548