mackerel-plugin-linux-memory

command module
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mackerel-plugin-linux-memory

mackerel 用のカスタムメトリクスプラグインです。Linux の /proc/meminfo からメモリ情報を収集し、Mackerel に投稿します。

Features

  • /proc/meminfo の各種メモリ統計をバイト単位で収集
  • Linux カーネル 3.14 以降の MemAvailable に対応
  • MemAvailable がない古いカーネルでは MemTotal - MemFree - Buffers - Cached で used を推定
  • 未取得のフィールドは 0 を返し、プラグインのクラッシュを回避

Requirements

  • Linux カーネル(/proc/meminfo が必要)

Installation

バイナリをダウンロードする

GitHub Releases から最新版のバイナリをダウンロードしてください。

mkr コマンドでインストールする
mkr plugin install monitoring-forge/mackerel-plugin-linux-memory

Usage

$ ./mackerel-plugin-linux-memory
linux-memory.total      5198495744      1627264100
linux-memory.available  2149441536      1627264100
linux-memory.used       3049054208      1627264100
linux-memory.kernelstack        20594688        1627264100
linux-memory.vmallocused        23023616        1627264100
linux-memory.pagetables 25468928        1627264100
linux-memory.mapped     92598272        1627264100
linux-memory.anonpages  1818071040      1627264100
linux-memory.slab       405975040       1627264100
linux-memory.buffers    173051904       1627264100
linux-memory.cached     1653784576      1627264100
linux-memory.free       989589504       1627264100
オプション
Usage:
  mackerel-plugin-linux-memory [OPTIONS]

Application Options:
  -v, --version  Show version

Help Options:
  -h, --help     Show this help message

Metrics

メトリクス名 説明 ソース (/proc/meminfo)
linux-memory.total 搭載メモリ総量 MemTotal
linux-memory.available 利用可能なメモリ量 MemAvailable
linux-memory.used 使用中メモリ量 MemTotal - MemAvailable(MemAvailable 非対応時は MemTotal - MemFree - Buffers - Cached)
linux-memory.free 完全に未使用のメモリ量 MemFree
linux-memory.buffers カーネルバッファキャッシュ Buffers
linux-memory.cached ページキャッシュ Cached
linux-memory.slab スラブで使用中のメモリ Slab
linux-memory.anonpages 匿名ページで使用中のメモリ AnonPages
linux-memory.mapped mmap されたメモリ Mapped
linux-memory.pagetables ページテーブルで使用中のメモリ PageTables
linux-memory.kernelstack カーネルスタックで使用中のメモリ KernelStack
linux-memory.vmallocused vmalloc で使用中のメモリ VmallocUsed

すべてのメトリクスはバイト単位で出力されます。

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址