[ovs-dev] [PATCH] ovs-parse-leaks: Add manpage.

Ben Pfaff blp at nicira.com
Wed Aug 25 01:19:00 UTC 2010


CC: Simon Horman <horms at verge.net.au>
---
 debian/openvswitch-common.manpages |    1 +
 utilities/automake.mk              |    2 ++
 utilities/ovs-parse-leaks.8        |   33 +++++++++++++++++++++++++++++++++
 utilities/ovs-parse-leaks.in       |    4 ++--
 4 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 utilities/ovs-parse-leaks.8

diff --git a/debian/openvswitch-common.manpages b/debian/openvswitch-common.manpages
index 5243247..8f7e64d 100644
--- a/debian/openvswitch-common.manpages
+++ b/debian/openvswitch-common.manpages
@@ -3,3 +3,4 @@ _debian/ovsdb/ovsdb-tool.1
 _debian/utilities/ovs-appctl.8
 _debian/utilities/ovs-ofctl.8
 _debian/utilities/ovs-pki.8
+utilities/ovs-parse-leaks.8
diff --git a/utilities/automake.mk b/utilities/automake.mk
index c5bf98f..280ee87 100644
--- a/utilities/automake.mk
+++ b/utilities/automake.mk
@@ -19,6 +19,7 @@ EXTRA_DIST += \
 	utilities/ovs-kill.8.in \
 	utilities/ovs-ofctl.8.in \
 	utilities/ovs-openflowd.8.in \
+	utilities/ovs-parse-leaks.8 \
 	utilities/ovs-parse-leaks.in \
 	utilities/ovs-pki-cgi.in \
 	utilities/ovs-pki.8.in \
@@ -46,6 +47,7 @@ man_MANS += \
 	utilities/ovs-kill.8 \
 	utilities/ovs-ofctl.8 \
 	utilities/ovs-openflowd.8 \
+	utilities/ovs-parse-leaks.8 \
 	utilities/ovs-pki.8 \
 	utilities/ovs-vsctl.8
 
diff --git a/utilities/ovs-parse-leaks.8 b/utilities/ovs-parse-leaks.8
new file mode 100644
index 0000000..23fef8a
--- /dev/null
+++ b/utilities/ovs-parse-leaks.8
@@ -0,0 +1,33 @@
+.TH ovs\-parse\-leaks 8 "August 2010" "Open vSwitch" "Open vSwitch Manual"
+.
+.SH NAME
+Bovs\-parse\-leaks \- parses OVS leak checker log files
+.
+.SH SYNOPSIS
+\fBovs\-parse\-leaks\fR [\fIbinary\fR] \fB< \fIlog\fR
+.
+.SH DESCRIPTION
+Many Open vSwitch daemons accept a \fB\-\-check\-leaks\fR option that
+writes information about memory allocation and deallocation to a log
+file.  \fBovs\-parse\-leaks\fR parses log files produced by this
+option and prints a summary of the results.  The most interesting part
+of the output is a list of memory blocks that were allocated but not
+freed, which Open vSwitch developers can use to find and fix memory
+leaks.
+.PP
+The log file must be supplied on standard input.  The binary that
+produced the output should be supplied as the sole non-option
+argument.  For best results, the binary should have debug symbols.
+.
+.SH OPTIONS
+.TP
+\fB\-\-help\fR
+Prints a help usage message and exits.
+.SH BUGS
+The output can be hard to interpret, especially for a daemon that does
+not exit in normal operation.
+.PP
+\fBovs\-parse\-leaks\fR usually incorrectly reports one or more "bad
+frees of not-allocated address" errors at the beginning of output.
+These reflect frees of data that were allocated before the leak
+checker was turned on during program initialization.
diff --git a/utilities/ovs-parse-leaks.in b/utilities/ovs-parse-leaks.in
index 6e4f139..3f4cb16 100755
--- a/utilities/ovs-parse-leaks.in
+++ b/utilities/ovs-parse-leaks.in
@@ -1,6 +1,6 @@
 #! @PERL@
 
-# Copyright (c) 2009 Nicira Networks.
+# Copyright (c) 2009, 2010 Nicira Networks.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ die "$0: $ARGV[0] does not exist" if @ARGV > 0 && ! -e $ARGV[0];
 
 our ($binary);
 our ($a2l) = search_path("addr2line");
-my ($no_syms) = "symbols will not be translated";
+my ($no_syms) = "symbols will not be translated (use --help for help)";
 if (!@ARGV) {
     print "no binary specified; $no_syms\n";
 } elsif (! -e $ARGV[0]) {
-- 
1.7.1





More information about the dev mailing list