The Web server consists of multiple modules#, and these modules consist of multiple functions to be executed at a specific time. Module trace information indicates the trace information collected when functions in modules and CGI programs are executed. The specifications for module trace information collection, such as the destination of the module trace information collection, is changed depending on whether the HWSRequestLog directive is specified.
#: Modules refer to both external modules, which are dynamically embedded and used by using the LoadModule directive in Web server, and internal modules, which are included in the httpsd execution file.
The following table describes the trace target of module trace:
Table 4-3 Trace target of module trace
Trace target | Triggers |
---|---|
Modules | Modules consist of multiple functions. These functions are classified into functions for initialization processes and functions for request handling processes. The trace information of functions for request handling processes is collected. |
CGI programs | Collect the trace when the CGI programs are running. |
When the HWSRequestLog directive is not specified, module trace information is collected and placed in the file specified in the ErrorLog directive according to the specification of the LogLevel directive.
When the HWSRequestLog directive is specified, module trace information is collected and placed in the file specified in the HWSRequestLog directive according to the specification of the HWSRequestLogType directive.
The level of the module trace information to be collected can be changed according to the LogLevel directive or the HWSRequestLogType directive. The contents of the trace information collected at each level are as described below.
The trace information for external modules and CGI programs which might cause a failure is collected.
When you specify either info in the LogLevel directive or module-info in the HWSRequestLogType directive, the trace information is collected.
In addition to info-level trace information, trace information for internal modules, which run for each request, are collected.
When you specify either debug in the LogLevel directive or module-debug in the HWSRequestLogType directive, trace information is collected.
The following are output items of module trace:
Note that hereafter, the Servere-process-ID will be the Server-thread-ID for Windows.
[Time] |
[Time] |
Table 4-4 Relationship between function offsets and the functions
Function offset | Function name | Meaning |
---|---|---|
[0] | create_request | Executing the request start process. |
[1] | post_read_request | Executing the process after reading the request. |
[2] | quick_handler | Executing the process before changing the requested URL. |
[3] | translate_name | Executing the process to change the actual file name from the requested URL. |
[4] | map_to_storage | Executing the request process that does not involve disk access. |
[5] | header_parser | Executing the process to analyze the request header. |
[6] | access_checker | Checking the access permission by the host name, and the IP address for the URL requested from an authenticated user. |
[7] | check_user_id | Checking the user ID. |
[8] | auth_checker | Checking the access permission (Require) for the URL requested from an authenticated user. |
[9] | type_checker | Checking the MIME type. |
[10] | fixups | Executing the process before request execution. |
[11] | insert_filter | Executing the filter insertion process. |
[12] | handler | Executing handler. |
[13] | insert_error_filter | Executing the process before responding to error. |
[14] | log_transaction | Executing the log output process. |
[15] | error_log | Executing the process after error log output. |
[16] | get_suexec_identity | Executing the process to acquire the user information. |
[Fri Jul 15 17:29:43 2005] [info] hws : module --> (mod_example.c[1])(1864) |
[Time] |
[Time] |
[Fri Jul 15 17:29:43 2005] [debug] request.c(69): hws : module --> (mod_alias.c[3])(1864) |
[Time] |
[Time] |
[Fri Jul 15 19:48:08 2012] [info] hws : cgi --> (exec=<Cosminexus-installation-directory>/httpsd/cgi-bin/isindex)(argv0=isindex)(args=aaa+bbb+ccc)(1784)(1144) |
An example to output info-level module trace information and request trace information to the request log is as follows:
HWSRequestLogType module-info request |
[Fri Jul 15 10:29:29 2005] [info] hws : module --> (mod_example.c[1])(1800) |
[Fri Jul 15 19:48:39 2012] [info] hws : cgi --> (exec=<Cosminexus-installation-directory>/httpsd/cgi-bin/test-sleep)(argv0=test-sleep)(1800)(2276) |