'\" 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(5) 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 \fBnca\fR(1), \fBncakmod\fR(1), \fBnca.if\fR(4), \fBncakmod.conf\fR(4), \fBncalogd.conf\fR(4), \fBattributes\fR(5) .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.