File: debug.html

package info (click to toggle)
cherokee 0.7.2-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,808 kB
  • ctags: 6,577
  • sloc: ansic: 45,071; python: 9,628; sh: 9,468; makefile: 1,639; xml: 61; perl: 32
file content (62 lines) | stat: -rw-r--r-- 2,804 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
    <title>Debugging Cherokee</title>
    <link href="media/css/documentation.css" type="text/css" rel="stylesheet" />
</head>

<body>
    
    
    <h1>Debugging Cherokee</h1>
    
    <p>If you need to debug the behavior of the web server (or an application), there
are some helpful tools available for you.</p>
<ul>
<li><p class="first">To start with, if you are using gcc and you want to compile Cherokee
with debug information just execute make like this:</p>
<pre class="literal-block">
make CFLAGS=&quot;-O0 -g3&quot;
</pre>
<p>And then you'll be able to execute gdb, cgdb, gdbtui..</p>
</li>
<li><p class="first">You can use autoconf to set up Cherokee to use static modules:</p>
<pre class="literal-block">
./autogen.sh --localstatedir=/var --prefix=/usr --sysconfdir=/etc \
--with-wwwroot=/var/www --enable-static-module=all --enable-static --enable-shared=no
</pre>
</li>
<li><p class="first">You can also enable a new cool feature: CHEROKEE_TRACE, which will let you trace the
behavior with a human-readable output:</p>
<pre class="literal-block">
--enable-trace
</pre>
</li>
</ul>
<p>Now, when you are going to launch the web server, just add the CHEROKEE_TRACE variable,
with the desired options:</p>
<pre class="literal-block">
cherokee# CHEROKEE_TRACE=&quot;common&quot; cherokee
Cherokee Web Server 0.7.0 (May 21 2008): Listening on port 80, TLS disabled
IPv6 enabled, using epoll, 1024 fds system limit, max. 507 connections
5 threads, 206 fds per thread, standard scheduling policy
handler_common.c:0143 (                     stat_file): /var/www//images/powered_by_cherokee.png, use_iocache=0 re=0
handler_common.c:0190 (   cherokee_handler_common_new): request: '/images/powered_by_cherokee.png', local: '/var/www//images/powered_by_cherokee.png', exists 1
handler_common.c:0236 (   cherokee_handler_common_new): going for handler_file
handler_common.c:0143 (                     stat_file): /var/www//images/default-bg.png, use_iocache=0 re=0
handler_common.c:0190 (   cherokee_handler_common_new): request: '/images/default-bg.png', local: '/var/www//images/default-bg.png', exists 1
handler_common.c:0236 (   cherokee_handler_common_new): going for handler_file
handler_common.c:0143 (                     stat_file): /var/www//images/cherokee-logo.png, use_iocache=0 re=0
handler_common.c:0190 (   cherokee_handler_common_new): request: '/images/cherokee-logo.png', local: '/var/www//images/cherokee-logo.png', exists 1
handler_common.c:0236 (   cherokee_handler_common_new): going for handler_file
</pre>
<p>Of course, you can trace all the modules (handlers, loggers..) you need:</p>
<pre class="literal-block">
CHEROKEE_TRACE=&quot;common,static,io_cache&quot; /usr/bin/cherokee
CHEROKEE_TRACE=&quot;all&quot; /usr/bin/cherokee
</pre>

    

    
</body>
</html>