How to measure IOPS for a command in linux?

后端 未结 3 1677
盖世英雄少女心
盖世英雄少女心 2021-02-20 05:07

I\'m working on a simulation model, where I want to determine when the storage IOPS capacity becomes a bottleneck (e.g. and HDD has ~150 IOPS, while an SSD can have 150,000). So

3条回答
  •  Happy的楠姐
    2021-02-20 05:45

    The iotop command collects I/O usage information about processes on Linux. By default, it is an interactive command but you can run it in batch mode with -b / --batch. Also, you can a list of processes with -p / --pid. Thus, you can monitor the activity of a git command with:

    $ sudo iotop -p $(pidof git) -b
    

    You can change the delay with -d / --delay.

提交回复
热议问题