mcstat
- reference
The mcstat
tool provides memory-related information for a specified bucket, or for all buckets on a cluster.
Description
The mcstat
tool provides memory-related information for a specified bucket, or for all buckets on a cluster.
The tool is located as follows:
Platform | Location |
---|---|
Linux |
/opt/couchbase/bin/mcstats |
Windows |
C:\Program Files\Couchbase\Server\bin\mcstats.exe |
Mac OS X |
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/mcstats |
Syntax
mcstat [options]
The options
are as follows:
Options | Description |
---|---|
|
Show the help message and exit.
If |
|
The name of the host (and optionally, the port number) to connect to.
If no port number is specified, either a number specified with the |
|
Optionally, the port number to connect to.
If unspecified, the default |
|
The bucket whose statistics are to be retrieved.
If not specified, an error is returned, unless the |
|
Return statistics for each bucket on the cluster. |
|
The username to be used in authentication. Must be specified, unless a certificate and key are provided. |
|
The password to be used in authentication. Must be specified, unless a certificate and key are provided. |
|
Optionally, authenticate by providing a certificate and key (instead of a username and password). |
|
Connect over IPv4. |
|
Connect over IPv6. |
|
Print output as unformatted JSON. |
|
Print output as formatted JSON. |
|
Try to impersonate the specified user. |
|
Print output without color. |
|
Request one or more particular statistics.
(Note that a list of available statistics can be returned with |
Example
The following call returns statistical information for workload
and audit
, on the travel-sample
bucket for host 10.144.231.101
.
./mcstat -h 10.144.231.101 -u Administrator -P password -b travel-sample -J workload audit
If successful, the command returns output as follows:
{ "ep_workload:LowPrioQ_AuxIO:InQsize": 1, "ep_workload:LowPrioQ_AuxIO:OutQsize": 0, "ep_workload:LowPrioQ_NonIO:InQsize": 536, "ep_workload:LowPrioQ_NonIO:OutQsize": 0, "ep_workload:LowPrioQ_Reader:InQsize": 1, "ep_workload:LowPrioQ_Reader:OutQsize": 0, "ep_workload:LowPrioQ_Writer:InQsize": 2, "ep_workload:LowPrioQ_Writer:OutQsize": 0, "ep_workload:num_auxio": 2, "ep_workload:num_nonio": 2, "ep_workload:num_readers": 4, "ep_workload:num_shards": 1, "ep_workload:num_sleepers": 12, "ep_workload:num_writers": 4, "ep_workload:ready_tasks": 0 } { "dropped_events": 0, "enabled": false }