Skip to main content
Common Reference

ls

The ls command displays the current structure and status of the cluster.

Usage
ls [option] [host]

The ls command operates in a number of different modes, according to the options provided on the command-line, as follows:

OptionDescriptionVersion
-lOutputs extended information about the current status and configuration. The -l option can be used in both the standard (no option) and host specific output formats to provide more detailed information.
resourcesThe resources option generates a list of the configured resources and their current status.
servicesThe services option generates a list of the configured services known to the manager.
sessionsThe sessions outputs statistics for the cluster. Statistics will only be presented whenSMARTSCALE is enabled for the connectors.

Without any further options, the output of ls looks similar to the following:

[LOGICAL] /alpha > ls

COORDINATOR[host1:AUTOMATIC:ONLINE]

ROUTERS:
+----------------------------------------------------------------------------+
|connector@host1[1179](ONLINE, created=0, active=0) |
|connector@host2[1532](ONLINE, created=0, active=0) |
|connector@host3[17665](ONLINE, created=0, active=0) |
+----------------------------------------------------------------------------+

DATASOURCES:
+----------------------------------------------------------------------------+
|host1(master:ONLINE, progress=60, THL latency=0.498) |
|STATUS [OK] [2013/03/22 02:25:00 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=master, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=0, active=0) |
+----------------------------------------------------------------------------+

+----------------------------------------------------------------------------+
|host2(slave:ONLINE, progress=31, latency=0.000) |
|STATUS [OK] [2013/03/22 02:25:00 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=slave, master=host1, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=0, active=0) |
+----------------------------------------------------------------------------+

+----------------------------------------------------------------------------+
|host3(slave:ONLINE, progress=35, latency=9.455) |
|STATUS [OK] [2013/03/21 06:47:53 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=slave, master=host1, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=0, active=0) |
+----------------------------------------------------------------------------+

Here are the possible values for STATUS, showing the DataSource State first, and the matching Alert STATUS second:

Datasource StateAlert STATUS
ONLINEOK
OFFLINEWARN (for non-composite datasources)
OFFLINEDIMINISHED (for composite passive replica)
OFFLINECRITICAL (for composite active primary)
FAILEDCRITICAL
SHUNNEDSHUNNED

Any other DataSource State sets the STATUS to UNKNOWN.