Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update alerts-linux.json #263

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

xiaoziv
Copy link
Contributor

@xiaoziv xiaoziv commented Nov 22, 2022

告警使用mem_used_percent替代mem_available_percent
mem_available_percent指标不包含cache/buffer,容易出现误告

告警使用mem_used_percent替代mem_available_percent
@kongfei605 kongfei605 merged commit 2718543 into flashcatcloud:main Nov 22, 2022
@UlricQin
Copy link
Contributor

mem_avaliable_percent应该是包含buffer和cache的

@xiaoziv
Copy link
Contributor Author

xiaoziv commented Nov 22, 2022

available_percent

used + avaliable + cache/buffer = total 应该是这样
之前的告警用的是 avaliable,算出来的可用内存会偏小

@UlricQin
Copy link
Contributor

man free :)

FREE(1)                                                                                           User Commands                                                                                          FREE(1)

NAME
       free - Display amount of free and used memory in the system

SYNOPSIS
       free [options]

DESCRIPTION
       free  displays  the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo. The
       displayed columns are:

       total  Total installed memory (MemTotal and SwapTotal in /proc/meminfo)

       used   Used memory (calculated as total - free - buffers - cache)

       free   Unused memory (MemFree and SwapFree in /proc/meminfo)

       shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on kernels 2.6.32, displayed as zero if not available)

       buffers
              Memory used by kernel buffers (Buffers in /proc/meminfo)

       cache  Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo)

       buff/cache
              Sum of buffers and cache

       available
              Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into  account  page  cache  and
              also  that not all reclaimable memory slabs will be reclaimed due to items being in use (MemAvailable in /proc/meminfo, available on kernels 3.14, emulated on kernels 2.6.27+, otherwise the same
              as free)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants