откройте сервер базы данных vSwitch (Open vSwitch database server)
Управление временем выполнения (Run-time control)
ovs-appctl(8) can send commands to a running ovsdb-server
process. The currently supported commands are described below.
ovsdb-server
Commands
These commands are specific to ovsdb-server
.
exit
Causes ovsdb-server
to gracefully terminate.
ovsdb-server/compact
[db]
Compacts database db in-place. If db is not specified,
compacts every database in-place. A database is also
compacted automatically when a transaction is logged if it
is over 2 times as large as its previous compacted size
(and at least 10 MB), but not before 100 commits have been
added or 10 minutes have elapsed since the last
compaction. It will also be compacted automatically after
24 hours since the last compaction if 100 commits were
added regardless of its size.
ovsdb-server/memory-trim-on-compaction
on|off
If this option is on, ovsdb-server will try to reclaim all
unused heap memory back to the system after each
successful database compaction to reduce the memory
consumption of the process. off by default.
ovsdb-server/reconnect
Makes ovsdb-server
drop all of the JSON-RPC connections to
database clients and reconnect.
This command might be useful for debugging issues with
database clients.
ovsdb-server/add-remote
remote
Adds a remote, as if --remote=
remote had been specified on
the ovsdb-server
command line. (If remote is already a
remote, this command succeeds without changing the
configuration.)
ovsdb-server/remove-remote
remote
Removes the specified remote from the configuration,
failing with an error if remote is not configured as a
remote. This command only works with remotes that were
named on --remote
or ovsdb-server/add-remote
, that is, it
will not remove remotes added indirectly because they were
read from the database by configuring a db:
db,
table,
column
remote. (You can remove a database source with
ovsdb-server/remove-remote db:
db,
table,
column, but not
individual remotes found indirectly through the database.)
ovsdb-server/list-remotes
Outputs a list of the currently configured remotes named
on --remote
or ovsdb-server/add-remote
, that is, it does
not list remotes added indirectly because they were read
from the database by configuring a db:
db,
table,
column
remote.
ovsdb-server/add-db
database
Adds the database to the running ovsdb-server
. database
could be a database file or a relay description in the
following format: relay:schema_name:remote. The database
file must already have been created and initialized using,
for example, ovsdb-tool create
.
ovsdb-server/remove-db
database
Removes database from the running ovsdb-server
. database
must be a database name as listed by ovsdb-
server/list-dbs
.
If a remote has been configured that points to the
specified database (e.g. --remote=db:
database,
... on the
command line), then it will be disabled until another
database with the same name is added again (with
ovsdb-server/add-db
).
Any public key infrastructure options specified through
this database (e.g. --private-key=db:
database,... on the
command line) will be disabled until another database with
the same name is added again (with ovsdb-server/add-db
).
ovsdb-server/list-dbs
Outputs a list of the currently configured databases added
either through the command line or through the
ovsdb-server/add-db
command.
Active-Backup Commands
These commands query and update the role of ovsdb-server
within
an active-backup pair of servers. See Active-Backup Options
,
above, and Active-Backup Database Service Model
in ovsdb
(7) for
more information.
ovsdb-server/set-active-ovsdb-server
server
Sets the active server from which ovsdb-server
connects
through ovsdb-server/connect-active-ovsdb-server
. This
overrides the --sync-from
command-line option.
ovsdb-server/get-active-ovsdb-server
Gets the active server from which ovsdb-server
is
currently synchronizing its databases.
ovsdb-server/connect-active-ovsdb-server
Switches the server to a backup role. The server starts
synchronizing its databases with the active server
specified by ovsdb-server/set-active-ovsdb-server
(or the
--sync-from
command-line option) and closes all existing
client connections, which requires clients to reconnect.
ovsdb-server/disconnect-active-ovsdb-server
Switches the server to an active role. The server stops
synchronizing its databases with an active server and
closes all existing client connections, which requires
clients to reconnect.
ovsdb-server/set-active-ovsdb-server-probe-interval
probe
interval
Sets the probe interval (in milli seconds) for the
connection to active server.
ovsdb-server/set-sync-exclude-tables
db:
table[,
db:
table]...
Sets the table within db that will be excluded from
synchronization. This overrides the --sync-exclude-tables
command-line option.
ovsdb-server/get-sync-exclude-tables
Gets the tables that are currently excluded from
synchronization.
ovsdb-server/sync-status
Prints a summary of replication run time information. The
state
information is always provided, indicating whether
the server is running in the active or the backup mode.
When running in backup mode, replication connection
status, which can be either connecting, replicating or
error, are shown. When the connection is in replicating
state, further output shows the list of databases
currently replicating, and the tables that are excluded.
Cluster Commands
These commands support the ovsdb-server
clustered service model.
They apply only to databases in the format used for clustered
databases, which is the database format created by ovsdb-tool
create-cluster
and ovsdb-tool join-cluster
.
cluster/cid
db
Prints the cluster ID for db, which is a UUID that
identifies the cluster. If db is a database newly created
by ovsdb-tool cluster-join
that has not yet successfully
joined its cluster, and --cid
was not specified on the
cluster-join
command line, then this command will report
an error because the cluster ID is not yet known.
cluster/sid
db
Prints the server ID for db, which is a UUID that
identifies this server within the cluster.
cluster/status
db
Prints this server's status within the cluster and the
status of its connections to other servers in the cluster.
cluster/leave
db
This command starts the server gracefully removing itself
from its cluster. At least one server must remain, and
the cluster must be healthy, that is, over half of the
cluster's servers must be up.
When the server successfully leaves the cluster, it stops
serving db, as if ovsdb-server/remove-db
db had been
executed.
Use ovsdb-client wait
(see ovsdb-client(1)) to wait until
the server has left the cluster.
Once a server leaves a cluster, it may never rejoin it.
Instead, create a new server and join it to the cluster.
Note that removing the server from the cluster alters the
total size of the cluster. For example, if you remove two
servers from a three server cluster, then the "cluster"
becomes a single functioning server. This does not result
in a three server cluster that lacks quorum.
cluster/kick
db server
Start graceful removal of server from db's cluster, like
cluster/leave
(without --force
) except that it can remove
any server, not just this one.
server may be a server ID, as printed by cluster/sid
, or
the server's local network address as passed to ovsdb-
tool
's create-cluster
or join-cluster
command. Use
cluster/status
to see a list of cluster members.
cluster/change-election-timer
db time
Change the leader election timeout base value of the
cluster, in milliseconds.
Leader election will be initiated by a follower if there
is no heartbeat received from the leader within this time
plus a random time within 1 second.
The default value is 1000, if not changed with this
command. This command can be used to adjust the value
when necessary, according to the expected load and
response time of the servers.
This command must be executed on the leader. It initiates
the change to the cluster. To see if the change takes
effect (committed), use cluster/status
to show the current
setting. Once a change is committed, it persists at
server restarts.
cluster/set-backlog-threshold
db n_msgs n_bytes
Sets the backlog limits for db's RAFT connections to a
maximum of n_msgs messages or n_bytes bytes. If the
backlog on one of the connections reaches the limit, it
will be disconnected (and re-established). Values are
checked only if the backlog contains more than 50
messages.
VLOG COMMANDS
These commands manage ovsdb-server
's logging settings.
vlog/set
[spec]
Sets logging levels. Without any spec, sets the log level
for every module and destination to dbg
. Otherwise, spec
is a list of words separated by spaces or commas or
colons, up to one from each category below:
• A valid module name, as displayed by the vlog/list
command on ovs-appctl(8), limits the log level
change to the specified module.
• syslog
, console
, or file
, to limit the log level
change to only to the system log, to the console,
or to a file, respectively.
On Windows platform, syslog
is accepted as a word
and is only useful along with the --syslog-target
option (the word has no effect otherwise).
• off
, emer
, err
, warn
, info
, or dbg
, to control the
log level. Messages of the given severity or
higher will be logged, and messages of lower
severity will be filtered out. off
filters out all
messages. See ovs-appctl(8) for a definition of
each log level.
Case is not significant within spec.
Regardless of the log levels set for file
, logging to a
file will not take place unless ovsdb-server
was invoked
with the --log-file
option.
For compatibility with older versions of OVS, any
is
accepted as a word but has no effect.
vlog/set PATTERN:
destination:
pattern
Sets the log pattern for destination to pattern. Refer to
ovs-appctl(8) for a description of the valid syntax for
pattern.
vlog/list
Lists the supported logging modules and their current
levels.
vlog/list-pattern
Lists logging patterns used for each destination.
vlog/close
Causes ovsdb-server
to close its log file, if it is open.
(Use vlog/reopen
to reopen it later.)
vlog/reopen
Causes ovsdb-server
to close its log file, if it is open,
and then reopen it. (This is useful after rotating log
files, to cause a new log file to be used.)
This has no effect unless ovsdb-server
was invoked with
the --log-file
option.
vlog/disable-rate-limit
[module]...
vlog/enable-rate-limit
[module]...
By default, ovsdb-server
limits the rate at which certain
messages can be logged. When a message would appear more
frequently than the limit, it is suppressed. This saves
disk space, makes logs easier to read, and speeds up
execution, but occasionally troubleshooting requires more
detail. Therefore, vlog/disable-rate-limit
allows rate
limits to be disabled at the level of an individual log
module. Specify one or more module names, as displayed by
the vlog/list
command. Specifying either no module names
at all or the keyword any
disables rate limits for every
log module.
The vlog/enable-rate-limit
command, whose syntax is the
same as vlog/disable-rate-limit
, can be used to re-enable
a rate limit that was previously disabled.
MEMORY COMMANDS
These commands report memory usage.
memory/show
Displays some basic statistics about ovsdb-server
's memory
usage. ovsdb-server
also logs this information soon after
startup and periodically as its memory consumption grows.
COVERAGE COMMANDS
These commands manage ovsdb-server
's ``coverage counters,'' which
count the number of times particular events occur during a
daemon's runtime. In addition to these commands, ovsdb-server
automatically logs coverage counter values, at INFO
level, when
it detects that the daemon's main loop takes unusually long to
run.
Coverage counters are useful mainly for performance analysis and
debugging.
coverage/show
Displays the averaged per-second rates for the last few
seconds, the last minute and the last hour, and the total
counts of all of the coverage counters.
coverage/read-counter
counter
Displays the total count for the given coverage counter.