并发打日志

 并行写日志串打问题:
 
 顺序打:
 
[esb@esbapp6 aaa]$ grep -n 'esbapp6-esb_in-20180410213201-881917' esb20180412 
825:2018-04-10 21:32:01,104 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ServiceIdentifyStand:270] - 基础服务[ServiceIdentifyStand]执行完成
826:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <FlowControlService>
827:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.FlowControlService:46] - 开始执行基础服务[FlowControlService]
828:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.FlowControlService:65] - 申请令牌时的渠道/服务[LOAN/1100300001901]
829:2018-04-10 21:32:06,032 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [ERROR] [com.dcfs.flow.client.ConnFactory:334] - 与服务器通讯异常
830:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [ERROR] [com.dcits.esb.baseservice.FlowControlService:79] - 申请令牌基础服务执行异常
831:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <JournalLogService>
832:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:1295] - 流水服务 花费时间为: 0毫秒
833:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <UnPackerStand>
834:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:63] - 基础服务[UnPackerStand]开始执行
835:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:128] - ***********protocalName=
836:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:140] - 原始报文= :
837:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:157] - 标准报文的拆包执行完毕!花费时间为: 1毫秒
838:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:173] - 基础服务[UnPackerStand]执行完成
839:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <MappingService>
840:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:113] - 基础服务[MappingService]开始执行
841:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:651] - 交易标识[1100300001901],映射标识[null]
842:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.MappingService:659] - 当前处理交易标识为[1100300001901]交易无映射标识为[null]的数据映射配置,该处理不执
843:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:835] - 非组合服务,不获取基础服务码
844:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:253] - 映射服务 花费时间为: 1毫秒
845:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:271] - 基础服务[MappingService]执行完成
846:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <ConsumerClientService>
847:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:62] - 开始执行基础服务[ConsumerClientService]
848:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:157] - here is the CDVlaue before sendCompositeData {
849:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:175] - ConsumerClientService设置的超时时间为[100000]
850:2018-04-10 21:32:06,219 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:225] - here is the CDVlaue after sendCompositeData {
851:2018-04-10 21:32:06,219 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:265] - ConsumerClientService 花费时间为: 51毫秒
852:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <MappingService>
853:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:113] - 基础服务[MappingService]开始执行
854:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:651] - 交易标识[1100300001901],映射标识[null]
855:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.MappingService:659] - 当前处理交易标识为[1100300001901]交易无映射标识为[null]的数据映射配置,该处理不执
856:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:835] - 非组合服务,不获取基础服务码
857:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:253] - 映射服务 花费时间为: 0毫秒
858:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:271] - 基础服务[MappingService]执行完成
859:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <PackerStand>
860:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:107] - 基础服务[PackerStand]开始执行
861:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:164] - 标准报文的打包执行完毕!花费时间为: 0毫秒
862:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:206] - 基础服务[PackerStand]执行完成
863:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <FlowRecycleService>
864:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowRecycleService:75] - 开始执行基础服务[FlowRecycleService]
865:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <JournalLogService>
866:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:549] - ESB服务耗时[ 55 ]毫秒
867:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:1295] - 流水服务 花费时间为: 0毫秒
868:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:107] - 
869:   UniqueFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
870:     postFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
871:      preFlowNo = (0 : CONSTANT) esbapp6-esb_in-20180410213201-881917
872:ESBServiceFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
873:           uuid = (0 : CONSTANT) esbapp6-esb_in-20180410213201-881917
874:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:113] - >>> START ENDING <<<
875:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:176] - [TLESBSimTCPConnectHandler]写数据开始
876:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:193] - 响应数据CD[CompositeData {
877:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:201] - 待返回响应数据[00000943<?xml version="1.0" encoding="UTF-8"?><SERVICE><SYS_HEAD><RET><RET_MSG>交易成功</RET_MSG><RET_CODE>000000</RET_CODE></RET><ESB_SEQ_NO>50010120180410060000899320</ESB_SEQ_NO><PROVIDER_ID>403020</PROVIDER_ID><TRAN_TIMESTAMP>213120</TRAN_TIMESTAMP><CONSUMER_SEQ_NO>20202020180410010213201102</CONSUMER_SEQ_NO><SERVICE_SCENE>01</SERVICE_SCENE><RET_STATUS>S</RET_STATUS><SERVICE_CODE>11003000019</SERVICE_CODE><CONSUMER_ID>202020</CONSUMER_ID><TRAN_DATE>20180410</TRAN_DATE></SYS_HEAD><APP_HEAD><BUSS_SEQ_NO>20202020180410010213201102</BUSS_SEQ_NO><SERV_SEQ_NO>40302020180410010400034701</SERV_SEQ_NO></APP_HEAD><LOCAL_HEAD></LOCAL_HEAD><BODY><QUERY_RESULT_ARRAY><POINT_TYPE>01</POINT_TYPE><POINT>819528.00</POINT><STATUS>00</STATUS><EXPIRE_POINT>0.00</EXPIRE_POINT></QUERY_RESULT_ARRAY><QUERY_RESULT_ARRAY><POINT_TYPE>00</POINT_TYPE><POINT>13.00</POINT><STATUS>00</STATUS><EXPIRE_POINT>0.00</EXPIRE_POINT></QUERY_RESULT_ARRAY></BODY></SERVICE>]
878:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:258] - [TLESBSimTCPConnectHandler]写数据结束
879:2018-04-10 21:33:09,166 [esbapp6-esb_in-20180410213201-881917] [Thread-195] [ERROR] [com.dcfs.flow.client.ConnFactory:79] - 建立连接失败:ip=esbapp1,port=8988
880:2018-04-10 21:34:12,165 [esbapp6-esb_in-20180410213201-881917] [Thread-195] [ERROR] [com.dcfs.flow.client.ConnFactory:79] - 建立连接失败:ip=esbapp1,port=8988


串打:

[esb@esbapp6 aaa]$ grep -n 'esbapp6-esb_in-20180410213201-881917' esbsum 
1060:2018-04-10 21:42:08,413 [esbapp6-esb_in-20180329212619-000001] [Thread-161] [ERROR] [com.dcfs2018-04-10 21:32:01,104 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ServiceIdentifyStand:270] - 基础服务[ServiceIdentifyStand]执行完成
1061:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <FlowControlService>
1062:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.FlowControlService:46] - 开始执行基础服务[FlowControlService]
1063:2018-04-10 21:32:01,105 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.FlowControlService:65] - 申请令牌时的渠道/服务[LOAN/1100300001901]
1064:2018-04-10 21:32:06,032 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [ERROR] [com.dcfs.flow.client.ConnFactory:334] - 与服务器通讯异常
1065:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [ERROR] [com.dcits.esb.baseservice.FlowControlService:79] - 申请令牌基础服务执行异常
1066:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <JournalLogService>
1067:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:1295] - 流水服务 花费时间为: 0毫秒
1068:2018-04-10 21:32:06,165 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <UnPackerStand>
1069:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:63] - 基础服务[UnPackerStand]开始执行
1070:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:128] - ***********protocalName=
1071:2018-04-10 21:32:06,166 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:140] - 原始报文= :
1072:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:157] - 标准报文的拆包执行完毕!花费时间为: 1毫秒
1073:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.UnPackerStand:173] - 基础服务[UnPackerStand]执行完成
1074:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <MappingService>
1075:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:113] - 基础服务[MappingService]开始执行
1076:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:651] - 交易标识[1100300001901],映射标识[null]
1077:2018-04-10 21:32:06,167 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.MappingService:659] - 当前处理交易标识为[1100300001901]交易无映射标识为[null]的数据映射配置,该处理不执行
1078:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:835] - 非组合服务,不获取基础服务码
1079:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:253] - 映射服务 花费时间为: 1毫秒
1080:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:271] - 基础服务[MappingService]执行完成
1081:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <ConsumerClientService>
1082:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:62] - 开始执行基础服务[ConsumerClientService]
1083:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:157] - here is the CDVlaue before sendCompositeData {
1084:2018-04-10 21:32:06,168 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:175] - ConsumerClientService设置的超时时间为[100000]
1085:2018-04-10 21:32:06,219 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:225] - here is the CDVlaue after sendCompositeData {
1086:2018-04-10 21:32:06,219 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.ConsumerClientService:265] - ConsumerClientService 花费时间为: 51毫秒
1087:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <MappingService>
1088:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:113] - 基础服务[MappingService]开始执行
1089:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:651] - 交易标识[1100300001901],映射标识[null]
1090:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [WARN] [com.dcits.esb.baseservice.MappingService:659] - 当前处理交易标识为[1100300001901]交易无映射标识为[null]的数据映射配置,该处理不执行
1091:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:835] - 非组合服务,不获取基础服务码
1092:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:253] - 映射服务 花费时间为: 0毫秒
1093:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.MappingService:271] - 基础服务[MappingService]执行完成
1094:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <PackerStand>
1095:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:107] - 基础服务[PackerStand]开始执行
1096:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:164] - 标准报文的打包执行完毕!花费时间为: 0毫秒
1097:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.PackerStand:206] - 基础服务[PackerStand]执行完成
1098:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <FlowRecycleService>
1099:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowRecycleService:75] - 开始执行基础服务[FlowRecycleService]
1100:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:370] - Frame is now invoking service <JournalLogService>
1101:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:549] - ESB服务耗时[ 55 ]毫秒
1102:2018-04-10 21:32:06,220 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.baseservice.FlowLogService:1295] - 流水服务 花费时间为: 0毫秒
1103:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [p2018-04-10 21:32:00,153 [esbapp6-esb_in-20180410213200-881912] [pool-5-thread-407] [INFO] [com.dcits.esb.baseservice.ServiceIdentifyStand:270] - 基础服务[ServiceIdentifyStand]执行完成
1186:   UniqueFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
1187:     postFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
1188:      preFlowNo = (0 : CONSTANT) esbapp6-esb_in-20180410213201-881917
1189:ESBServiceFlowNo = (0 : LOCALVAR) esbapp6-esb_in-20180410213201-881917
1190:           uuid = (0 : CONSTANT) esbapp6-esb_in-20180410213201-881917
1191:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dc.esb.container.adaptor.frame.SynFrameRunnable:113] - >>> START ENDING <<<
1192:2018-04-10 21:32:06,221 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:176] - [TLESBSimTCPConnectHandler]写数据开始
1193:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:193] - 响应数据CD[CompositeData {
1194:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [DEBUG] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:201] - 待返回响应数据[00000943<?xml version="1.0" encoding="UTF-8"?><SERVICE><SYS_HEAD><RET><RET_MSG>交易成功</RET_MSG><RET_CODE>000000</RET_CODE></RET><ESB_SEQ_NO>50010120180410060000899320</ESB_SEQ_NO><PROVIDER_ID>403020</PROVIDER_ID><TRAN_TIMESTAMP>213120</TRAN_TIMESTAMP><CONSUMER_SEQ_NO>20202020180410010213201102</CONSUMER_SEQ_NO><SERVICE_SCENE>01</SERVICE_SCENE><RET_STATUS>S</RET_STATUS><SERVICE_CODE>11003000019</SERVICE_CODE><CONSUMER_ID>202020</CONSUMER_ID><TRAN_DATE>20180410</TRAN_DATE></SYS_HEAD><APP_HEAD><BUSS_SEQ_NO>20202020180410010213201102</BUSS_SEQ_NO><SERV_SEQ_NO>40302020180410010400034701</SERV_SEQ_NO></APP_HEAD><LOCAL_HEAD></LOCAL_HEAD><BODY><QUERY_RESULT_ARRAY><POINT_TYPE>01</POINT_TYPE><POINT>819528.00</POINT><STATUS>00</STATUS><EXPIRE_POINT>0.00</EXPIRE_POINT></QUERY_RESULT_ARRAY><QUERY_RESULT_ARRAY><POINT_TYPE>00</POINT_TYPE><POINT>13.00</POINT><STATUS>00</STATUS><EXPIRE_POINT>0.00</EXPIRE_POINT></QUERY_RESULT_ARRAY></BODY></SERVICE>]
1195:2018-04-10 21:32:06,222 [esbapp6-esb_in-20180410213201-881917] [pool-5-thread-458] [INFO] [com.dcits.esb.consumer.connect.TLESBSimTCPConnectHandler:258] - [TLESBSimTCPConnectHandler]写数据结束
1196:2018-04-10 21:33:09,166 [esbapp6-esb_in-20180410213201-881917] [Thread-195] [ERROR] [com.dcfs.flow.client.ConnFactory:79] - 建立连接失败:ip=esbapp1,port=8988
1197:2018-04-10 21:34:12,165 [esbapp6-esb_in-20180410213201-881917] [Thread-195] [ERROR] [com.dcfs.flow.client.ConnFactory:79] - 建立连接失败:ip=esbapp1,port=8988


[esb@esbapp6 aaa]$ cat a1.sh
cat esbabc | while read A
do
  ls -ltr *log* | awk '{print $NF}' | while read B
  do
   grep $A $B >>esb20180412
  done
done


[esb@esbapp6 aaa]$ cat esb.pl 
use Parallel::ForkManager;
my $DIR="./";
opendir DIR ,$DIR or die;
@filelist=readdir DIR;
foreach (@filelist){
 if ($_ =~/log/){
   push (@arr,$_)
 };
};
my $transid='esbabc';
open (DATA ,"<","$transid") or die  $!;
  while (<DATA>) {
    chomp ;
    push (@data,$_);
    };
close DATA;

open (DATAFH,">>",'esbsum') or die $!;
sub  checkfile{
    my $tag=shift;
    foreach $log (@arr){
       chomp $log;
       open (LOG1 ,"<","$log") or die  $!;
          while (<LOG1>) {
              chomp $_;
              if ($_ =~ /$tag/i){
                   print DATAFH ("$_\n");
               };
          };
          close LOG1;
 };
};
my @lstRlst2=@data;
my $pm = Parallel::ForkManager->new(20);
  LINKS:
foreach (@lstRlst2){
  $pm->start and next LINKS; # do the fork
  &checkfile($_);    
  $pm->finish; # do the exit in the child process
};
 $pm->wait_all_children;

阅读更多
个人分类: perl 多进程
上一篇多进程和单进程区别
下一篇python lambda
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭