FIO

FIO is an flexible I/O tester for performance on IOPS of an drive. You need the fio to be installed already to your server with:

sudo apt-get install fio

Afterwards you can look to run the test with:

fio --name=rand-write --ioengine=libaio --iodepth=32 --rw=randwrite --invalidate=1 --bsrange=4k:4k,4k:4k --size=512m --runtime=120 --time_based --do_verify=1 --direct=1 --group_reporting --numjobs=1

The test results will be from the following output:

rand-write: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=32
fio-2.16
Starting 1 process
rand-write: Laying out IO file(s) (1 file(s) / 512MB)
Jobs: 1 (f=1): [w(1)] [100.0% done] [0KB/4004KB/0KB /s] [0/1001/0 iops] [eta 00m:00s]
rand-write: (groupid=0, jobs=1): err= 0: pid=5491: Wed Nov  8 17:58:49 2017
  write: io=479820KB, bw=3997.5KB/s, iops=999, runt=120032msec
    slat (usec): min=7, max=42025, avg=40.38, stdev=533.92
    clat (usec): min=232, max=73252, avg=31975.13, stdev=3008.04
     lat (usec): min=308, max=73281, avg=32015.51, stdev=2979.46
    clat percentiles (usec):
     |  1.00th=[23936],  5.00th=[31104], 10.00th=[31360], 20.00th=[31872],
     | 30.00th=[31872], 40.00th=[31872], 50.00th=[31872], 60.00th=[32128],
     | 70.00th=[32128], 80.00th=[32128], 90.00th=[32640], 95.00th=[33024],
     | 99.00th=[39168], 99.50th=[51456], 99.90th=[63744], 99.95th=[66048],
     | 99.99th=[71168]
    lat (usec) : 250=0.01%, 750=0.02%, 1000=0.01%
    lat (msec) : 2=0.01%, 4=0.08%, 10=0.20%, 20=0.51%, 50=98.61%
    lat (msec) : 100=0.55%
  cpu          : usr=0.84%, sys=3.38%, ctx=119657, majf=0, minf=11
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=119955/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=32

Run status group 0 (all jobs):
  WRITE: io=479820KB, aggrb=3997KB/s, minb=3997KB/s, maxb=3997KB/s, mint=120032msec, maxt=120032msec

Disk stats (read/write):
  sda: ios=0/119971, merge=0/6277, ticks=0/3866664, in_queue=3867096, util=100.00%

Here we can see that our drive has an IOPS of 999 out of a set limit of 1000.