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

Justin Pettit jpettit at nicira.com
Thu Nov 11 06:58:53 UTC 2010


The implementation looks fine.  We already have similar information in the "external_ids" column of the "Open_vSwitch" table.  Is there a reason not to put it there?  This doesn't really feel like statistics information to me, and seems to fit better alongside the "system-type" and "system-version" keys we've already defined.

Some additional information about the switch is available through OpenFlow:

-=-=-=-=-=-=-=-=-=-=-
[root at localhost ~]# ovs-ofctl dump-desc xenbr0
Manufacturer: Nicira Networks, Inc.
Hardware: Open vSwitch
Software: 1.1.0pre2+build4568
Serial Num: None
DP Description: None
-=-=-=-=-=-=-=-=-=-=-

I think it makes sense to have that information in the config DB, since it's switch-wide.  Maybe we should add some of those other fields to the config DB, too.  Some of those fields don't make sense on a soft-switch, but they'll be a better fit as OVS gets ported to more hardware.

--Justin


On Nov 10, 2010, at 4:47 PM, Ben Pfaff wrote:

> 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
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list