Linuxで各プロセスまたはスレッドの合計読み取り/書き込みIOPSを取得する方法は?

Linuxで各プロセスまたはスレッドの合計読み取り/書き込みIOPSを取得する方法は?

システムでIOPSが最も高いプロセスを見つけたいと思います。どうすればいいですか?

ベストアンサー1

IOPS(1秒あたりの入出力操作)が最も高いプロセスを見つけるには、いくつかのCLIツールを使用できますが(sar私の頭の上で)私はそれが好きです。オートフ最高。これには、1秒あたりの読み取り/書き込みバイトとプロセスあたりのIO使用率とともに、現在および合計IOPSを表示する上部に似たテキストモードのUIがあります。

iotopほとんどのパッケージストアに存在します。

TUIモードのコントロールは非常に簡単です。

Left and right arrows to change the sorting column, r to invert the
sorting order, o to toggle the --only option, p to toggle the --processes
option, a to toggle the --accumulated option, i to change I/O priority, q to
quit, any other key to force a refresh.

iotopCLIツール呼び出しでコマンドラインオプションを使用することもできます。

  -o, --only            only show processes or threads actually doing I/O
  -b, --batch           non-interactive mode
  -n NUM, --iter=NUM    number of iterations before ending [infinite]
  -d SEC, --delay=SEC   delay between iterations [1 second]
  -p PID, --pid=PID     processes/threads to monitor [all]
  -u USER, --user=USER  users to monitor [all]
  -P, --processes       only show processes, not all threads
  -a, --accumulated     show accumulated I/O instead of bandwidth
  -k, --kilobytes       use kilobytes instead of a human friendly unit
  -t, --time            add a timestamp on each line (implies --batch)
  -q, --quiet           suppress some lines of header (implies --batch)

おすすめ記事