Skip to content

expvars

Jens Alfke edited this page Jan 31, 2014 · 3 revisions

The Sync Gateway provides a number of runtime variables that you can view for debugging or performance monitoring purposes. These are served using the built-in Go expvar package, and you access them by sending a GET /_expvar to the admin port.

The response is a JSON object. The top level keys are generally defined by various subsystems, and their values are objects containing individual keys with numeric values.

cmdline, memstats

Built-in variables from the Go runtime. cmdline lists the command-line arguments, and memstats dumps a large amount of information about the memory heap and garbage collector.

cb

Variables reported by the Couchbase SDK (go_couchbase package)

mc

Variables reported by the low-level memcached API (gomemcached package)

syncGateway_db

Variable Name Description
"channelChangesFeeds" Number of calls to db.changesFeed, i.e. generating a changes feed for a single channel.
"channelLogAdds" Number of entries added to channel logs
"channelLogAppends" Number of times entries were written to channel logs using an APPEND operation
"channelLogCacheHits" Number of requests for channel-logs that were fulfilled from the in-memory cache
"channelLogCacheMisses" Number of requests for channel-logs that had to be fetched from the database server
"channelLogRewrites" Number of times entries were written to channel logs using a SET operation (rewriting the entire log)
"channelLogRewriteCollisions" Number of collisions while attempting to rewrite channel logs using SET
"document_gets" Number of times a document was read from the database
"revisionCache_adds" Number of revisions added to the revision cache
"revisionCache_hits" Number of times a revision-cache lookup succeeded
"revisionCache_misses" Number of times a revision-cache lookup failed
"revs_added" Number of revisions added to the database (including deletions)
"sequence_gets" Number of times the database's lastSequence was read
"sequence_reserves" Number of times the database's lastSequence was incremented

syncGateway_rest

Variable Name Description
"changesFeeds_active" Number of /db/_changes requests currently active
"changesFeeds_total" Number of /db/_changes requests handled since startup
"requests_active" Number of HTTP requests currently being handled
"requests_total" Number of HTTP requests handled since startup
Clone this wiki locally