aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-19 09:10:34 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-10-19 09:10:34 +0300
commit33c78a97d97ed39775ac5041fcdf3ad3c854f11e (patch)
tree473ba3ce6b21b34bddd73303dc696d91d1e47a29
parente0b67d9d57fb3dc2de0b8be6e97886443276f719 (diff)
downloadvmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.gz
vmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.bz2
Version 1.0release-1.0
-rw-r--r--NEWS19
-rw-r--r--doc/binlogcat.16
-rw-r--r--doc/binlogsel.134
-rw-r--r--doc/vmod-binlog.322
-rw-r--r--src/binlogsel.c2
5 files changed, 55 insertions, 28 deletions
diff --git a/NEWS b/NEWS
index e69de29..4546558 100644
--- a/NEWS
+++ b/NEWS
@@ -0,0 +1,19 @@
1Vmod-binlog NEWS -- history of user-visible changes. 2013-10-19
2Copyright (C) 2013 Sergey Poznyakoff
3See the end of file for copying conditions.
4
5Please send Vmod-binlog bug reports to <gray@gnu.org>
6
7Version 1.0, 2013-10-19
8
9Initial release.
10
11
12Local variables:
13mode: outline
14paragraph-separate: "[ ]*$"
15eval: (add-hook 'write-file-hooks 'time-stamp)
16time-stamp-start: "changes. "
17time-stamp-format: "%:y-%02m-%02d"
18time-stamp-end: "\n"
19end:
diff --git a/doc/binlogcat.1 b/doc/binlogcat.1
index 886d842..5d49bfb 100644
--- a/doc/binlogcat.1
+++ b/doc/binlogcat.1
@@ -13,7 +13,7 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. 15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
16.TH BINLOGCAT 1 "October 17, 2013" "BINLOGCAT" "User Reference" 16.TH BINLOGCAT 1 "October 19, 2013" "BINLOGCAT" "User Reference"
17.SH NAME 17.SH NAME
18binlogcat \- print binary log files in human-readable form 18binlogcat \- print binary log files in human-readable form
19.SH SYNOPSIS 19.SH SYNOPSIS
@@ -35,9 +35,9 @@ Print timestamps relative to first record in the file.
35Precede each record by its number in the file (0-based). 35Precede each record by its number in the file (0-based).
36.TP 36.TP
37.B \-v 37.B \-v
38Print information about each file before dumpng it. 38Print information about each file before dumping it.
39.TP 39.TP
40.BI \-t FORMAT 40.BI \-t " FORMAT"
41Format timestamps according to \fIFORMAT\fR (see 41Format timestamps according to \fIFORMAT\fR (see
42.BR strftime (3)). 42.BR strftime (3)).
43Default is \fB%c\fR. 43Default is \fB%c\fR.
diff --git a/doc/binlogsel.1 b/doc/binlogsel.1
index eb7bc3a..8c6dfd2 100644
--- a/doc/binlogsel.1
+++ b/doc/binlogsel.1
@@ -13,11 +13,11 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. 15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
16.TH BINLOGSEL 1 "October 18, 2013" "BINLOGSEL" "User Reference" 16.TH BINLOGSEL 1 "October 19, 2013" "BINLOGSEL" "User Reference"
17.SH NAME 17.SH NAME
18binlogsel \- select records from binary logs 18binlogsel \- select records from binary logs
19.SH SYNOPSIS 19.SH SYNOPSIS
20\fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR]\ 20\fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR] [\fB\-i \fIN\fR]\
21 [\fB\-p\fR \fIPATTERN\fR]\ [\fB\-t\fR \fIFORMAT\fR] 21 [\fB\-p\fR \fIPATTERN\fR]\ [\fB\-t\fR \fIFORMAT\fR]
22 [\fB\-I\fR \fITAG\fR] [\fB\-F\fR \fITIME\fR] [\fB\-T\fR \fITIME\fR]\ 22 [\fB\-I\fR \fITAG\fR] [\fB\-F\fR \fITIME\fR] [\fB\-T\fR \fITIME\fR]\
23 23
@@ -28,8 +28,10 @@ binlogsel \- select records from binary logs
28\fBbinlogsel\fR [\fB\-hV\fR] 28\fBbinlogsel\fR [\fB\-hV\fR]
29.SH DESCRIPTION 29.SH DESCRIPTION
30.B Binlosel 30.B Binlosel
31selects from the binary logs the records that fall within the given 31scans binary logs created by
32time interval. The interval is specified using the 32.BR vmod\-binlog (3)
33module and selects from them the records that were created within the given
34time intervals. A time interval is specified using the
33.BI \-F " FROMTIME" 35.BI \-F " FROMTIME"
34and 36and
35.BI \-T " TOTIME" 37.BI \-T " TOTIME"
@@ -46,7 +48,7 @@ is omitted, the starting time is set to the time of the earliest
46available log file. Finally, if neither of options is used, all 48available log file. Finally, if neither of options is used, all
47records will be output. In this case, the operation is equivalent 49records will be output. In this case, the operation is equivalent
48to that of the 50to that of the
49.B binlogcat 51.BR binlogcat (1)
50command. 52command.
51.PP 53.PP
52The argument to either option is a mostly free format human readable 54The argument to either option is a mostly free format human readable
@@ -62,15 +64,15 @@ in
62If the 64If the
63.B info 65.B info
64program and coreutils documentation are properly installed at your site, use 66program and coreutils documentation are properly installed at your site, use
65the following command: 67the following command to view it:
66.PP 68.PP
67.EX 69.EX
68.B info coreutils 'Date input formats' 70.B info coreutils 'Date input formats'
69.EE 71.EE
70.PP 72.PP
71Several time intervals can be specified, provided that each of them is 73Several time intervals can be specified, provided that each of them is
72preceded by the \fB\-I\fR option, which introduces the tag to mark 74preceded by the \fB\-I\fR option, which introduces the tag to identify
73records falling within the time interval that follows it. This tag is 75the records pertaining to that interval. This tag is
74output before each record. For example: 76output before each record. For example:
75.PP 77.PP
76.EX 78.EX
@@ -84,7 +86,9 @@ records added within the last 2 days, which are prefixed by the string
84.PP 86.PP
85The log files are searched in the directory specified with the 87The log files are searched in the directory specified with the
86\fB\-D\fR command line option. The \fB\-i\fR option can be used to 88\fB\-D\fR command line option. The \fB\-i\fR option can be used to
87define directory indexing level. 89define directory indexing level. See
90.BR vmod\-binlog (3),
91for a description of the underlying directory structure.
88.PP 92.PP
89If files are listed in the command line, the 93If files are listed in the command line, the
90.BR \-D , 94.BR \-D ,
@@ -97,26 +101,25 @@ The default action of
97.B binlogsel 101.B binlogsel
98is to print matching records on the standard output. This can be 102is to print matching records on the standard output. This can be
99changed by the use of loadable modules. A module is a dynamic library 103changed by the use of loadable modules. A module is a dynamic library
100that is loaded at program startup and provides functions for handling 104which is loaded at program startup and provides functions for handling
101records in a specific way. 105records in a specific way.
102.PP 106.PP
103The module to be loaded is supplied with the \fB\-m\fR option. For 107The module to be loaded is supplied with the \fB\-m\fR option. For
104example, the option \fB-m modname\fR instructs 108example, the option \fB-m modname\fR instructs
105.B binlogsel 109.B binlogsel
106to load library \fBmodname.so\fR. Additional arguments for the module 110to load library \fBmodname.so\fR. Additional arguments for the module
107initialization function can be supplied in the same option: 111initialization function can be supplied in the same option (note quoting):
112.PP
108.EX 113.EX
109.B binlogsel -m 'modname -n arg' 114.B binlogsel -m 'modname -n arg'
110.EE 115.EE
111.PP 116.PP
112(note quoting).
113.PP
114The module to be loaded is searched in the library path, which 117The module to be loaded is searched in the library path, which
115consists initially of the single directory 118consists initially of the single directory
116\fI$prefix\fR\fB/lib/vmod\-binlog\fR. This path can be modified using 119\fI$prefix\fR\fB/lib/vmod\-binlog\fR. This path can be modified using
117the 120the
118.BI \-L " DIR" 121.BI \-L " DIR"
119option, which adds \fIDIR\fR to its and, or by the 122option, which adds \fIDIR\fR to its end, or by the
120.BI \-P " DIR" 123.BI \-P " DIR"
121option, which inserts its argument immediately before the default 124option, which inserts its argument immediately before the default
122library directory. 125library directory.
@@ -186,6 +189,9 @@ below, the symbols
186looks for are listed without this prefix. Thus, for example, if the 189looks for are listed without this prefix. Thus, for example, if the
187module name is \fBstats.so\fR, the name of the module initialization 190module name is \fBstats.so\fR, the name of the module initialization
188function must be \fBstats_LTX_init\fR. 191function must be \fBstats_LTX_init\fR.
192.PP
193.B Binlogsel
194expects modules to export the following functions:
189.TP 195.TP
190.BI "void init(char *" param ", void (*" addfn ")(const char *, const char *, const char *));" 196.BI "void init(char *" param ", void (*" addfn ")(const char *, const char *, const char *));"
191.B [OPTIONAL] 197.B [OPTIONAL]
diff --git a/doc/vmod-binlog.3 b/doc/vmod-binlog.3
index 7578615..f5f978d 100644
--- a/doc/vmod-binlog.3
+++ b/doc/vmod-binlog.3
@@ -13,7 +13,7 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. 15.\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
16.TH VMOD-BINLOG 1 "October 18, 2013" "VMOD-BINLOG" "User Reference" 16.TH VMOD-BINLOG 1 "October 19, 2013" "VMOD-BINLOG" "User Reference"
17.SH NAME 17.SH NAME
18vmod\-binlog \- binary log file support for Varnish Cache. 18vmod\-binlog \- binary log file support for Varnish Cache.
19.SH SYNOPSIS 19.SH SYNOPSIS
@@ -78,7 +78,7 @@ Binary logs can be viewed using the
78and 78and
79.BR binlogsel (3) 79.BR binlogsel (3)
80utilities. 80utilities.
81.PP 81.SH FUNCTIONS
82Binary log support is initialized by a call to 82Binary log support is initialized by a call to
83.B binlog.init 83.B binlog.init
84function (normally it is done in 84function (normally it is done in
@@ -87,7 +87,8 @@ function (normally it is done in
87The 87The
88.B dir 88.B dir
89argument specifies the top-level storage directory. The 89argument specifies the top-level storage directory. The
90.B format argument defines the format of logfile entries. It is 90.B format
91argument defines the format of logfile entries. It is
91a simplified form of Perl 92a simplified form of Perl
92.B pack() 93.B pack()
93template. See the 94template. See the
@@ -104,7 +105,7 @@ Set debugging level.
104.TP 105.TP
105\fBpattern\fR=\fISTRING\fR 106\fBpattern\fR=\fISTRING\fR
106Sets pattern to use for log file names, instead of the default. 107Sets pattern to use for log file names, instead of the default.
107Argument can cont