Skip to content

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/samples 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]:

 [inputs.mem.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"
  # ...

mem

Tags & Fields Description
host
(tag)
System hostname.
active Memory used recently and normally not reclaimed unless necessary. Darwin and Linux only.
Type: int | (gauge)
Unit: digital,B
available Memory available for starting new applications without swapping, in bytes.
Type: int | (gauge)
Unit: digital,B
available_percent Available memory percentage, calculated as available / total * 100.
Type: float | (gauge)
Unit: percent,percent
buffered Memory used for kernel buffers. Linux only.
Type: int | (gauge)
Unit: digital,B
cached Memory used for the filesystem page cache. Linux only.
Type: int | (gauge)
Unit: digital,B
commit_limit Total memory currently available for allocation under the Linux overcommit policy. Linux only.
Type: int | (gauge)
Unit: digital,B
committed_as Estimated memory committed to allocations on the system. Linux only.
Type: int | (gauge)
Unit: digital,B
dirty Memory waiting to be written back to disk. Linux only.
Type: int | (gauge)
Unit: digital,B
free Free memory in bytes. Darwin and Linux only.
Type: int | (gauge)
Unit: digital,B
high_free Free high memory in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
high_total Total high memory in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
huge_pages_free Number of huge pages in the pool that are not allocated. Linux only.
Type: int | (gauge)
Unit: count
huge_pages_size Huge page size in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
huge_pages_total Total number of huge pages in the pool. Linux only.
Type: int | (gauge)
Unit: count
inactive Memory used less recently and more eligible for reclaim. Darwin and Linux only.
Type: int | (gauge)
Unit: digital,B
low_free Free low memory in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
low_total Total low memory in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
mapped Memory used for mapped files such as libraries. Linux only.
Type: int | (gauge)
Unit: digital,B
page_tables Memory used for the lowest level of page tables. Linux only.
Type: int | (gauge)
Unit: digital,B
shared Shared memory in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
slab Memory used by in-kernel data structure caches. Linux only.
Type: int | (gauge)
Unit: digital,B
sreclaimable Reclaimable part of slab memory, such as caches. Linux only.
Type: int | (gauge)
Unit: digital,B
sunreclaim Unreclaimable part of slab memory. Linux only.
Type: int | (gauge)
Unit: digital,B
swap_cached Memory that was swapped out, swapped back in, and still also exists in swap. Linux only.
Type: int | (gauge)
Unit: digital,B
swap_free Unused swap space in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
swap_total Total swap space in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
total Total physical memory in bytes.
Type: int | (gauge)
Unit: digital,B
used Used physical memory in bytes.
Type: int | (gauge)
Unit: digital,B
used_percent Used memory percentage, calculated as used / total * 100.
Type: float | (gauge)
Unit: percent,percent
vmalloc_chunk Largest contiguous free block in the vmalloc area. Linux only.
Type: int | (gauge)
Unit: digital,B
vmalloc_total Total size of the vmalloc area in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
vmalloc_used Used vmalloc area in bytes. Linux only.
Type: int | (gauge)
Unit: digital,B
wired Wired memory that cannot be paged out. Darwin only.
Type: int | (gauge)
Unit: digital,B
write_back Memory actively being written back to disk. Linux only.
Type: int | (gauge)
Unit: digital,B
write_back_tmp Memory used by FUSE for temporary writeback buffers. Linux only.
Type: int | (gauge)
Unit: digital,B

Feedback

Is this page helpful? ×