Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tnfxtract(1) [opensolaris man page]

tnfxtract(1)							   User Commands						      tnfxtract(1)

NAME
tnfxtract - extract kernel probes output into a trace file SYNOPSIS
tnfxtract [-d dumpfile -n namelist] tnf_file DESCRIPTION
The tnfxtract utility collects kernel trace output from an in-core buffer in the Solaris kernel, or from the memory image of a crashed sys- tem, and generates a binary TNF trace file like those produced directly by user programs being traced. Either both or neither of the -d and -n options must be specified. If neither is specified, trace output is extracted from the running ker- nel. If both are specified, the -d argument names the file containing the (crashed) system memory image, and the -n argument names the file containing the symbol table for the system memory image. The TNF trace file tnf_file produced is exactly the same size as the in-core buffer; it is essentially a snapshot of that buffer. It is legal to run tnfxtract while kernel tracing is active, i.e., while the in-core buffer is being written. tnfxtract insures that the output file it generates is low-level consistent, that is, that only whole probes are written out, and that internal data structures in the buffer are not corrupted because the buffer is being concurrently written. The TNF trace file generated is suitable as input to tnfdump(1), which will generate an ASCII file. OPTIONS
The following options are supported: -d dumpfile Uses dumpfile as the system memory image, instead of the running kernel. The dumpfile is normally the path name of a file generated by the savecore utility. -n namelist Uses namelist as the file containing the symbol table information for the given dumpfile. OPERANDS
The following operand is supported: tnf_file Output file generated by tnfxtract based on kernel trace output from an in-core buffer in the Solaris kernel. EXAMPLES
Example 1 Extracting probes from a running kernel Extract probes from the running kernel into ktrace.out: example% tnfxtract ktrace.out Example 2 Extracting probes from a kernel crash dump Extract probes from a kernel crash dump into ktrace.out: example% tnfxtract -d /var/crash/`uname -n`/vmcore.0 -n /var/crash/`uname -n`/unix.0 ktrace.out EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtnfc | +-----------------------------+-----------------------------+ SEE ALSO
prex(1), tnfdump(1), savecore(1M), tnf_kernel_probes(4), attributes(5) SunOS 5.11 19 Aug 2003 tnfxtract(1)

Check Out this Related Man Page

tnfctl_buffer_alloc(3TNF)				       TNF Library Functions					 tnfctl_buffer_alloc(3TNF)

NAME
tnfctl_buffer_alloc, tnfctl_buffer_dealloc - allocate or deallocate a buffer for trace data SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ] #include <tnf/tnfctl.h> tnfctl_errcode_t tnfctl_buffer_alloc(tnfctl_handle_t *hndl, const char *trace_file_name, size_t trace_buffer_size); tnfctl_buffer_dealloc(tnfctl_handle_t *hndl); DESCRIPTION
tnfctl_buffer_alloc() allocates a buffer to which trace events are logged. When tracing a process using a tnfctl handle returned by tnfctl_pid_open(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), and tnfctl_internal_open(3TNF)), trace_file_name is the name of the trace file to which trace events should be logged. It can be an absolute path specification or a relative path specification. If it is relative, the current working directory of the process that is calling tnfctl_buffer_alloc() is prefixed to trace_file_name. If the named trace file already exists, it is overwritten. For kernel tracing, that is, for a tnfctl handle returned by tnfctl_kernel_open(3TNF), trace events are logged to a trace buffer in memory; therefore, trace_file_name is ignored. Use tnfxtract(1) to extract a kernel buffer into a file. trace_buffer_size is the size in bytes of the trace buffer that should be allocated. An error is returned if an attempt is made to allocate a buffer when one already exists. tnfctl_buffer_alloc() affects the trace attributes; use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after a buffer is allocated. tnfctl_buffer_dealloc() is used to deallocate a kernel trace buffer that is no longer needed. hndl must be a kernel handle, returned by tnfctl_kernel_open(3TNF). A process's trace file cannot be deallocated using tnfctl_buffer_dealloc(). Instead, once the trace file is no longer needed for analysis and after the process being traced exits, use rm(1) to remove the trace file. Do not remove the trace file while the process being traced is still alive. tnfctl_buffer_dealloc () affects the trace attributes; use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after a buffer is deallocated. For a complete discussion of tnf tracing, see tracing(3TNF). RETURN VALUES
tnfctl_buffer_alloc() and tnfctl_buffer_dealloc() return TNFCTL_ERR_NONE upon success. ERRORS
The following error codes apply to tnfctl_buffer_alloc(): TNFCTL_ERR_BUFEXISTS A buffer already exists. TNFCTL_ERR_ACCES Permission denied; could not create a trace file. TNFCTL_ERR_SIZETOOSMALL The trace_buffer_size requested is smaller than the minimum trace buffer size needed. Use trace_min_size of trace attributes in tnfctl_trace_attrs_get(3TNF) to determine the minimum size of the buffer. TNFCTL_ERR_SIZETOOBIG The requested trace file size is too big. TNFCTL_ERR_BADARG trace_file_name is NULL or the absolute path name is longer than MAXPATHLEN. TNFCTL_ERR_ALLOCFAIL A memory allocation failure occurred. TNFCTL_ERR_INTERNAL An internal error occurred. The following error codes apply to tnfctl_buffer_dealloc(): TNFCTL_ERR_BADARG hndl is not a kernel handle. TNFCTL_ERR_NOBUF No buffer exists to deallocate. TNFCTL_ERR_BADDEALLOC Cannot deallocate a trace buffer unless tracing is stopped. Use tnfctl_trace_state_set(3TNF) to stop trac- ing. TNFCTL_ERR_INTERNAL An internal error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtnfc | +-----------------------------+-----------------------------+ |MT Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
prex(1), rm(1), tnfxtract(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), tnfctl_inter- nal_open(3TNF), tnfctl_kernel_open(3TNF), tnfctl_pid_open(3TNF), tnfctl_trace_attrs_get(3TNF), tracing(3TNF), attributes(5) SunOS 5.10 4 Mar 1997 tnfctl_buffer_alloc(3TNF)
Man Page