1 '\" te 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved 3 .\" 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. 4 .\" 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. 5 .\" 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] 6 .TH TNFXTRACT 1 "Aug 19, 2003" 7 .SH NAME 8 tnfxtract \- extract kernel probes output into a trace file 9 .SH SYNOPSIS 10 .LP 11 .nf 12 \fBtnfxtract\fR [\fB-d\fR \fIdumpfile\fR \fB-n\fR \fInamelist\fR] \fItnf_file\fR 13 .fi 14 15 .SH DESCRIPTION 16 .sp 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 .sp 44 .LP 45 The following options are supported: 46 .sp 47 .ne 2 48 .na 49 \fB\fB-d\fR \fIdumpfile\fR\fR 50 .ad 51 .RS 15n 52 Uses \fIdumpfile\fR as the system memory image, instead of the running kernel. 53 The \fIdumpfile\fR is normally the path name of a file generated by the 54 \fBsavecore\fR utility. 55 .RE 56 57 .sp 58 .ne 2 59 .na 60 \fB\fB-n\fR \fInamelist\fR\fR 61 .ad 62 .RS 15n 63 Uses \fInamelist\fR as the file containing the symbol table information for the 64 given \fIdumpfile\fR. 65 .RE 66 67 .SH OPERANDS 68 .sp 69 .LP 70 The following operand is supported: 71 .sp 72 .ne 2 73 .na 74 \fB\fItnf_file\fR\fR 75 .ad 76 .RS 12n 77 Output file generated by \fBtnfxtract\fR based on kernel trace output from an 78 in-core buffer in the Solaris kernel. 79 .RE 80 81 .SH EXAMPLES 82 .LP 83 \fBExample 1 \fRExtracting probes from a running kernel 84 .sp 85 .LP 86 Extract probes from the running kernel into \fBktrace.out\fR: 87 88 .sp 89 .in +2 90 .nf 91 example% \fBtnfxtract ktrace.out\fR 92 .fi 93 .in -2 94 .sp 95 96 .LP 97 \fBExample 2 \fRExtracting probes from a kernel crash dump 98 .sp 99 .LP 100 Extract probes from a kernel crash dump into \fBktrace.out\fR: 101 102 .sp 103 .in +2 104 .nf 105 example% \fBtnfxtract -d /var/crash/`uname -n`/vmcore.0 \e 106 -n /var/crash/`uname -n`/unix.0 ktrace.out\fR 107 .fi 108 .in -2 109 .sp 110 111 .SH EXIT STATUS 112 .sp 113 .LP 114 The following exit values are returned: 115 .sp 116 .ne 2 117 .na 118 \fB\fB0\fR\fR 119 .ad 120 .RS 6n 121 Successful completion. 122 .RE 123 124 .sp 125 .ne 2 126 .na 127 \fB\fB>0\fR\fR 128 .ad 129 .RS 6n 130 An error occurred. 131 .RE 132 133 .SH SEE ALSO 134 .sp 135 .LP 136 \fBprex\fR(1), \fBtnfdump\fR(1), \fBsavecore\fR(1M), 137 \fBtnf_kernel_probes\fR(4), \fBattributes\fR(5)