Sun Gathering Debug Data for Sun Java System Directory Server 5

ProcedureTo Collect Required Debug Data For an Unresponsive or Hung Directory Server Process

This procedure describes what data to collect when Directory Server is still running, but is no longer responding to client application requests.

Collect the data describe in this procedure while the server is hanging.

  1. Note the time during which the hang is seen to occur.

  2. Collect information about the port used during the hang.

    UNIX and Linux

    netstat -an | grep ds-port

    Windows

    netstat -an

  3. Collect statistics about the system running Directory Server.

    Solaris OS

    ps -aux | grep server-root

    vmstat 5 5

    iostat -x

    top

    uptime

    HP-UX

    ps -aux | grep server-root

    vmstat 5 5

    iostat -x

    top

    sar

    Red Hat

    ps -aux | grep server-root

    vmstat 5 5

    top

    uptime

    sar

    Windows

    Get the process ID using the tlist.exe command, then get process details using the same command.

    win-dbg-root\tlist.exe pid

  4. Collect swap information.

    Solaris OS

    swap -l

    HP-UX

    swapinfo

    Red Hat

    free

    Windows

    Already provided in C:\report.txt.

  5. On Solaris systems, collect output from pstack and pmap five times, once every ten seconds.

    pstack pid

    pmap -x pid

  6. Get output showing system calls during the hang, by letting each of the commands listed here run for about a minute, then stopping them by typing Control-C.

    Solaris OS

    truss -ealf -rall -wall -vall -o /tmp/truss.out -p pid

    HP-UX

    tusc -v -fealT -rall -wall -o /tmp/truss.out -p pid

    Red Hat

    strace -fv -o /tmp/strace.out -p pid

    Windows

    Use Debug View.

    DebugView is available at http://www.sysinternals.com/Utilities/DebugView.html.

  7. Collect core files or crash dumps, and related command output.

    When the server is hanging, attempt to get several core files that show the state of the server threads over time. You can do this by generating a core file, changing the name of the core file, waiting 30 seconds to a minute, and generating another core file. Repeat the process at least once to get a minimum of three sets of core files and related data.

    Solaris OS

    cd server-root/bin/slapd/server

    gcore -o /tmp/directory-core pid

    pstack /tmp/directory-core

    For each core file on Solaris OS, collect output from the following commands.

    cd server-root/bin/slapd/server

    file core-file

    pstack core-file

    pmap core-file

    pflags core-file

    For at least one of the core files on Solaris OS, collect output from the pkg_app script.

    ./pkg_app.ksh pid /tmp/directory-core

    Here, pid is the server process ID number. See To Run the pkg_app Script for instructions on using pkg_app.

    HP-UX

    cd server-root/bin/slapd/server

    If you have the patches PHKL_31876 and PHCO_32173 patches installed, generate the core file using the gcore command.

    gcore -p pid

    Otherwise, use the gdb command to generate the core file.

    gdb

    (gdb) attach pid

    Attaching to process pid

    No executable file name was specified

    (gdb) dumpcore

    Dumping core to the core file core.pid

    (gdb) quit

    The program is running. Quit anyway (and detach it)? (y or n) y

    Detaching from program: , process pid

    Red Hat

    cd server-root/bin/slapd/server

    gdb

    (gdb) attach pid

    Attaching to process pid

    No executable file was specified

    (gdb) gcore

    Saved corefile core.pid

    (gdb) backtrace

    (gdb) quit

    Windows

    win-dbg-root\tlist.exe

    win-dbg-root\adplus.vbs -hang -p pid -o C:\dump-dir

    Collect everything in the folder under C:\dump-dir.

  8. Collect output from idsktune.

    The idsktune command provides information on system parameters, patch level, tuning recommendations, and so forth. The command is described in the product documentation.

    server-root/bin/slapd/server/idsktune