Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add varnish-counters(7) man page

  • Loading branch information...
commit 66bcd31710a8ecfb18c24adba8d7739d074b34a1 1 parent 03c7a14
Tollef Fog Heen authored
Showing with 84 additions and 1 deletion.
  1. +2 −0  .gitignore
  2. +17 −1 man/Makefile.am
  3. +65 −0 man/vsc2rst.c
View
2  .gitignore
@@ -54,8 +54,10 @@ TAGS
/lib/libvmod_std/vcc_if.h
# Man-files and binaries
+/man/vsc2rst
/man/vcl.7
/man/varnish-cli.7
+/man/varnish-counters.7
/bin/varnishadm/varnishadm
/bin/varnishadm/varnishadm.1
/bin/varnishd/varnishd
View
18 man/Makefile.am
@@ -1,6 +1,12 @@
#
-dist_man_MANS = vcl.7 varnish-cli.7
+noinst_PROGRAMS = vsc2rst
+vsc2rst_SOURCES = vsc2rst.c \
+ $(top_srcdir)/include/vsc_fields.h
+
+INCLUDES = -I$(top_srcdir)/include
+
+dist_man_MANS = vcl.7 varnish-cli.7 varnish-counters.7
MAINTAINERCLEANFILES = $(dist_man_MANS)
vcl.7: $(top_srcdir)/doc/sphinx/reference/vcl.rst \
@@ -23,3 +29,13 @@ else
@echo "========================================"
@false
endif
+
+varnish-counters.7: vsc2rst
+if HAVE_RST2MAN
+ ./vsc2rst | ${RST2MAN} - $@
+else
+ @echo "========================================"
+ @echo "You need rst2man installed to make dist"
+ @echo "========================================"
+ @false
+endif
View
65 man/vsc2rst.c
@@ -0,0 +1,65 @@
+
+#include <stdio.h>
+
+#define P(x, ...) printf(x "\n", ##__VA_ARGS__)
+#define VSC_F(n, t, l, f, e, d) printf("%s%s\n\t%s\n\n", #n, e, d);
+
+int main(int argc, char **argv)
+{
+ P("================");
+ P("varnish-counters");
+ P("================");
+ P("");
+
+ P("---------------------------------");
+ P("Varnish counter field definitions");
+ P("---------------------------------");
+
+ P(":Author: Tollef Fog Heen");
+ P(":Date: 2011-09-20");
+ P(":Version: 1.0");
+ P(":Manual section: 7");
+ P("");
+
+ P("MAIN COUNTERS");
+ P("=============");
+ P("");
+#define VSC_DO_MAIN
+#include "vsc_fields.h"
+#undef VSC_DO_MAIN
+
+ P("");
+ P("LOCK COUNTERS");
+ P("=============");
+ P("");
+#define VSC_DO_LCK
+#include "vsc_fields.h"
+#undef VSC_DO_LCK
+
+ P("");
+ P("PER MALLOC STORAGE COUNTERS");
+ P("===========================");
+ P("");
+#define VSC_DO_SMA
+#include "vsc_fields.h"
+#undef VSC_DO_SMA
+
+ P("");
+ P("PER FILE STORAGE COUNTERS");
+ P("=========================");
+ P("");
+#define VSC_DO_SMF
+#include "vsc_fields.h"
+#undef VSC_DO_SMF
+
+ P("");
+ P("PER BACKEND COUNTERS");
+ P("====================");
+ P("");
+#define VSC_DO_VBE
+#include "vsc_fields.h"
+#undef VSC_DO_VBE
+
+ return 0;
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.