You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Benjamin Reed <br...@apache.org> on 2016/10/06 00:39:45 UTC

tracing client request/responses

anyone know how to turn on tracing to get a file that i can run through the
TraceFormatter? i see the 4 letter works to set tracing masks, but i can't
seem to find the switch to actually turn on tracing.

thanx
ben

Re: tracing client request/responses

Posted by Arshad Mohammad <ar...@gmail.com>.
Zookeeper Trace log does work as expected.
1)It can be enabled but the logs will go in the normal log file
(zookeeper-root-server-host.log) only. The trace logs will not go in
separate zookeeper_trace.log file as expected. No configuration in
log4j.properties can change this behaviour. In all cases normal log and
trace log will be in the same file.
2)Code must be modified to put the trace logs into seprate file, but even
in that case trace file will not have the data, TraceFormatter is
expecting. Trace log looks like
2016-10-06 01:19:52,706 [myid:1] - TRACE
[FollowerRequestProcessor:1:ZooTrace@95][] - :Fsessionid:0x1000031c4cc0000
type:createSession cxid:0x0 zxid:0xfffffffffffffffe txntype:unknown
reqpath:n/a
2016-10-06 01:19:52,909 [myid:1] - TRACE
[FollowerRequestProcessor:1:ZooTrace@95][] - :Fsessionid:0x1000031c4cc0000
type:exists cxid:0x3 zxid:0xfffffffffffffffe txntype:unknown reqpath:/allOps

TraceFormatter is expecting some kind of binary data so it is not going to
work even after separating the trace logs.

-Arshad

On Thu, Oct 6, 2016 at 6:09 AM, Benjamin Reed <br...@apache.org> wrote:

> anyone know how to turn on tracing to get a file that i can run through the
> TraceFormatter? i see the 4 letter works to set tracing masks, but i can't
> seem to find the switch to actually turn on tracing.
>
> thanx
> ben
>

Re: tracing client request/responses

Posted by Benjamin Reed <br...@apache.org>.
yeah i tried zk-dump, but it ended up missing way too many packets.

On Wed, Oct 5, 2016 at 5:50 PM, Raúl Gutiérrez Segalés <rg...@itevenworks.net>
wrote:

> On 5 October 2016 at 17:39, Benjamin Reed <br...@apache.org> wrote:
>
> > anyone know how to turn on tracing to get a file that i can run through
> the
> > TraceFormatter? i see the 4 letter works to set tracing masks, but i
> can't
> > seem to find the switch to actually turn on tracing.
> >
>
> maybe it helps: i haven't had much luck with trace (too noisy); so i end up
> sniffing at packets as they
> go out of the client and into the server (and back again) by running
> zk-dump on the two ends:
>
> https://github.com/twitter/zktraffic
>
>
> -rgs
>

Re: tracing client request/responses

Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
On 5 October 2016 at 17:39, Benjamin Reed <br...@apache.org> wrote:

> anyone know how to turn on tracing to get a file that i can run through the
> TraceFormatter? i see the 4 letter works to set tracing masks, but i can't
> seem to find the switch to actually turn on tracing.
>

maybe it helps: i haven't had much luck with trace (too noisy); so i end up
sniffing at packets as they
go out of the client and into the server (and back again) by running
zk-dump on the two ends:

https://github.com/twitter/zktraffic


-rgs