diff options
| author | Justin Pettit <jpettit@nicira.com> | 2011-08-01 21:18:00 -0700 |
|---|---|---|
| committer | Justin Pettit <jpettit@nicira.com> | 2011-08-04 11:15:55 -0700 |
| commit | d5e1e5ede31ea213d1dea2f865a1b679b7f1bed2 (patch) | |
| tree | 10523144ee66d55150f62037a2759b5a27fa97e5 /lib/unixctl.c | |
| parent | 55d5bb44cbca6993494b05a374d4f09ec03c9102 (diff) | |
| download | openvswitch-d5e1e5ede31ea213d1dea2f865a1b679b7f1bed2.tar.gz | |
ovs-appctl: Add "version" command to print version of running daemons.
When debugging a running system, we occasionally see a mismatch of
different versions because someone forgets to restart one or more
daemons. Often times, it would be useful to know what's running as
opposed to what's on the current runpath.
Diffstat (limited to 'lib/unixctl.c')
| -rw-r--r-- | lib/unixctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/unixctl.c b/lib/unixctl.c index c333c54e9..ca90b396a 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -107,6 +107,13 @@ unixctl_help(struct unixctl_conn *conn, const char *args OVS_UNUSED, ds_destroy(&ds); } +static void +unixctl_version(struct unixctl_conn *conn, const char *args OVS_UNUSED, + void *aux OVS_UNUSED) +{ + unixctl_command_reply(conn, 200, get_program_version()); +} + void unixctl_command_register(const char *name, unixctl_cb_func *cb, void *aux) { @@ -206,6 +213,7 @@ unixctl_server_create(const char *path, struct unixctl_server **serverp) } unixctl_command_register("help", unixctl_help, NULL); + unixctl_command_register("version", unixctl_version, NULL); server = xmalloc(sizeof *server); list_init(&server->conns); |
