(Note: The version of this module for IHS 1.3 is described here.)
Enable this module only when gathering information for a suspected IHS or application problem related to the data which is sent between the web server and the client.
Copy mod_net_trace.so for your platform to the modules directory in the web server installation location (e.g., to /usr/IBMIHS/modules).
Use the following LoadModule directive and use the NetTraceFile and NetTrace directives to tailor mod_net_trace to your environment.
LoadModule net_trace_module modules/mod_net_trace.so
Add the following to httpd.conf, replacing 111.222.333.444 with the IP address of the client that will recreate the problem.
LoadModule net_trace_module modules/mod_net_trace.so <IfModule mod_net_trace.c> NetTraceFile /tmp/nettrace NetTrace client 111.222.333.444 dest file event senddata=100000 event recvdata=100000 (entire NetTrace directive on one line) </IfModule>
If more than 100,000 bytes of sent or received data needs to be collected, adjust the senddata and recvdata parameters as necessary.
Comment out the LoadModule directive for mod_net_trace.
logs/trace
. You can use this
this directive with a full path or a path relative to the server root
to specify where you want traced data to be stored.
This only affects data traced due to rules that specified dest
file
.
*
to match all clients or
ip-address to match a particular client or
ip-address/num-prefix-bits to match particular subnets. It
only works with numeric IP addresses (IPv4 or IPv6).
You shouldn't code client
more than once.
dest
:
Data will be written to the file specified by the
NetTraceFile
directive.
Data will be stored in memory.
The memory is released at the end of the connection, but if the server crashes while processing a request on the connection the data will be available in the core dump for debugging.
Data will be written to the server error log. The priority is
notice, so the trace records will be written regardless
of the value of the LogLevel
directive.
This is only useful in some limited test scenarios.
event
:
senddata[=bytelimit]
Capture data sent by IHS. The default bytelimit (limit on how much sent data will be captured on a connection) is 1024. Note: file contents sent via apr_sendfile() will not be traced.
recvdata[=bytelimit]
Capture data received by IHS. The default bytelimit (limit on how much received data will be captured on a connection) is 1024.
misccalls
Trace miscellaneous socket calls (e.g., apr_socket_close(), apr_socket_timeout_set(), etc.).
NetTrace client 9.0.0.0/8 dest file dest memory event \ senddata event recvdata=4096 serverport 8080 NetTrace client 127.0.0.1 dest errlog event recvdata=4096 NetTraceFile /tmp/netrFor requests received from client 127.0.0.1 (loopback), the first 4096 bytes of data received (but none of the data sent) will be written to the Apache/IHS error log.
For requests received from the 9.0.0.0/8 subnet with server port 8080, the first 1024 bytes of data sent and the first 4096 bytes of data received will be written to the file /tmp/netr and will be kept in memory for analysis in case a core dump is subsequently generated during the processing of the connection.