Debian Codegraph @

man/man1/rasplit.1

raw
1 .\"
2 .\" Argus-5.0 Software
3 .\" Copyright (c) 2000-2024 QoSient, LLC
4 .\" All rights reserved.
5 .\"
6 .\"
7 .TH RASPLIT 1 "12 August 2023" "rasplit 5.0.3"
8 .SH NAME
9 \fBrasplit\fP \- split \fBargus(8)\fP data.
10 .SH SYNOPSIS
11 .B rasplit
12 [[\fB\-M\fP \fIsplitmode\fP] [\fIsplitmode options\fP]]
13 [\fBraoptions\fP] [\fB--\fP \fIfilter-expression\fP]
14 .SH DESCRIPTION
15 .IX "rasplit command" "" "\fBrasplit\fP \(em argus data"
16 .LP
17 \fBRasplit\fP reads
18 .BR argus
19 data from an \fIargus-data\fP source, and splits the resulting
20 output into consecutive sections of records based on size, count
21 time, or flow event, writing the output into a set of output-files.
22 By default, \fBrasplit\fP puts 10,000 records of input into each
23 \fBargus\fP output file, or standard out.
24
25 The output files' name consists of a prefix, which is specified using
26 the \fI-w\fP \fIra option\fP, and a suffix, which is created for each
27 resulting file. If no prefix is provided, then \fBrasplit\fP will
28 use 'x' as the default prefix. The suffix that is used is determined
29 by the mode of operation. When \fBrasplit\fP is using the default
30 count mode or the size mode, the suffix is a group of letters 'aa',
31 \'ab\', and so on, such that concatenating the output files in sorted
32 order by file name produces the original input file. If \fBrasplit\fP
33 will need to create more output files than are allowed by the default
34 suffix strategy, more letters will be added, in order to accomodate
35 the needed files. When the mode is \fBtime\fP mode, the default
36 output filename suffix is '%Y.%m.%d.%h.%m.%s', which is used by
37 strftime() to create an output filename that is time oriented.
38 This default is overrided by adding a '%' extension to the name
39 provided on the commandline using the \fI-w\fP option.
40
41 When standard out is specified, using \fI-w -\fP, \fBrasplit\fP
42 will output a single \fBargus-stream\fP with START and STOP argus management
43 records inserted appropriately to indicate where the output is split.
44 See \fBargus(8)\fP for more information on output stream formats.
45
46 When \fBrasplit\fP is spliting on output record count (the default), the
47 number of records is specified as an ordinal counter, the default is
48 10,000 records. When \fBrasplit\fP is spliting based on the maximum output
49 file size, the size is specified as bytes. The scale of the bytes can be
50 specified by appending 'b', 'k' and 'm' to the number provided.
51
52 When \fBrasplit\fP is spliting based on time, the time period is specified
53 with the option, and can be any period based in seconds (s), minutes (m),
54 hours (h), days (d), weeks (w), months (M) or years (y). \fBRasplit\fP
55 will create and modify records as required to split on prescribed time
56 boundaries. If any record spans a time boundary, the record is split
57 and the metrics are adjusted using a uniform distribution model to
58 distribute the statistics between the two records. Care is taken to
59 avoid records with zero packet and byte counts, that could result
60 from roundoff error.
61
62 When \fBrasplit\fP is spliting based on flow event, the flow that acts
63 as the event marker is specified using a standard \fBra\fP filter
64 expression, that is bounded by quotes ("). Records that preceed the
65 first flow event in the data stream are written to the specified
66 output file, and then new files are generated with the flow event
67 record being the first record of the new file. This method will allow
68 you to use wire events as triggers for spliting data.
69
70 .SH RASPLIT SPECIFIC OPTIONS
71 Rasplit, like all ra based clients, supports
72 a number of \fBra options\fP including remote data access, reading
73 from multiple files and filtering of input argus records through a
74 terminating filter expression.
75 \fBrasplit(1)\fP specific options are:
76 .TP 5
77 .BI \-a "\| suffix length\^"
78 default is 2 characters.
79 .TP 5
80 .BI \-d
81 Toggle running as a deamon.
82 .TP 5
83 .BI \-M "\| splitmode\^"
84 Supported spliting modes are:
85 .nf
86 \fB count <num>\fP
87 \fB size <size>\fP
88 \fB time <period>\fP
89 \fB flow "filter-expression"\fP
90 .fi
91 .TP 5
92 .BI \-w "\| filename\^"
93 \fBRasplit\fP supports an extended \fI-w\fP option that allows for
94 output record contents to be inserted into the output filename.
95 Specified using '$' (dollar) notation, any printable field can be used.
96 Care should be taken to honor any shell escape requirements when
97 specifying on the command line. See \fBra(1)\fP for the list of
98 printable fields.
99
100 Another extended feature, when using \fBtime\fP mode, \fBrasplit\fP
101 will process the supplied filename using \fBstrftime(3)\fP, so that
102 time fields can be inserted into the resulting output filename.
103
104 .SH INVOCATION
105 This invocation reads \fBargus(8)\fP data from \fBinputfile\fP and splits
106 the \fBargus(8)\fP data stream based on output file size of no greater
107 than 1 Megabyte. The resulting output files have a prefix of \fIargus.\fP
108 and suffix that starts with 'aa'. The single trailing '.' is significant.
109 .nf
110
111 \fBrasplit\fP -r inputfile -M size 1m -w argus.
112
113 .fi
114
115 This invocation splits \fBinputfile\fP based on hard 10 minute time boundaries.
116 The resulting output files are created with a prefix of \fI/archive/%Y/%m/%d/argus.\fP
117 and the suffix is \fI%H.%M.%S\fP. The values will be supplied based on the time in
118 the record being written out.
119 .nf
120
121 \fBrasplit\fP -r * -M time 10m -w "/archive/%Y/%m/%d/argus.%H.%M.%S"
122
123 .fi
124
125 This invocation splits \fBinputfile\fP based on the argus source identifier.
126 The resulting output files are created with a prefix of \fI/archive/Source Identifier/argus.\fP
127 and the default suffix starting with "aa". The source identifier will be
128 supplied based on the contents of the record being exported.
129 .nf
130
131 \fBrasplit\fP -r * -M time 10m -w "/archive/$srcid/argus."
132
133 .fi
134 This invocation splits \fBinputfile\fP based on a flow event marker.
135 The resulting output files are created with a prefix of 'outfile.' and
136 the default suffix starting with "aa". Whenever a ping to a specific
137 host is seen in the stream, a new output file is generated.
138 .nf
139
140 \fBrasplit\fP -r * -M flow "echo and host 1.2.3.4" -w outfile.
141
142 .fi
143 .SH COPYRIGHT
144 Copyright (c) 2000-2024 QoSient. All rights reserved.
145
146 .SH SEE ALSO
147 .BR ra(1),
148 .BR rarc(5),
149 .BR argus(8),
150
151 .SH AUTHORS
152 .nf
153 Carter Bullard ([email protected]).
154 .fi