Memory
Mem collector is used to collect system memory information, some general metrics such as total memory, used memory and so on.
Configuration¶
After successfully installing and starting DataKit, the Mem collector will be enabled by default without the need for manual activation.
Collector Configuration¶
Go to the conf.d/host
directory under the DataKit installation directory, copy mem.conf.sample
and name it mem.conf
. Examples are as follows:
[[inputs.mem]]
##(optional) collect interval, default is 10 seconds
interval = '10s'
[inputs.mem.tags]
# some_tag = "some_value"
# more_tag = "some_other_value"
Once configured, restart DataKit.
Can be turned on by ConfigMap Injection Collector Configuration or Config ENV_DATAKIT_INPUTS .
Can also be turned on by environment variables, (needs to be added as the default collector in ENV_DEFAULT_ENABLED_INPUTS):
-
ENV_INPUT_MEM_INTERVAL
Collect interval
Type: Duration
input.conf:
interval
Default: 10s
-
ENV_INPUT_MEM_TAGS
Customize tags. If there is a tag with the same name in the configuration file, it will be overwritten
Type: Map
input.conf:
tags
Example: tag1=value1,tag2=value2
Metric¶
For all of the following data collections, a global tag named host
is appended by default (the tag value is the host name of the DataKit), or other tags can be specified in the configuration by [inputs.mem.tags]
:
mem
¶
- Tags
Tag | Description |
---|---|
host | System hostname. |
- Metrics
Metric | Description |
---|---|
active | Memory that has been used more recently and usually not reclaimed unless absolutely necessary. (Darwin, Linux) Type: int Unit: digital,B |
available | Amount of available memory. Type: int Unit: digital,B |
available_percent | Available memory percent. Type: float Unit: percent,percent |
buffered | Buffered. Linux only Type: int Unit: digital,B |
cached | In-memory cache for files read from the disk. Linux only Type: int Unit: digital,B |
commit_limit | This is the total amount of memory currently available to be allocated on the system. Linux only Type: int Unit: digital,B |
committed_as | The amount of memory presently allocated on the system. Linux only Type: int Unit: digital,B |
dirty | Memory which is waiting to get written back to the disk. Linux only Type: int Unit: digital,B |
free | Amount of free memory. (Darwin, Linux) Type: int Unit: digital,B |
high_free | Amount of free high memory. Linux only Type: int Unit: digital,B |
high_total | Total amount of high memory. Linux only Type: int Unit: digital,B |
huge_page_total | The size of the pool of huge pages. Linux only Type: int Unit: count |
huge_pages_free | The number of huge pages in the pool that are not yet allocated. Linux only Type: int Unit: count |
huge_pages_size | The size of huge pages. Linux only Type: int Unit: digital,B |
inactive | Memory which has been less recently used. It is more eligible to be reclaimed for other purposes. (Darwin, Linux) Type: int Unit: digital,B |
low_free | Amount of free low memory. Linux only Type: int Unit: digital,B |
low_total | Total amount of low memory. Linux only Type: int Unit: digital,B |
mapped | Files which have been mapped into memory, such as libraries. Linux only Type: int Unit: digital,B |
page_tables | Amount of memory dedicated to the lowest level of page tables. Linux only Type: int Unit: digital,B |
shared | Amount of shared memory. Linux only Type: int Unit: digital,B |
slab | In-kernel data structures cache. Linux only Type: int Unit: digital,B |
sreclaimable | Part of Slab, that might be reclaimed, such as caches. Linux only Type: int Unit: digital,B |
sunreclaim | Part of Slab, that cannot be reclaimed on memory pressure. Linux only Type: int Unit: digital,B |
swap_cached | Memory that once was swapped out, is swapped back in but still also is in the swap file. Linux only Type: int Unit: digital,B |
swap_free | Amount of swap space that is currently unused. Linux only Type: int Unit: digital,B |
swap_total | Total amount of swap space available. Linux only Type: int Unit: digital,B |
total | Total amount of memory. Type: int Unit: digital,B |
used | Amount of used memory. Type: int Unit: digital,B |
used_percent | Used memory percent. Type: float Unit: percent,percent |
vmalloc_chunk | Largest contiguous block of vmalloc area which is free. Linux only Type: int Unit: digital,B |
vmalloc_total | Total size of vmalloc memory area. Linux only Type: int Unit: digital,B |
vmalloc_used | Amount of vmalloc area which is used. Linux only Type: int Unit: digital,B |
wired | Wired. (Darwin) Type: int Unit: digital,B |
write_back | Memory which is actively being written back to the disk. Linux only Type: int Unit: digital,B |
write_back_tmp | Memory used by FUSE for temporary write back buffers. Linux only Type: int Unit: digital,B |