diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-19 09:10:34 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-19 09:10:34 +0300 |
commit | 33c78a97d97ed39775ac5041fcdf3ad3c854f11e (patch) | |
tree | 473ba3ce6b21b34bddd73303dc696d91d1e47a29 | |
parent | e0b67d9d57fb3dc2de0b8be6e97886443276f719 (diff) | |
download | vmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.gz vmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.bz2 |
Version 1.0release-1.0
-rw-r--r-- | NEWS | 19 | ||||
-rw-r--r-- | doc/binlogcat.1 | 6 | ||||
-rw-r--r-- | doc/binlogsel.1 | 34 | ||||
-rw-r--r-- | doc/vmod-binlog.3 | 20 | ||||
-rw-r--r-- | src/binlogsel.c | 2 |
5 files changed, 54 insertions, 27 deletions
@@ -0,0 +1,19 @@ +Vmod-binlog NEWS -- history of user-visible changes. 2013-10-19 +Copyright (C) 2013 Sergey Poznyakoff +See the end of file for copying conditions. + +Please send Vmod-binlog bug reports to <gray@gnu.org> + +Version 1.0, 2013-10-19 + +Initial release. + + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +eval: (add-hook 'write-file-hooks 'time-stamp) +time-stamp-start: "changes. " +time-stamp-format: "%:y-%02m-%02d" +time-stamp-end: "\n" +end: 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 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. -.TH BINLOGCAT 1 "October 17, 2013" "BINLOGCAT" "User Reference" +.TH BINLOGCAT 1 "October 19, 2013" "BINLOGCAT" "User Reference" .SH NAME binlogcat \- print binary log files in human-readable form .SH SYNOPSIS @@ -35,9 +35,9 @@ Print timestamps relative to first record in the file. Precede each record by its number in the file (0-based). .TP .B \-v -Print information about each file before dumpng it. +Print information about each file before dumping it. .TP -.BI \-t FORMAT +.BI \-t " FORMAT" Format timestamps according to \fIFORMAT\fR (see .BR strftime (3)). Default 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 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. -.TH BINLOGSEL 1 "October 18, 2013" "BINLOGSEL" "User Reference" +.TH BINLOGSEL 1 "October 19, 2013" "BINLOGSEL" "User Reference" .SH NAME binlogsel \- select records from binary logs .SH SYNOPSIS -\fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR]\ +\fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR] [\fB\-i \fIN\fR]\ [\fB\-p\fR \fIPATTERN\fR]\ [\fB\-t\fR \fIFORMAT\fR] [\fB\-I\fR \fITAG\fR] [\fB\-F\fR \fITIME\fR] [\fB\-T\fR \fITIME\fR]\ @@ -28,8 +28,10 @@ binlogsel \- select records from binary logs \fBbinlogsel\fR [\fB\-hV\fR] .SH DESCRIPTION .B Binlosel -selects from the binary logs the records that fall within the given -time interval. The interval is specified using the +scans binary logs created by +.BR vmod\-binlog (3) +module and selects from them the records that were created within the given +time intervals. A time interval is specified using the .BI \-F " FROMTIME" and .BI \-T " TOTIME" @@ -46,7 +48,7 @@ is omitted, the starting time is set to the time of the earliest available log file. Finally, if neither of options is used, all records will be output. In this case, the operation is equivalent to that of the -.B binlogcat +.BR binlogcat (1) command. .PP The argument to either option is a mostly free format human readable @@ -62,15 +64,15 @@ in If the .B info program and coreutils documentation are properly installed at your site, use -the following command: +the following command to view it: .PP .EX .B info coreutils 'Date input formats' .EE .PP Several time intervals can be specified, provided that each of them is -preceded by the \fB\-I\fR option, which introduces the tag to mark -records falling within the time interval that follows it. This tag is +preceded by the \fB\-I\fR option, which introduces the tag to identify +the records pertaining to that interval. This tag is output before each record. For example: .PP .EX @@ -84,7 +86,9 @@ records added within the last 2 days, which are prefixed by the string .PP The log files are searched in the directory specified with the \fB\-D\fR command line option. The \fB\-i\fR option can be used to -define directory indexing level. +define directory indexing level. See +.BR vmod\-binlog (3), +for a description of the underlying directory structure. .PP If files are listed in the command line, the .BR \-D , @@ -97,26 +101,25 @@ The default action of .B binlogsel is to print matching records on the standard output. This can be changed by the use of loadable modules. A module is a dynamic library -that is loaded at program startup and provides functions for handling +which is loaded at program startup and provides functions for handling records in a specific way. .PP The module to be loaded is supplied with the \fB\-m\fR option. For example, the option \fB-m modname\fR instructs .B binlogsel to load library \fBmodname.so\fR. Additional arguments for the module -initialization function can be supplied in the same option: +initialization function can be supplied in the same option (note quoting): +.PP .EX .B binlogsel -m 'modname -n arg' .EE .PP -(note quoting). -.PP The module to be loaded is searched in the library path, which consists initially of the single directory \fI$prefix\fR\fB/lib/vmod\-binlog\fR. This path can be modified using the .BI \-L " DIR" -option, which adds \fIDIR\fR to its and, or by the +option, which adds \fIDIR\fR to its end, or by the .BI \-P " DIR" option, which inserts its argument immediately before the default library directory. @@ -186,6 +189,9 @@ below, the symbols looks for are listed without this prefix. Thus, for example, if the module name is \fBstats.so\fR, the name of the module initialization function must be \fBstats_LTX_init\fR. +.PP +.B Binlogsel +expects modules to export the following functions: .TP .BI "void init(char *" param ", void (*" addfn ")(const char *, const char *, const char *));" .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 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. -.TH VMOD-BINLOG 1 "October 18, 2013" "VMOD-BINLOG" "User Reference" +.TH VMOD-BINLOG 1 "October 19, 2013" "VMOD-BINLOG" "User Reference" .SH NAME vmod\-binlog \- binary log file support for Varnish Cache. .SH SYNOPSIS @@ -78,7 +78,7 @@ Binary logs can be viewed using the and .BR binlogsel (3) utilities. -.PP +.SH FUNCTIONS Binary log support is initialized by a call to .B binlog.init function (normally it is done in @@ -87,7 +87,8 @@ function (normally it is done in The .B dir argument specifies the top-level storage directory. The -.B format argument defines the format of logfile entries. It is +.B format +argument defines the format of logfile entries. It is a simplified form of Perl .B pack() template. See the @@ -104,7 +105,7 @@ Set debugging level. .TP \fBpattern\fR=\fISTRING\fR Sets pattern to use for log file names, instead of the default. -Argument can contain +The argument can contain .BR strftime (3) conversion specifiers. The default is @@ -119,13 +120,12 @@ Sets directory indexing scheme to use. Allowed values are \fB0\fR, \fBsize\fR=\fISIZE\fR Sets maximum size of a single binary log. Any records not fitting into \fISIZE\fR will be discarded. \fISIZE\fR can be followed by -one of the usual size suffixes: \fBK\R, \fBM\fR, \fBG\fR (or their +one of the usual size suffixes: \fBK\fR, \fBM\fR, \fBG\fR (or their lower-case equivalents), standing for kilobytes, megabytes and gigabytes, correspondingly. Logs are mapped into memory, so -the \fISIZE\fR is limited by the amount of memory that can be mapped. -See +the \fISIZE\fR is limited. See .BR mmap (2), for the details. @@ -135,7 +135,7 @@ The default value is 1G. Sets log rotation interval, in seconds. The default is 86400. .TP \fBumask\fR=\fIONUM\fR -Sets umask for creating new log files. Argument is an octal value. +Sets umask for creating new log files (a three-digit octal value). The default is \fB077\fR. .TP \fBroundts\fR=\fIBOOL\fR @@ -180,7 +180,9 @@ binlog.pack(http.req.url); binlog.commit(); .EE .SH FORMAT -Data format specification consists of a series of template letters +Data format specification consists of a series of conversion +specifiers, optionally separated by any amount of whitespace. +A conversion specifier consists of a template letter optionally followed by numeric repeat count (which may be enclosed in square brackets). .PP diff --git a/src/binlogsel.c b/src/binlogsel.c index 10630e6..547b4ec 100644 --- a/src/binlogsel.c +++ b/src/binlogsel.c @@ -829,7 +829,7 @@ main(int argc, char **argv) setprogname(argv[0]); add_load_path(BINLOGSEL_MODDIR, LP_APPEND); - while ((c = getopt(argc, argv, "D:dF:hi:I:L:m:p:P:T:t:nV")) != EOF) + while ((c = getopt(argc, argv, "D:dF:hi:I:L:m:p:P:T:t:nVv")) != EOF) switch (c) { case 'D': directory = optarg; |