status->sec_since_disconnect = rstats.msec_since_disconnect == UINT_MAX
? UINT_MAX : rstats.msec_since_disconnect / 1000;
+ status->n_connections = list_size(&remote->sessions);
+
return true;
}
unsigned int sec_since_connect;
unsigned int sec_since_disconnect;
bool is_connected;
+ int n_connections;
};
bool ovsdb_jsonrpc_server_get_remote_status(
const struct ovsdb_jsonrpc_server *, const char *target,
values[n++] =
xstrdup(ovs_retval_to_string(status.last_error));
}
+ if (status.n_connections > 1) {
+ keys[n] = xstrdup("n_connections");
+ values[n++] = xasprintf("%d", status.n_connections);
+ }
write_string_string_column(rw_row, "status", keys, values, n);
}
database (in seconds). Value is empty if manager has never
disconnected.</dd>
</dl>
+ <dl>
+ <dt><code>n_connections</code></dt>
+ <dd>
+ <p>
+ When <ref column="target"/> specifies a connection method that
+ listens for inbound connections (e.g. <code>ptcp:</code> or
+ <code>pssl:</code>) and more than one connection is actually
+ active, the value is the number of active connections.
+ Otherwise, this key-value pair is omitted.
+ </p>
+ <p>
+ When multiple connections are active, status columns and
+ key-value pairs (other than this one) report the status of one
+ arbitrarily chosen connection.
+ </p>
+ </dd>
+ </dl>
</column>
</group>
</table>