|
From: Mitch B. <wm...@ag...> - 2004-10-09 18:41:24
|
I was unable to find much documentation. Through trial and error and
source perusal, I came up with this recipe:
1) Open a Command Prompt or shell window and cd to the coLinux
directory, e.g. "cd c:\colinux"
2) To see a list of options:
colinux-debug-daemon -h
3) To see a list of "facility" names:
colinux-debug-daemon -d
(Type ^C to exit back to the cmd prompt.)
* "facilities" are different types of messages that the daemon can
capture. The current list of facility names is:
* misc, network, messages, prints, blockdev, allocations,
context_switch, pipe
* Each facility has an associated level number - higher numbers
capture more messages.
* See below for how to set the facility level
4) To capture and display some messages:
colinux-debug-daemon -d -p -f mylogfile.xml -s
network=11,blockdev=9
* "-d" makes it get the raw debug messages in real time from a
running colinux session. Without "-d", it gets the raw debug
messages from standard input, presumably from a
previously-captured file.
* "-p" makes it decode (parse) the raw debug messages and display
them in human-readable form (encapsulated in XML markup). Without
"-p", I presume that it just sends the raw debug messages to the
output, perhaps so you can capture them to a file in a compact
form for later inspection.
* "-f mylogfile.xml" makes it append the output to the file
"mylogfile.xml". Without "-f", it sends the output to standard
output. As far as I can tell, "-f filename" is equivalent to
">>filename".
* "-s network=11,blockdev=9" sets the "network" facility level to
11, thus capturing network messages sent at levels 0-11, and the
"blockdev" facility level to 9.
* To determine the desired facility level, either increase the
number (trial and error) until you see the level of detail you
need, or inspect the source code for the component you wish to
debug to see the level at which the desired messages are sent.
5) There is also a "-n ip-address" switch that will send the logs to
UDP port 63000 at the indicated IP address, instead of to standard
output or a file. I suspect, but am not entirely sure, that you can use
this feature either with or without the "-p" switch, thus sending either
raw or preparsed messages to the remote machine.
6) There is a python program to listen on port 63000 and write the logs
to a file. The python program is in the source tarball, in
src/colinux/user/debug/server.py
7) There is a python program to decode and display the XML-formatted
(preparsed) messages. It is in the source tarball, in
src/colinux/user/debug/dump.py . It is not strictly necessary to use
this program; the XML-formatted messages are in ASCII and are easy
enough to read directly.
8) The source code for colinux-debug-daemon is in the source tarball, in
src/colinux/user/debug/main.c
9) The source code for various other colinux helper daemons (i.e. the
things that ultimately send the debug messages) is in the source tarball
in various places. For example, the bridged network daemon source for
Windows is in src/colinux/os/winnt/user/conet-bridged-daemon/
10) Debug messages are sent by calls like the following:
co_debug_lvl(network, 13, "packet sent (0x%x written)\n",
write_size);
Hope this helps,
Mitch Bradley
Holger Krull wrote:
>> Actually if you use recent snapshots, they include an
>> colinux-debug-daemon,
>> which can be used to capture very detailed debug logs of things.
>
>
> Is there any description available on howto use the debug-daemon?
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
> more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> coLinux-users mailing list
> coL...@li...
> https://lists.sourceforge.net/lists/listinfo/colinux-users
|