Troubleshooting Tools Based on Operating System

Command-line utility to verify that a memory dump file has been created correctly. This tool is included in the Debugging Tools for Windows download available from the Microsoft website, see Collect Crash Dumps on Windows.

msdev debugger

Command-line utility that can be used to launch Visual C++ and the Win32 debugger

Windows debugger can be used to debug Windows applications or crash dumps. This tool is included in the Debugging Tools for Windows download available from the Microsoft website, see Collect Crash Dumps on Windows.

/Md and /Mdd compiler options

Compiler options that automatically include extra support for tracking memory allocations

Table 2-8 describes some troubleshooting tools introduced or improved in Linux operating system version 10.

Not all distributions provide this tool by default; therefore, you might have to download it from Open Source downloads.

mtrace and muntrace

GNU malloc tracer

proc tools such as pmap and pstack

Some, but not all, of the proc tools on Oracle Solaris operating system have equivalent tools on Linux. Core file support is not as good for Linux as for Oracle Solaris operating system; for example, pstack does not work for core dumps

Introduced in Oracle Solaris 10 operating system, DTrace is a dynamic tracing compiler and tracing utility. It can perform dynamic tracing of kernel functions, system calls, and user functions. This tool allows arbitrary, safe scripting to be executed at entry, exit, and other probe points. The script is written in C-like but safe pointer semantics language called the D programming language. See also DTrace Tool.

gcore

Force a core dump of a process. The process continues after the core dump is written.

intrstat

Report statistics on CPU consumed by interrupt threads.

iostat

Report I/O statistics.

libumem

Introduced in Oracle Solaris 9 operating system update 3, this library provides fast, scalable object-caching memory allocation and extensive debugging support. The tool can be used to find and fix memory management bugs, see Find Leaks with libumem Tool.

mdb

Modular debugger for kernel and user applications and crash dumps

netstat

Display the contents of various network-related data structures.

pargs

Print process arguments, environment variables, or the auxiliary vector. Long output is not truncated as it would be by other commands, such as ps.

Print memory layout of a process or core file, including heap, data, and text sections. Starting with Oracle Solaris 10, stack segments are clearly identified with the text [stack] along with the thread ID. See also Improvements to pmap Tool.

Display most CPU-intensive processes. This tool is available as freeware for Oracle Solaris operating system but is not installed by default.

trapstat

Display runtime trap statistics. (SPARC only)

truss

Trace entry and exit events for system calls, user-mode functions, and signals; optionally stop the process at one of these events. This tool also prints the arguments of system calls and user functions.