Documentation ¶
Index ¶
- func Flatten(m map[string]interface{}) map[string]interface{}
- func HasLocks(stat *ServerStatus) bool
- func InterpretField(field string, newStat, oldStat *ServerStatus) string
- func IsMMAP(stat *ServerStatus) bool
- func IsMongos(stat *ServerStatus) bool
- func IsReplSet(stat *ServerStatus) (res bool)
- func IsWT(stat *ServerStatus) bool
- func ReadARW(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadCommand(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadConn(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadDelete(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadDirty(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- func ReadFaults(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadFlushes(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadGetMore(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadHost(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadInsert(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadLRW(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
- func ReadLRWT(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
- func ReadLockedDB(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
- func ReadMapped(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- func ReadNetIn(c *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadNetOut(c *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadNonMapped(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- func ReadQRW(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadQuery(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadRepl(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadRes(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- func ReadSet(_ *ReaderConfig, newStat, _ *ServerStatus) (name string)
- func ReadStatDiff(field string, newStat, oldStat *ServerStatus) string
- func ReadStatField(field string, stat *ServerStatus) string
- func ReadStatRate(field string, newStat, oldStat *ServerStatus) string
- func ReadStorageEngine(_ *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadTime(c *ReaderConfig, newStat, _ *ServerStatus) string
- func ReadUpdate(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
- func ReadUsed(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- func ReadVSize(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
- type CacheStats
- type ClientStats
- type ConcurrentTransStats
- type ConcurrentTransactions
- type ConnectionStats
- type DBRecordStats
- type DurStats
- type DurTiming
- type ExtraInfo
- type FlushStats
- type GlobalLockStats
- type LockStats
- type LockUsage
- type MemStats
- type NetworkStats
- type NodeError
- type OpcountStats
- type QueueStats
- type ReadWriteLockTimes
- type ReaderConfig
- type RecordAccesses
- type ReplStatus
- type ServerStatus
- type StorageEngine
- type TransactionStats
- type WiredTiger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flatten ¶
Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys.
func HasLocks ¶
func HasLocks(stat *ServerStatus) bool
func InterpretField ¶
func InterpretField(field string, newStat, oldStat *ServerStatus) string
func IsMMAP ¶
func IsMMAP(stat *ServerStatus) bool
func IsMongos ¶
func IsMongos(stat *ServerStatus) bool
func IsReplSet ¶
func IsReplSet(stat *ServerStatus) (res bool)
func IsWT ¶
func IsWT(stat *ServerStatus) bool
func ReadARW ¶
func ReadARW(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadCommand ¶
func ReadCommand(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadConn ¶
func ReadConn(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadDelete ¶
func ReadDelete(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadDirty ¶
func ReadDirty(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
func ReadFaults ¶
func ReadFaults(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadFlushes ¶
func ReadFlushes(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadGetMore ¶
func ReadGetMore(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadHost ¶
func ReadHost(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadInsert ¶
func ReadInsert(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadLRW ¶
func ReadLRW(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
func ReadLRWT ¶
func ReadLRWT(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
func ReadLockedDB ¶
func ReadLockedDB(_ *ReaderConfig, newStat, oldStat *ServerStatus) (val string)
func ReadMapped ¶
func ReadMapped(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
func ReadNetIn ¶
func ReadNetIn(c *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadNetOut ¶
func ReadNetOut(c *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadNonMapped ¶
func ReadNonMapped(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
func ReadQRW ¶
func ReadQRW(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadQuery ¶
func ReadQuery(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadRepl ¶
func ReadRepl(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadRes ¶
func ReadRes(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
func ReadSet ¶
func ReadSet(_ *ReaderConfig, newStat, _ *ServerStatus) (name string)
func ReadStatDiff ¶
func ReadStatDiff(field string, newStat, oldStat *ServerStatus) string
func ReadStatField ¶
func ReadStatField(field string, stat *ServerStatus) string
func ReadStatRate ¶
func ReadStatRate(field string, newStat, oldStat *ServerStatus) string
func ReadStorageEngine ¶
func ReadStorageEngine(_ *ReaderConfig, newStat, _ *ServerStatus) string
func ReadTime ¶
func ReadTime(c *ReaderConfig, newStat, _ *ServerStatus) string
func ReadUpdate ¶
func ReadUpdate(_ *ReaderConfig, newStat, oldStat *ServerStatus) string
func ReadUsed ¶
func ReadUsed(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
func ReadVSize ¶
func ReadVSize(c *ReaderConfig, newStat, _ *ServerStatus) (val string)
Types ¶
type CacheStats ¶
type CacheStats struct { TrackedDirtyBytes int64 `bson:"tracked dirty bytes in the cache"` CurrentCachedBytes int64 `bson:"bytes currently in the cache"` MaxBytesConfigured int64 `bson:"maximum bytes configured"` }
CacheStats stores cache statistics for WiredTiger.
type ClientStats ¶
type ClientStats struct { Total int64 `bson:"total"` Readers int64 `bson:"readers"` Writers int64 `bson:"writers"` }
ClientStats stores the number of active read/write operations.
type ConcurrentTransStats ¶
type ConcurrentTransStats struct {
Out int64 `bson:"out"`
}
type ConcurrentTransactions ¶
type ConcurrentTransactions struct { Write ConcurrentTransStats `bson:"write"` Read ConcurrentTransStats `bson:"read"` }
type ConnectionStats ¶
type ConnectionStats struct { Current int64 `bson:"current"` Available int64 `bson:"available"` TotalCreated int64 `bson:"totalCreated"` }
ConnectionStats stores information related to incoming database connections.
type DBRecordStats ¶
type DBRecordStats struct { AccessesNotInMemory int64 `bson:"accessesNotInMemory"` PageFaultExceptionsThrown int64 `bson:"pageFaultExceptionsThrown"` DBRecordAccesses map[string]RecordAccesses `bson:",inline"` }
DBRecordStats stores data related to memory operations across databases.
type DurStats ¶
type DurStats struct { Commits int64 `bson:"commits"` JournaledMB int64 `bson:"journaledMB"` WriteToDataFilesMB int64 `bson:"writeToDataFilesMB"` Compression int64 `bson:"compression"` CommitsInWriteLock int64 `bson:"commitsInWriteLock"` EarlyCommits int64 `bson:"earlyCommits"` TimeMs DurTiming }
DurStats stores information related to journaling statistics.
type DurTiming ¶
type DurTiming struct { Dt int64 `bson:"dt"` PrepLogBuffer int64 `bson:"prepLogBuffer"` WriteToJournal int64 `bson:"writeToJournal"` WriteToDataFiles int64 `bson:"writeToDataFiles"` RemapPrivateView int64 `bson:"remapPrivateView"` }
DurTiming stores information related to journaling.
type ExtraInfo ¶
type ExtraInfo struct {
PageFaults *int64 `bson:"page_faults"`
}
ExtraInfo stores additional platform specific information.
type FlushStats ¶
type FlushStats struct { Flushes int64 `bson:"flushes"` TotalMs int64 `bson:"total_ms"` AverageMs float64 `bson:"average_ms"` LastMs int64 `bson:"last_ms"` LastFinished time.Time `bson:"last_finished"` }
FlushStats stores information about memory flushes.
type GlobalLockStats ¶
type GlobalLockStats struct { TotalTime int64 `bson:"totalTime"` LockTime int64 `bson:"lockTime"` CurrentQueue *QueueStats `bson:"currentQueue"` ActiveClients *ClientStats `bson:"activeClients"` }
GlobalLockStats stores information related locks in the MMAP storage engine.
type LockStats ¶
type LockStats struct { TimeLockedMicros ReadWriteLockTimes `bson:"timeLockedMicros"` TimeAcquiringMicros ReadWriteLockTimes `bson:"timeAcquiringMicros"` // AcquireCount and AcquireWaitCount are new fields of the lock stats only populated on 3.0 or newer. // Typed as a pointer so that if it is nil, mongostat can assume the field is not populated // with real namespace data. AcquireCount *ReadWriteLockTimes `bson:"acquireCount,omitempty"` AcquireWaitCount *ReadWriteLockTimes `bson:"acquireWaitCount,omitempty"` }
LockStats stores information related to time spent acquiring/holding locks for a given database.
type MemStats ¶
type MemStats struct { Bits int64 `bson:"bits"` Resident int64 `bson:"resident"` Virtual int64 `bson:"virtual"` Supported interface{} `bson:"supported"` Mapped int64 `bson:"mapped"` MappedWithJournal int64 `bson:"mappedWithJournal"` }
MemStats stores data related to memory statistics.
type NetworkStats ¶
type NetworkStats struct { BytesIn int64 `bson:"bytesIn"` BytesOut int64 `bson:"bytesOut"` NumRequests int64 `bson:"numRequests"` }
NetworkStats stores information related to network traffic.
type NodeError ¶
type NodeError struct { Host string // contains filtered or unexported fields }
NodeError pairs an error with a hostname.
func NewNodeError ¶
type OpcountStats ¶
type OpcountStats struct { Insert int64 `bson:"insert"` Query int64 `bson:"query"` Update int64 `bson:"update"` Delete int64 `bson:"delete"` GetMore int64 `bson:"getmore"` Command int64 `bson:"command"` }
OpcountStats stores information related to commands and basic CRUD operations.
type QueueStats ¶
type QueueStats struct { Total int64 `bson:"total"` Readers int64 `bson:"readers"` Writers int64 `bson:"writers"` }
QueueStats stores the number of queued read/write operations.
type ReadWriteLockTimes ¶
type ReadWriteLockTimes struct { Read int64 `bson:"R"` Write int64 `bson:"W"` ReadLower int64 `bson:"r"` WriteLower int64 `bson:"w"` }
ReadWriteLockTimes stores time spent holding read/write locks.
type ReaderConfig ¶
type RecordAccesses ¶
type RecordAccesses struct { AccessesNotInMemory int64 `bson:"accessesNotInMemory"` PageFaultExceptionsThrown int64 `bson:"pageFaultExceptionsThrown"` }
RecordAccesses stores data related to memory operations scoped to a database.
type ReplStatus ¶
type ReplStatus struct { SetName string `bson:"setName"` IsMaster interface{} `bson:"ismaster"` Secondary interface{} `bson:"secondary"` IsReplicaSet interface{} `bson:"isreplicaset"` ArbiterOnly interface{} `bson:"arbiterOnly"` Hosts []string `bson:"hosts"` Passives []string `bson:"passives"` Me string `bson:"me"` }
ReplStatus stores data related to replica sets.
type ServerStatus ¶
type ServerStatus struct { SampleTime time.Time `bson:""` Flattened map[string]interface{} `bson:""` Host string `bson:"host"` Version string `bson:"version"` Process string `bson:"process"` Pid int64 `bson:"pid"` Uptime int64 `bson:"uptime"` UptimeMillis int64 `bson:"uptimeMillis"` UptimeEstimate int64 `bson:"uptimeEstimate"` LocalTime time.Time `bson:"localTime"` Asserts map[string]int64 `bson:"asserts"` BackgroundFlushing *FlushStats `bson:"backgroundFlushing"` ExtraInfo *ExtraInfo `bson:"extra_info"` Connections *ConnectionStats `bson:"connections"` Dur *DurStats `bson:"dur"` GlobalLock *GlobalLockStats `bson:"globalLock"` Locks map[string]LockStats `bson:"locks,omitempty"` Network *NetworkStats `bson:"network"` Opcounters *OpcountStats `bson:"opcounters"` OpcountersRepl *OpcountStats `bson:"opcountersRepl"` RecordStats *DBRecordStats `bson:"recordStats"` Mem *MemStats `bson:"mem"` Repl *ReplStatus `bson:"repl"` ShardCursorType map[string]interface{} `bson:"shardCursorType"` StorageEngine *StorageEngine `bson:"storageEngine"` WiredTiger *WiredTiger `bson:"wiredTiger"` }
type StorageEngine ¶
type StorageEngine struct {
Name string `bson:"name"`
}
type TransactionStats ¶
type TransactionStats struct {
TransCheckpoints int64 `bson:"transaction checkpoints"`
}
TransactionStats stores transaction checkpoints in WiredTiger.
type WiredTiger ¶
type WiredTiger struct { Transaction TransactionStats `bson:"transaction"` Concurrent ConcurrentTransactions `bson:"concurrentTransactions"` Cache CacheStats `bson:"cache"` }
WiredTiger stores information related to the WiredTiger storage engine.