Gearman 集中处理日志

F#

job server 安装在gearman-job服务器上。 

worker安装在worker服务器上。 

全部以gearman用户运行。 

job server 启动命令: 

/opt/app/gearman/sbin/gearmand -L 192.168.0.x -d 

worker 启动命令: 

( /opt/app/gearman/bin/gearman -w -h gearman-job -f businessLogger | /usr/local/sbin/cronolog /opt/log/business.%Y%m%d.log & ) 

client 启动命令,以client1为例: 

screen -dmS gearman 

script /dev/null 

screen -r gearman 

tail -F  ar/log/log1 | awk '{print "app1",$0}' | /opt/app/gearman/bin/gearman -n -h gearman-job -f businessLogger & 

ctl-a d

你可能感兴趣的:(Gearman 集中处理日志)