Changes between Version 2 and Version 3 of ServerDebug


Ignore:
Timestamp:
Jul 6, 2007, 10:20:10 AM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ServerDebug

    v2 v3  
    88Most error conditions are reported in the log files. Make sure you know where these are. If you're interested in the history of a particular WU or result, grep for WU!#12345 or RESULT!#12345 (12345 represents the ID) in the log files. The html/ops pages also provide an interface for this.
    99
    10 == Database query tracing ==
     10== Debugging the scheduler ==
    1111
    12 If you uncomment the symbol SHOW_QUERIES in db/db_base.C, and recompile everything, all database queries will be written to stderr (for daemons, this goes to log files; for command-line apps it's written to your terminal). This is verbose but extremely useful for tracking down database-level problems.
    13 == Getting core dumps from the scheduler ==
    14 
    15 In sched/main.C put:
    16 
    17 {{{
    18 #define DUMP_CORE_ON_SEGV 1
    19 }}}
    20 and recompile.
    21 
    22 == Running the scheduler under a debugger ==
    23 
    24 The scheduler is a CGI program. It reads from stdin and writes to stdout, so you can also run it with a command-line debugger like gdb:
    25  * Copy the "scheduler_request_X.xml" file from a client to the    machine running the scheduler.  (X = your project URL)
     12The scheduler is a CGI program;
     13it reads a request from stdin and writes a reply to stdout.
     14You can run it with a command-line debugger like gdb:
     15 * Copy the "scheduler_request_X.xml" file from a client to the machine running the scheduler. (X = your project URL)
    2616 * Run the scheduler under the debugger, giving it this file as stdin,    i.e.:
    2717{{{
     
    3424update host set rpc_seqno=0, rpc_time=0 where hostid=N
    3525}}}
    36  to keep the scheduler from rejecting the request.
     26to keep the scheduler from rejecting the request.
    3727
    3828This is useful for figuring out why your project is generating 'no work available' messages.  As an alternative to this, edit handle_request.C, and put a call to debug_sched(sreq, sreply, "../debug_sched") just before sreply.write(fout). Then, after recompiling, touch a file called 'debug_sched' in the project root directory. This will cause transcripts of all subsequent scheduler requests and replies to be written to the cgi-bin/ directory with separate small files for each request.  The file names are sched_request_H_R where H=hostid and R=rpc sequence number. This can be turned off by deleting the 'debug_sched' file.
     29
     30To get core files for scheduler crashes, put
     31{{{
     32#define DUMP_CORE_ON_SEGV 1
     33}}}
     34in sched/main.C, and recompile.
    3935
    4036== MySQL interfaces ==
     
    4541 * MySQLadmin: general-purpose web interface to MySQL
    4642
     43== Database query tracing ==
     44
     45If you uncomment the symbol SHOW_QUERIES in db/db_base.C, and recompile everything, all database queries will be written to stderr (for daemons, this goes to log files; for command-line apps it's written to your terminal). This is verbose but extremely useful for tracking down database-level problems.
     46