Documentation ¶
Overview ¶
Package meminfo gets the system's memory information, /proc/meminfo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTicker ¶
NewTicker returns a new Ticker containing a Data channel that delivers the data at intervals and an error channel that delivers any errors encountered. Stop the ticker to signal the ticker to stop running. Stopping the ticker does not close the Data channel; call Close to close both the ticker and the data channel.
Types ¶
type Info ¶
type Info struct { Timestamp int64 `json:"timestamp"` Active uint64 `json:"active"` ActiveAnon uint64 `json:"active_anon"` ActiveFile uint64 `json:"active_file"` AnonHugePages uint64 `json:"anon_huge_pages"` AnonPages uint64 `json:"anon_pages"` Bounce uint64 `json:"bounce"` Buffers uint64 `json:"buffers"` Cached uint64 `json:"cached"` CommitLimit uint64 `json:"commit_limit"` CommittedAS uint64 `json:"commited_as"` DirectMap4K uint64 `json:"direct_map_4k"` DirectMap2M uint64 `json:"direct_map_2m"` Dirty uint64 `json:"dirty"` HardwareCorrupted uint64 `json:"hardware_corrupted"` HugePagesFree uint64 `json:"huge_pages_free"` HugePagesRsvd uint64 `json:"huge_pages_rsvd"` HugePagesSize uint64 `json:"huge_pages_size"` HugePagesSurp uint64 `json:"huge_pages_surp"` HugePagesTotal uint64 `json:"huge_pages_total"` Inactive uint64 `json:"inactive"` InactiveAnon uint64 `json:"inactive_anon"` InactiveFile uint64 `json:"inactive_file"` KernelStack uint64 `json:"kernel_stack"` Mapped uint64 `json:"mapped"` MemAvailable uint64 `json:"mem_available"` MemFree uint64 `json:"mem_free"` MemTotal uint64 `json:"mem_total"` Mlocked uint64 `json:"mlocked"` NFSUnstable uint64 `json:"nfs_unstable"` PageTables uint64 `json:"page_tables"` Shmem uint64 `json:"shmem"` Slab uint64 `json:"slab"` SReclaimable uint64 `json:"s_reclaimable"` SUnreclaim uint64 `json:"s_unreclaim"` SwapCached uint64 `json:"swap_cached"` SwapFree uint64 `json:"swap_free"` SwapTotal uint64 `json:"swap_total"` Unevictable uint64 `json:"unevictable"` VmallocChunk uint64 `json:"vmalloc_chunk"` VmallocTotal uint64 `json:"vmalloc_total"` VmallocUsed uint64 `json:"vmalloc_used"` Writeback uint64 `json:"writeback"` WritebackTmp uint64 `json:"writeback_tmp"` }
Info holds the memory information.
Click to show internal directories.
Click to hide internal directories.