- 
                Notifications
    
You must be signed in to change notification settings  - Fork 140
 
expvars
        Jens Alfke edited this page Feb 24, 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.
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.
Variables reported by the Couchbase SDK (go_couchbase package)
Variables reported by the low-level memcached API (gomemcached package)
| Variable Name | Description | 
|---|---|
| "maxPending" | Max number of sequences waiting on a missing earlier sequence number | 
| "lag-tap-0000ms" | Histogram of delay from doc save till it shows up in Tap feed | 
| "lag-queue-0000ms" | Histogram of delay from Tap feed till doc is posted to changes feed | 
| "lag-total-0000ms" | Histogram of total delay from doc save till posted to changes feed | 
| "outOfOrder" | Number of out-of-order sequences posted | 
| "view_queries" | Number of queries to channels view | 
| 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 | 
| 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 |