1 '\" te
   2 .\"  Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved
   3 .\"  Copyright 2017 Nexenta Systems, Inc. All Rights Reserved.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH TNFXTRACT 1 "Feb 13, 2017"
   8 .SH NAME
   9 tnfxtract \- extract kernel probes output into a trace file
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBtnfxtract\fR [\fB-d\fR \fIdumpfile\fR \fB-n\fR \fInamelist\fR] \fItnf_file\fR
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .LP
  18 The \fBtnfxtract\fR utility collects kernel trace output from an in-core buffer
  19 in the Solaris kernel, or from the memory image of a crashed system, and
  20 generates a binary \fBTNF\fR trace file like those produced directly by user
  21 programs being traced.
  22 .sp
  23 .LP
  24 Either both or neither of the \fB-d\fR and \fB-n\fR options must be specified.
  25 If neither is specified, trace output is extracted from the running kernel. If
  26 both are specified, the \fB-d\fR argument names the file containing the
  27 (crashed) system memory image, and the \fB-n\fR argument names the file
  28 containing the symbol table for the system memory image.
  29 .sp
  30 .LP
  31 The \fBTNF\fR trace file \fItnf_file\fR produced is exactly the same size as
  32 the in-core buffer; it is essentially a snapshot of that buffer.  It is legal
  33 to run \fBtnfxtract\fR while kernel tracing is active, i.e., while the in-core
  34 buffer is being written. \fBtnfxtract\fR insures that the output file it
  35 generates is low-level consistent, that is, that only whole probes are written
  36 out, and that internal data structures in the buffer are not corrupted because
  37 the buffer is being concurrently written.
  38 .sp
  39 .LP
  40 The \fBTNF\fR trace file generated is suitable as input to \fBtnfdump\fR(1),
  41 which will generate an \fBASCII\fR file.
  42 .SH OPTIONS
  43 .LP
  44 The following options are supported:
  45 .sp
  46 .ne 2
  47 .na
  48 \fB\fB-d\fR \fIdumpfile\fR\fR
  49 .ad
  50 .RS 15n
  51 Uses \fIdumpfile\fR as the system memory image, instead of the running kernel.
  52 The \fIdumpfile\fR is normally the path name of a file generated by the
  53 \fBsavecore\fR utility.
  54 .RE
  55 
  56 .sp
  57 .ne 2
  58 .na
  59 \fB\fB-n\fR \fInamelist\fR\fR
  60 .ad
  61 .RS 15n
  62 Uses \fInamelist\fR as the file containing the symbol table information for the
  63 given \fIdumpfile\fR.
  64 .RE
  65 
  66 .SH OPERANDS
  67 .LP
  68 The following operand is supported:
  69 .sp
  70 .ne 2
  71 .na
  72 \fB\fItnf_file\fR\fR
  73 .ad
  74 .RS 12n
  75 Output file generated by \fBtnfxtract\fR based on kernel trace output from an
  76 in-core buffer in the Solaris kernel.
  77 .RE
  78 
  79 .SH EXAMPLES
  80 .LP
  81 \fBExample 1 \fRExtracting probes from a running kernel
  82 .sp
  83 .LP
  84 Extract probes from the running kernel into \fBktrace.out\fR:
  85 
  86 .sp
  87 .in +2
  88 .nf
  89 example% \fBtnfxtract ktrace.out\fR
  90 .fi
  91 .in -2
  92 .sp
  93 
  94 .LP
  95 \fBExample 2 \fRExtracting probes from a kernel crash dump
  96 .sp
  97 .LP
  98 Extract probes from a kernel crash dump into \fBktrace.out\fR:
  99 
 100 .sp
 101 .in +2
 102 .nf
 103 example% \fBtnfxtract -d /var/crash/data/UUID/core.0 \e
 104    -n /var/crash/data/UUID/unix.0 ktrace.out\fR
 105 .fi
 106 .in -2
 107 .sp
 108 
 109 .SH EXIT STATUS
 110 .LP
 111 The following exit values are returned:
 112 .sp
 113 .ne 2
 114 .na
 115 \fB\fB0\fR\fR
 116 .ad
 117 .RS 6n
 118 Successful completion.
 119 .RE
 120 
 121 .sp
 122 .ne 2
 123 .na
 124 \fB\fB>0\fR\fR
 125 .ad
 126 .RS 6n
 127 An error occurred.
 128 .RE
 129 
 130 .SH SEE ALSO
 131 .LP
 132 \fBprex\fR(1), \fBtnfdump\fR(1), \fBsavecore\fR(1M),
 133 \fBtnf_kernel_probes\fR(4), \fBattributes\fR(5)