サーバーのアイドル状態とスケジュールされたCPUの確認

サーバーのアイドル状態とスケジュールされたCPUの確認

Linuxサーバーで利用可能なCPUと予約されたCPUを確認したいと思います。このコマンドが見つかりmpstatました。以下は出力です。

CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
all    7.13    0.00    2.46    1.73    0.00    0.08    0.00    0.00    0.00   88.59

たとえば、%idleが1.0%の場合、使用可能なCPUの99.00%を使用しているという意味ですか?この情報を見つけるより良い方法はありますか?

ベストアンサー1

可能であれば、htopツールをインストールしてください。私はそれを愛し、何度も使用しました。似ていtopますが、より良い、よりきれいで、より多くのオプションがあります。入手するには、CPU average次の手順に従ってください。

  • 実装するhtop
  • f2設定を入力するにはタップします。
  • ~によると3 x right arrow key
  • 36 x down arrow key「次へ」をタップします。CPU average
  • 押す2 x Enterか、矢印キーを使って選択して目的の位置に移動します。
  • Spacebar必要に応じて数回押して表示形式を変更できます。

このコマンドを見てください。htopオプションがたくさんあります。 :)


次のコマンドを実行して取得できますmpstat output explanation

man mpstat

以下の結果が出力されます。

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 hard‐ ware 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.

おすすめ記事