Module i3status_rs::blocks::memory

source ·
Expand description

Memory and swap usage

§Configuration

KeyValuesDefault
formatA string to customise the output of this block when in “Memory” view. See below for available placeholders." $icon $mem_used.eng(prefix:Mi)/$mem_total.eng(prefix:Mi)($mem_used_percents.eng(w:2)) "
format_altIf set, block will switch between format and format_alt on every clickNone
intervalUpdate interval in seconds5
warning_memPercentage of memory usage, where state is set to warning80.0
warning_swapPercentage of swap usage, where state is set to warning80.0
critical_memPercentage of memory usage, where state is set to critical95.0
critical_swapPercentage of swap usage, where state is set to critical95.0
PlaceholderValueTypeUnit
iconMemory iconIcon-
icon_swapSwap iconIcon-
mem_totalTotal physical ram availableNumberBytes
mem_freeFree memory not yet used by the kernel or userspace (in general you should use mem_avail)NumberBytes
mem_free_percentsas above but as a percentage of total memoryNumberPercents
mem_availKernel estimate of usable free memory which includes cached memory and buffersNumberBytes
mem_avail_percentsas above but as a percentage of total memoryNumberPercents
mem_total_usedmem_total - mem_freeNumberBytes
mem_total_used_percentsas above but as a percentage of total memoryNumberPercents
mem_usedMemory used, excluding cached memory and buffers; same as htop’s green barNumberBytes
mem_used_percentsas above but as a percentage of total memoryNumberPercents
buffersBuffers, similar to htop’s blue barNumberBytes
buffers_percentas above but as a percentage of total memoryNumberPercents
cachedCached memory (taking into account ZFS ARC cache), similar to htop’s yellow barNumberBytes
cached_percentas above but as a percentage of total memoryNumberPercents
swap_totalSwap totalNumberBytes
swap_freeSwap freeNumberBytes
swap_free_percentsas above but as a percentage of total memoryNumberPercents
swap_usedSwap usedNumberBytes
swap_used_percentsas above but as a percentage of total memoryNumberPercents
zram_compressedCompressed zram memory usageNumberBytes
zram_decompressedDecompressed zram memory usageNumberBytes
‘zram_comp_ratio’Ratio of the decompressed/compressed zram memoryNumber-
zswap_compressedCompressed zswap memory usage (>=Linux 5.19)NumberBytes
zswap_decompressedDecompressed zswap memory usage (>=Linux 5.19)NumberBytes
zswap_decompressed_percentsas above but as a percentage of total zswap memory (>=Linux 5.19)NumberPercents
‘zswap_comp_ratio’Ratio of the decompressed/compressed zswap memory (>=Linux 5.19)Number-
ActionDescriptionDefault button
toggle_formatToggles between format and format_altLeft

§Examples

[[block]]
block = "memory"
format = " $icon $mem_used_percents.eng(w:1) "
format_alt = " $icon_swap $swap_free.eng(w:3,u:B,p:Mi)/$swap_total.eng(w:3,u:B,p:Mi)($swap_used_percents.eng(w:2)) "
interval = 30
warning_mem = 70
critical_mem = 90

Show swap and hide if it is zero:

[[block]]
block = "memory"
format = " $icon $swap_used.eng(range:1..) |"

§Icons Used

  • memory_mem
  • memory_swap

Structs§

Functions§