mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user