summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/ncab2clf.1
blob: 6e4fcd285583756f30e12f8748f90cdbfd20b027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
'\" te
.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
.\" 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.
.\" 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.
.\" 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]
.TH NCAB2CLF 1 "Sep 28, 2001"
.SH NAME
ncab2clf \- convert binary log file to Common Log File format
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/ncab2clf\fR [\fB-Dhv\fR] [\fB-i\fR \fIinput-file\fR] [\fB-o\fR \fIoutput-file\fR]
     [\fB-b\fR \fIsize\fR] [\fB-n\fR \fInumber\fR] [\fB-s\fR \fIdatetime\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBncab2clf\fR command is used to convert the log file generated by the
Solaris Network Cache and Accelerator ("\fBNCA\fR") from binary format, to
Common Log File ("\fBCLF\fR") format. If no \fIinput-file\fR is specified,
\fBncab2clf\fR uses \fBstdin\fR. If no \fIoutput-file\fR is specified, the
output goes to \fBstdout\fR.
.SH OPTIONS
.sp
.ne 2
.na
\fB\fB-b\fR\fR
.ad
.RS 18n
Specifies the binary-log-file blocking in kilobytes; the default is 64 Kbyte.
.RE

.sp
.ne 2
.na
\fB\fB-D\fR\fR
.ad
.RS 18n
Specifies that direct \fBI/O\fR be disabled.
.RE

.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 18n
Prints usage message.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIinput-file\fR\fR
.ad
.RS 18n
Specifies the input file.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR \fInumber\fR\fR
.ad
.RS 18n
Output \fInumber\fR CLF records.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR \fIoutput-file\fR\fR
.ad
.RS 18n
Specifies the output file.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR \fIdatetime\fR\fR
.ad
.RS 18n
Skip any records before the date and time specified in \fIdatetime\fR. You can
specify the date and time in CLF format or in the format specified by the
\fBtouch\fR(1) utility. CLF format is the dominant format, so \fBncab2clf\fR
first analyzes \fIdatetime\fR assuming CLF.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 18n
Provides verbose output.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRConverting a Binary File to a Common Log File Format
.sp
.LP
The following example converts the binary file \fB/var/nca/logs/nca.blf\fR to a
file \fB/var/nca/logs/nca.clf\fR, which is in Common Log File format.

.sp
.in +2
.nf
example% \fBncab2clf -D -i /var/nca/logs/nca.blf -o /var/nca/logs/nca.clf\fR
.fi
.in -2
.sp

.LP
\fBExample 2 \fRConverting Multiple Log Files
.sp
.LP
The following script may be used to convert multiple log files. The directory
designated by "\fB*\fR" must only contain log files.

.sp
.in +2
.nf
!/bin/ksh
for filename in *
do
    ncab2clf -D < $filename > $filename.clf
done
.fi
.in -2

.LP
\fBExample 3 \fRUsing \fB-s\fR and \fB-n\fR on a Raw Device
.sp
.LP
The following example shows how \fBncab2clf\fR can be used on a raw device. If
not using the \fB-n\fR option, the default is to convert all records from the
starting location to the end of the file. The date and time specified with
\fB-s\fR, below, is in CLF format.

.sp
.in +2
.nf
example% ncab2clf -s '10/Apr/2001:09:23:13' -n 100 < /dev/dsk/c2t1d0s6
.fi
.in -2
.sp

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR \fR
.ad
.RS 6n
The file converted successfully
.RE

.sp
.ne 2
.na
\fB>\fB0\fR\fR
.ad
.RS 6n
An error occurred.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.SH SEE ALSO
.sp
.LP
.BR nca (1),
.BR ncakmod (1),
.BR nca.if (5),
.BR ncakmod.conf (5),
.BR ncalogd.conf (5),
.BR attributes (7)
.sp
.LP
\fISystem Administration Guide: IP Services\fR
.SH NOTES
.sp
.LP
The binary log files generated by \fBNCA\fR can become very large. When
converting these large binary files, use the \fB-b\fR option to the
\fBncab2clf\fR command to help performance.
.sp
.LP
Direct \fBI/O\fR is a benefit to the user if the data being written does not
come in as large chunks. However, if the user wishes to convert the log file in
large chunks using the \fB-b\fR option, then direct \fBI/O\fR should be
disabled by using the \fB-D\fR option.