cbcollect_info tool

cbcollect_info tool

The cbcollect_info tool provides detailed statistics for a specific node.

Description

This tool is a per-node operation. This command collects information from an individual Couchbase Server node. To collect diagnostic information for an entire cluster, perform the command for every node that exists for that cluster. If you are experiencing problems with multiple nodes in a cluster, you may need to run it on all nodes in a cluster.

A root account is required to run this command and collect all the server information needed. There are internal server files and directories that this tool accesses which require root privileges.

To use this command, remotely connect to the machine which contains the Couchbase Server then issue the command with options. This command is typically run under the direction of technical support at Couchbase and generates a large .zip file. This archive contains files which contain performance statistics and extracts from server logs.

Attention: cbcollect_info is one of the most important diagnostic tools used by Couchbase technical support.

This tool is at the following locations

Operating System Location
Linux /opt/couchbase/bin/cbcollect_info
Windows C:\Program Files\Couchbase\Server\bin\cbcollect_info
Mac OS X /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbcollect_info

The tool creates the following log files in the output file:

Log file Description
couchbase.log OS-level information about a node.
ddocs.log Contains diagnostic dumps design documents and replication documents from this node.
diag.log Contains all kinds of internal diagnostics (list and states of processes, user-visible logs, in-memory stats, etc) from within live node.
ini.log Contains dumps of couchdb .ini files.
memcached.log Contains logs from memcached.
ns_server.babysitter.log Logs of babysitter.
ns_server.couchdb.log Information about the persistence layer for a node.
ns_server.debug.log Debug-level information for the cluster management component of this node.
ns_server.error.log Error-level information for the cluster management component of this node.
ns_server.http_access.log Contains log of http requests to port 8091.
ns_server.info.log Info-level entries for the cluster management component of this node.
ns_server.mapreduce_errors.log Contains logs of errors from map/reduce functions.
ns_server.reports.log Contains crash reports of erlang services.
ns_server.ssl_proxy.log Los of the ssl proxy component.
ns_server.stats.log Logs of statistic related components of ns_server.
ns_server.views.log Includes information about indexing, time taken for indexing, queries which have been run, and other statistics about views.
ns_server.xdcr_errors.log Error-level messages of the ns_server.
ns_server.xdcr.log XDCR logs.
stats.log The results from multiple cbstats options run for the node.
syslog.tar.gz Archive of the operating system logs.

CLI command and parameters

The following describes usage, where output-file is the name of the .zip file to create and send to Couchbase technical support.

cbcollect_info [options] [output-file]

The cbcollect_info command gathers statistics from an individual node in the cluster.

Table 1. cbcollect_info options
Parameter Description
-h, --help Shows help information.
-r ROOT Root directory. Default to /opt/couchbase/bin/..
-v Increases verbosity level. If specified, debugging information for cbcollect_info is also displayed on your console.
-p Gathers only product-related information.
-d Dumps a list of commands that cbcollect_info needs.
--initargs-INITARG Ther server initargs path.
--single-node-diag Collects on aper node basis, diagnostics on just this node. The default is all reachable nodes.
--upload-host=UPLOAD_HOST Fully-qualified domain name of the host you want the logs uploaded to. The protocol prefix of the domain name, https:// , is optional. It is the default only supported protocol.
--customer=UPLOAD_CUSTOMER Customer name. This value is a string with a maximum length of 50 characters that contains only the following characters: [A-Za-z0-9_.-]. If any other characters are included in the string, the request is rejected.
--ticket=UPLOAD_TICKET Couchbase support ticket number. This value is a string with a maximum length of 7 character that contains only digits 0-9. The ticket number is optional and is used only in conjunction with the --upload option.

Example

To create a diagnostics .zip file, log onto the node and run the cbcollect_info tool.


cbcollect_info collect.zip
			

Response

The following example response shows partial output when running the cbcollect_info command.


uname (uname -a) - OK
time and TZ (date; date -u) - OK
raw /etc/sysconfig/clock (cat /etc/sysconfig/clock) - OK
raw /etc/timezone (cat /etc/timezone) - Exit code 1
System Hardware (lshw -json || lshw) - Exit code 127

...

adding: /tmp/tmpMYbSyD/couchbase.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/couchbase.log
adding: /tmp/tmpMYbSyD/ns_server.xdcr.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.xdcr.log
adding: /tmp/tmpMYbSyD/ns_server.couchdb.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.couchdb.log
adding: /tmp/tmpMYbSyD/stats.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/stats.log
adding: /tmp/tmpMYbSyD/ini.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ini.log
adding: /tmp/tmpMYbSyD/ns_server.error.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.error.log
adding: /tmp/tmpMYbSyD/ns_server.ssl_proxy.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.ssl_proxy.log
adding: /tmp/tmpMYbSyD/ns_server.views.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.views.log
adding: /tmp/tmpMYbSyD/ns_server.info.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.info.log
adding: /tmp/tmpMYbSyD/ns_server.xdcr_errors.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.xdcr_errors.log
adding: /tmp/tmpMYbSyD/ns_server.mapreduce_errors.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.mapreduce_errors.log
adding: /tmp/tmpMYbSyD/diag.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/diag.log
adding: /tmp/tmpMYbSyD/ns_server.http_access.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.http_access.log
adding: /tmp/tmpMYbSyD/syslog.tar.gz -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/syslog.tar.gz
adding: /tmp/tmpMYbSyD/ns_server.debug.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.debug.log
adding: /tmp/tmpMYbSyD/ddocs.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ddocs.log
adding: /tmp/tmpMYbSyD/ns_server.reports.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.reports.log
adding: /tmp/tmpMYbSyD/memcached.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/memcached.log
adding: /tmp/tmpMYbSyD/ns_server.babysitter.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.babysitter.log
adding: /tmp/tmpMYbSyD/ns_server.stats.log -> cbcollect_info_ns_1@10.5.2.117_20141209-024045/ns_server.stats.log