OpManager ナレッジベース

メモリー使用量を監視したい


概要

メモリー使用量の監視方法をご説明いたします。

解説

SNMPの場合

本手順は、カスタムSNMP監視機能を用いております。
カスタムSNMP監視機能の詳細は、こちらをご参照ください。

Windowsの場合

1) まずHOST-RESOURCES-MIBの以下の3つのOIDを取得します。

1. hrStorageType - .1.3.6.1.2.1.25.2.3.1.2
2. hrStorageAllocationUnits - .1.3.6.1.2.1.25.2.3.1.4
3. hrStorageUsed - .1.3.6.1.2.1.25.2.3.1.6

(値の取得例)

hrStorageType:
hrStorageType.1:hrStorageFixedDisk
hrStorageType.2:hrStorageCompactDisc
hrStorageType.3:hrStorageVirtualMemory
hrStorageType.4:hrStorageRam

hrStorageAllocationUnits
hrStorageAllocationUnits.1:4096
hrStorageAllocationUnits.2:0
hrStorageAllocationUnits.3:65536
hrStorageAllocationUnits.4:65536

hrStorageUsed
hrStorageUsed.1:10858635
hrStorageUsed.2:0
hrStorageUsed.3:19254
hrStorageUsed.4:99057

値の取得例の「hrStorageType」が「hrStorageRam」に対応するものを探します。

2) 計算式は以下の通りです。(計算結果はGBとなります。)

(hrStorageAllocationUnits * hrStorageUsed) / 1024 / 1024 / 1024
OID表記 :
(.1.3.6.1.2.1.25.2.3.1.4 * .1.3.6.1.2.1.25.2.3.1.6) / 1024 / 1024 / 1024
=65536 * 99057 * 1024 * 1024 * 1024 = 約 6.04 GB

※この値は、タスクマネージャーの[パフォーマンス] > [メモリ]の「使用中」とほぼ同じ値となります。

Linuxの場合

1) まずUCD-SNMP-MIBの以下のOIDを取得します。

説明)
UCD-SNMP-MIBにおける以下のOIDを使用
1. memTotalReal - .1.3.6.1.4.1.2021.4.5.0  totalメモリ
2. memAvailReal - .1.3.6.1.4.1.2021.4.6.0  freeメモリ
3. memBuffer - .1.3.6.1.4.1.2021.4.14.0 buffersメモリ
4. memCached - .1.3.6.1.4.1.2021.4.15.0 cachedメモリ

(値の取得例)

memTotalReal.0:-->3918396
memAvailReal.0:-->2187632
memBuffer.0:-->191800
memCached.0:-->568356

※この値は、linuxOSのfreeコマンドの値と一致です。

2) 計算式は以下の通りです。(計算結果は MBとなります。)

linuxにおいて、バッファ・キャッシュを抜いたメモリ使用量を求める場合
(memTotalReal - memAvailReal - memBuffer - memCached)  / 1024
OID表記 :
(.1.3.6.1.4.1.2021.4.5.0-.1.3.6.1.4.1.2021.4.6.0-.1.3.6.1.4.1.2021.4.14.0-.1.3.6.1.4.1.2021.4.15.0) / 1024
=970608  / 1024 = 約 970.608 MB

※計算式の意味
(totalメモリー - freeメモリー - buffersメモリー - cachedメモリー)  / 1024


Hyper-Vの場合

プロトコルが「VIWMI」の、監視項目「使用メモリー」を使用します。

【対応リリース】 x.x

★-----------------------------------------------------------------------------★
OpManager 製品紹介ページはこちら ↓
https://www.manageengine.jp/products/OpManager/
★-----------------------------------------------------------------------------★