SGCollect InfoEdit on GitHub
Sync Gateway Admin REST API: Go Python
Couchbase Lite REST API: Java C# Swift Python
With this release comes a new command line utility called
sgcollect_info that provides us with detailed statistics for a specific node. Run
sgcollect_info on each node individually, not on all simultaneously.
- Expvars (exported variables) that contain important stats
- System Level OS stats
- Golang profile output (runtime memory and cpu profiling info)
sgcollect_info will be able to collect more information if the following tools are installed:
- Golang -- this should be the same version that Sync Gateway was built with.
|SG Version||Go build version|
If go is not installed, sgcollect_info will print the following error message, you can ignore this message and there is no need to report it.
Exception during compression: [Error 2] The system cannot find the file specified IMPORTANT: Compression using gozip failed. Falling back to python implementation. Please let us know about this and provide console output.
The tool creates the following log files in the ouput file.
||The http access log for sync gateway (i.e which GETs and PUTs it has received and from which IPs)|
||The http access log for sg_accel (i.e which GETs and PUTs it has received and from which IPs)|
||The error log (all logging sent to stderr by sg_accel) for the sg_accel process|
||The error log (all logging sent to stderr by sync_gateway) for the sync_gateway process|
||The output of http://localhost:4895 for the running sync gateway|
||The output of http://localhost:4895/db_name for the running sync gateway|
||The on-disk configuration file used by sync_gateway when it was launched|
||The on-disk configuration file used by sg_accel when it was launched|
||The configuration used by sync gateway as it is running (may not match the on-disk config as it can be changed on-the-fly)|
||The config used by sync gateway for the database specified by db_name|
||The expvars (global exposed variables - see http://www.mikeperham.com/2014/12/17/expvar-metrics-for-golang/ for the running sync gateway instance)|
||The command line arguments passed to sgcollect_info for this particular output|
||OS-level System Stats|
||Exported Variables (expvars) from Sync Gateway which show runtime stats|
||Goroutine pprof profile output|
||Heap pprof profile output|
||CPU profile pprof profile output|
||System level logs like /var/log/dmesg on Linux|
||The Sync Gateway binary executable|
||The pprof output that collects directly via an http client rather than using go tool, in case Go is not installed|
To see the CLI command line parameters, run:
Collect Sync Gateway diagnostics and save locally:
Collect Sync Gateway diagnostics and upload them to the Couchbase Support AWS S3 bucket:
./sgcollect_info \ --sync-gateway-config=/path/to/config.json \ --sync-gateway-executable=/usr/bin/sync_gateway \ --upload-host=s3.amazonaws.com/cb-customers \ --customer=Acme \ --ticket=123 /tmp/sgcollect_info.zip