dbg question

Robert Balogh baloghrobi@REDACTED
Tue Feb 3 15:02:41 CET 2004


Hi Siri,

That is great :-))) You are God :-)

thanks a lot,
/Robi


>From: "Siri Hansen (EAB)" <siri@REDACTED>
>Reply-To: siri@REDACTED
>To: "Robert Balogh" <baloghrobi@REDACTED>
>CC: erlang-questions@REDACTED
>Subject: Re: dbg question
>Date: Tue, 3 Feb 2004 14:24:51 +0100
>
>That sounds correct - in details it should look like this:
>
>1) Start tracer on the node you want to trace and set your trace flags
>    and patterns, e.g.:
>
>(node1@REDACTED)1> dbg:tracer(port,dbg:trace_port(ip,4711)).
>{ok,<0.36.0>}
>(node1@REDACTED)2> %% Example: set the call trace flag
>(node1@REDACTED)2> dbg:p(all,call).
>{ok,[{matched,node1@REDACTED,32}]}
>(node1@REDACTED)3>
>(node1@REDACTED)3> %% Example: Set a trace pattern on function erlang:time/0
>(node1@REDACTED)3> dbg:tp(erlang,time,0,[]).
>{ok,[{matched,node1@REDACTED,1}]}
>(node1@REDACTED)4>
>
>
>2) Start the trace client on the other node, e.g.:
>
>(node2@REDACTED)1> dbg:trace_client(ip,{"bilbo",4711}).
><0.36.0>
>(node2@REDACTED)2>
>
>3) Run your test or whatever on the first node, e.g.:
>
>(node1@REDACTED)4> erlang:time(). % I've set a trace pattern on this function
>{14,18,3}
>(node1@REDACTED)5>
>
>4) The trace printout should now appear on the client node:
>
>(<4669.33.0>) call erlang:time()
>
>
>/siri
>
>
>Robert Balogh wrote:
> > Hi Siri,
> >
> > Ok, I understand now...:-)
> >
> > Can I have an another question about it? So I'd like to trace an erlang 
>node
> > which is outside from my workstation (this node is an another WS).  How 
>can
> > I do this?
> > I think, I can see the trace from the remote node if I start the
> > dbg:tracer(.....) on my WS and start the dbg client on the remote WS and 
>the
> > client will to "forward" all messages to the IP port (to my WS). Am I 
>right?
> >
> > thank you for your help,
> > /Robi
> >
> >
> > >From: "Siri Hansen (EAB)" <siri@REDACTED>
> > >Reply-To: siri@REDACTED
> > >To: "Robert Balogh" <baloghrobi@REDACTED>
> > >CC: erlang-questions@REDACTED
> > >Subject: Re: dbg question
> > >Date: Tue, 3 Feb 2004 08:32:13 +0100
> > >
> > >Hi Robert!
> > >
> > >For me it works when the trace port is started first. The client needs
> > >a trace port which it can connect to, else it crashes with connection
> > >refused.
> > >
> > >I agree that it is a bit strange that there is no error returned -
> > >I'll look into that. But given the current situation, try linking to
> > >the Pid to see the error message:
> > >
> > >1> Pid = dbg:trace_client(ip,4711),link(Pid).
> > >true
> > >** exited: {error,econnrefused} **
> > >2> is_process_alive(Pid).
> > >false
> > >3>
> > >
> > >
> > >Starting the trace port first works for me:
> > >
> > >4> dbg:tracer(port, dbg:trace_port(ip,4711)).
> > >{ok,<0.39.0>}
> > >5> Pid = dbg:trace_client(ip,4711).
> > ><0.41.0>
> > >6> is_process_alive(Pid).
> > >true
> > >7>
> > >
> > >BR Siri
> > >Erlang/OTP
> > >
> > >
> > >Robert Balogh wrote:
> > > >
> > > > Hi Vlad,
> > > >
> > > > I already tried it, but unfortunatelly it has same behavior...it is 
>not
> > > > possible to stop the client process, beacuese it is never started 
>(???).
> > >But
> > > > I really don't understand why say "ok,Pid" result when I create the
> > >cleint.
> > > > I think I have a big mistake now....
> > > > I already read the documentation, but...it is not enough...for me 
>:-(
> > > >
> > > > I did that, what is in the documentation in the dbg side 
>step-by-step,
> > >but
> > > > it doesn't works for me...:-(((
> > > >
> > > > thanks a lot for your advice,
> > > >
> > > > regards,
> > > > /Robi
> > > >
> > > >
> > > > >From: "Vlad Dumitrescu" <vlad_dumitrescu@REDACTED>
> > > > >To: <erlang-questions@REDACTED>
> > > > >Subject: Re: dbg question
> > > > >Date: Mon, 2 Feb 2004 13:48:58 +0100
> > > > >
> > > > >Hi,
> > > > >
> > > > >I think the dbg:tracer must be started with something like this:
> > > > >
> > > > >     dbg:tracer(port, dbg:trace_port(ip,4711)).
> > > > >
> > > > >(see the documentation)
> > > > >
> > > > >/Vlad
> > > > >
> > > > > > I think the dbg:tracer(). is start the dbg server, but I'd like 
>to
> > >start
> > > > > > only the dbg client. But I did what you advice to me. Please see 
>the
> > > > > > resulst. It is same what I had before.
> > > > > > I don't know how possible to start the dbg client. :-((
> > > > > >
> > > > > > Any other idea....??
> > > > > >
> > > > > > Erlang (BEAM) emulator version 5.3 [threads:0]
> > > > > >
> > > > > > Eshell V5.3  (abort with ^G)
> > > > > > (axd301@REDACTED)1> dbg:tracer().
> > > > > > {ok,<0.37.0>}
> > > > > > (axd301@REDACTED)2> Pid = dbg:trace_client(ip, {"cp1-1", 4711}).
> > > > > > <0.40.0>
> > > > > > (axd301@REDACTED)3> is_pid(Pid).
> > > > > > true
> > > > > > (axd301@REDACTED)4> is_process_alive(Pid).
> > > > > > false
> > > > > > (axd301@REDACTED)5> dbg:stop
> > > > > > stop/0               stop_clear/0         stop_trace_client/1
> > > > > >
> > > > > > (axd301@REDACTED)5> dbg:stop_trace_client(Pid).
> > > > > >
> > > > > > =ERROR REPORT==== 2-Feb-2004::12:53:03 ===
> > > > > > Error in process <0.30.0> on node 'axd301@REDACTED' with exit 
>value:
> > > > > > {badarg,[{erla
> > > > > >
> > > >
> > > 
> >ng,exit,[{badpid,<0.40.0>},abnormal]},{dbg,stop_trace_client,1},{erl_eval,do_app
> > > > > > ly,5},{shell,eval_loop,2}]}
> > > > > >
> > > > > > ** exited: {badarg,[{erlang,exit,[{badpid,<0.40.0>},abnormal]},
> > > > > >                     {dbg,stop_trace_client,1},
> > > > > >                     {erl_eval,do_apply,5},
> > > > > >                     {shell,eval_loop,2}]} **
> > > > > > (axd301@REDACTED)6>
> > > > > >
> > > >
> > > > _________________________________________________________________
> > > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> > > > http://join.msn.com/?page=features/junkmail
> > >
>
>This communication is confidential and intended solely for the 
>addressee(s). Any unauthorized review, use, disclosure or distribution is 
>prohibited. If you believe this message has been sent to you in error, 
>please notify the sender by replying to this transmission and delete the 
>message without disclosing it. Thank you.
>
>E-mail including attachments is susceptible to data corruption, 
>interruption, unauthorized amendment, tampering and viruses, and we only 
>send and receive e-mails on the basis that we are not liable for any such 
>corruption, interception, amendment, tampering or viruses or any 
>consequences thereof.
>

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail




More information about the erlang-questions mailing list