3.4.0 Matrix Server Command Reference

Chapter 2: mx Commands 45
Copyright © 1999-2006 PolyServe, Inc. All rights reserved.
List servers individually
Add a line to the file for each server for which you want mx access and
specify the appropriate username and password. This example specifies that
srv3 is the default.
srv1 admin secret1
srv2 admin secret1
srv3 admin secret2 default
When you issue a mx command without specifying a server name, as in the
following example, it connects to the machine specified as the default in the
.matrixrc file.
mx server status
To connect to a different server, include the --matrix option and specify the
server name on the command line. For example, the following command
connects to server acme1 as user admin using the password secret1.
mx --matrix srv1 server status
Use wildcards
You can use wildcards in the .matrixrc file to match machine names:
srv3 admin secret1 default
srv* admin secret1
In the following command, --matrix srv8 matches the wildcard. When the
--matrix option is not specified, the connection is made to srv3, the default;
the machine specified as the default cannot contain a wildcard.
mx --matrix srv8 server status
If you specify any server names in addition to the wildcard, the wildcard
must be at the end of the list of servers as in the above example. The wildcard
matches servers according to the order in which they are listed in the file and
can mask other entries that appear below it in the list.
Group servers
This method allows mx to connect to any available server in the cluster
without the need to specify a server name on the command line. To use this
method, enclose the server entries in brackets, as in the following example for
the prod matrix.