[ovs-dev] [PATCH] system-stats: Add the Open vSwitch version to system stats in database.

Ben Pfaff blp at nicira.com
Thu Nov 11 00:47:14 UTC 2010


CC: Peter Balland <peter at nicira.com>
CC: Jeremy Stribling <strib at nicira.com>
---
 vswitchd/system-stats.c |    1 +
 vswitchd/vswitch.xml    |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c
index 45b8cce..b8e7644 100644
--- a/vswitchd/system-stats.c
+++ b/vswitchd/system-stats.c
@@ -500,4 +500,5 @@ get_system_stats(struct shash *stats)
     get_memory_stats(stats);
     get_process_stats(stats);
     get_filesys_stats(stats);
+    shash_add(stats, "version", xstrdup(VERSION BUILDNR));
 }
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 89bada3..a6908e6 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -197,6 +197,24 @@
               information.
             </p>
           </dd>
+
+          <dt><code>version</code></dt>
+          <dd>
+            <p>
+              The Open vSwitch version number (e.g. <code>1.1.0pre2</code>).
+              If Open vSwitch was configured with a build number, by passing
+              <code>--with-build-number=<var>number</var></code> to the
+              <code>configure</code> script, then it is also included
+              (e.g. <code>1.1.0pre2+build4027</code>).
+            </p>
+
+            <p>
+              This version number is most useful for presenting to a human
+              administrator.  Use caution in interpreting a version number or
+              (especially) build number to indicate that a feature is or is not
+              supported.  Directly testing for a feature is more reliable.
+            </p>
+          </dd>
         </dl>
       </column>
     </group>
-- 
1.7.1





More information about the dev mailing list