DataDogエージェントからのsystem.cpuメトリクス



System Cpu Metrics From Datadog Agent



名前

  • system.cpu.guest
  • パーセント(単位)
  • CPUが仮想プロセッサの実行に費やした時間の割合。ハイパーバイザーにのみ適用されます。
  • system.cpu.idle
  • パーセント(単位)
  • CPUがアイドル状態で費やした時間の割合。
  • system.cpu.iowait
  • パーセント(単位)
  • CPUがIO操作の完了を待機するのに費やした時間の割合。
  • system.cpu.stolen
  • パーセント(単位)
  • 仮想CPUがハイパーバイザーが別の仮想CPUにサービスを提供するのを待機するのに費やした時間の割合。仮想マシンにのみ適用されます。
  • system.cpu.system
  • パーセント(単位)
  • CPUがカーネルの実行に費やした時間の割合。
  • system.cpu.user
  • パーセント(単位)
  • CPUがユーザースペースプロセスの実行に費やした時間の割合。

計算式

system.cpu.guest = %guest system.cpu.idle = %idle system.cpu.iowait = %iowait system.cpu.stolen = %steal system.cpu.system = %sys + %irq + %soft system.cpu.user = %usr + %user + %nice

データソース

Linuxシステムの場合、 DataDogエージェント mpstatリアルタイム監視ツールを使用して、CPU関連のメトリックを取得します。 DataDogエージェント 各CPUの詳細は取得されませんが、すべてのCPUの平均が取得されます。

Mpstatは、リアルタイムシステムCPU監視ツールであるMultiprocessorStatisticsの略語です。監視情報はカーネルファイルから取得されます:/ proc / stat



Mpstatの出力例

# mpstat 1 3 Linux 3.10.0-693.21.1.el7.x86_64 (ip-172-31-22-228.cn-north-1.compute.internal) 08/29/2018 _x86_64_ (8 CPU) 05:59:14 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 05:59:15 AM all 8.06 0.13 7.15 0.00 0.00 0.78 0.13 0.00 0.00 83.75 05:59:16 AM all 14.61 0.00 8.16 0.00 0.00 1.05 0.26 0.00 0.00 75.92 05:59:17 AM all 18.69 0.13 5.75 0.00 0.00 0.78 0.13 0.00 0.00 74.51 Average: all 13.78 0.09 7.02 0.00 0.00 0.87 0.17 0.00 0.00 78.07

各フィールドの意味は次のとおりです(内部期間の平均)

CPU Processor number. The keyword all indicates that statistics are calculated as averages among all processors. %usr Show the percentage of CPU utilization that occurred while executing at the user level (application). %nice Show the percentage of CPU utilization that occurred while executing at the user level with nice priority. %sys Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include time spent servicing hardware and software interrupts. %iowait Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. %irq Show the percentage of time spent by the CPU or CPUs to service hardware interrupts. %soft Show the percentage of time spent by the CPU or CPUs to service software interrupts. %steal Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor. %guest Show the percentage of time spent by the CPU or CPUs to run a virtual processor. %gnice Show the percentage of time spent by the CPU or CPUs to run a niced guest. %idle Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.