ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Intro.pod
(Generate patch)

Comparing AnyEvent-MP/MP/Intro.pod (file contents):
Revision 1.34 by root, Mon Aug 31 17:49:02 2009 UTC vs.
Revision 1.35 by root, Mon Aug 31 17:54:22 2009 UTC

168you try to connect with each other!> 168you try to connect with each other!>
169 169
170Thats is all for now, you will find some more advanced fiddling with the 170Thats is all for now, you will find some more advanced fiddling with the
171C<aemp> utility later. 171C<aemp> utility later.
172 172
173=head2 Shooting the Trouble
174
175Sometimes things go wrong, and AnyEvent::MP, being a professional module,
176does not gratitiously spill out messages to your screen.
177
178To help troubleshooting any issues, there are two environment variables
179that you can set. The first, C<PERL_ANYEVENT_MP_WARNLEVEL> sets the
180logging level. The default is C<5>, which means nothing much is
181printed. Youc an increase it to C<8> or C<9> to get more verbose
182output. This is example output when starting a node:
183
184 2009-08-31 19:51:50 <8> node anon/5RloFvvYL8jfSScXNL8EpX starting up.
185 2009-08-31 19:51:50 <7> starting global service.
186 2009-08-31 19:51:50 <9> 10.0.0.17:4040 connected as ruth
187 2009-08-31 19:51:50 <7> ruth is up ()
188 2009-08-31 19:51:50 <9> ruth told us it knows about {"doom":["10.0.0.5:45143"],"rain":["10.0.0.19:4040"],"anon/4SYrtJ3ft5l1C16w2hto3t":["10.0.0.1:45920","[2002:58c6:438b:20:21d:60ff:fee8:6e36]:35788","[fd00::a00:1]:37104"],"frank":["10.0.0.18:4040"]}.
189 2009-08-31 19:51:50 <9> connecting to doom with [10.0.0.5:45143]
190 2009-08-31 19:51:50 <9> connecting to anon/4SYrtJ3ft5l1C16w2hto3t with [10.0.0.1:45920 [2002:58c6:438b:20:21d:60ff:fee8:6e36]:35788 [fd00::a00:1]:37104]
191 2009-08-31 19:51:50 <9> ruth told us its addresses (10.0.0.17:4040).
192
193A lot of info, but at least you can see that it does something.
194
195The other environment variable that can be useful is
196C<PERL_ANYEVENT_MP_TRACE>, which, when set to a true value, will cause
197most messages that are sent or received to be printed. In the above
198example you would see something like:
199
200 SND ruth <- ["addr",["10.0.0.1:49358","[2002:58c6:438b:20:21d:60ff:fee8:6e36]:58884","[fd00::a00:1]:45006"]]
201 RCV ruth -> ["","AnyEvent::MP::_spawn","20QA7cWubCLTWUhFgBKOx2.x","AnyEvent::MP::Global::connect",0,"ruth"]
202 RCV ruth -> ["","mon1","20QA7cWubCLTWUhFgBKOx2.x"]
203 RCV ruth -> ["20QA7cWubCLTWUhFgBKOx2.x","addr",["10.0.0.17:4040"]]
204 RCV ruth -> ["20QA7cWubCLTWUhFgBKOx2.x","nodes",{"doom":["10.0.0.5:45143"],"rain":["10.0.0.19:4040"],"anon/4SYrtJ3ft5l1C16w2hto3t":["10.0.0.1:45920","[2002:58c6:438b:20:21d:60ff:fee8:6e36]:35788","[fd00::a00:1]:37104"],"frank":["10.0.0.18:4040"]}]
173 205
174=head1 PART 1: Passing Messages Between Processes 206=head1 PART 1: Passing Messages Between Processes
175 207
176=head2 The Receiver 208=head2 The Receiver
177 209

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines