MinIO客户端之ping

发布时间 2023-12-16 00:24:15作者: jackieathome

MinIO提供了一个命令行程序mc用于协助用户完成日常的维护、管理类工作。

官方资料


检查指定的MinIO节点的服务是否可用。

不带参数,命令如下:

./mc ping local1

执行时需要手工停止,控制台的输出,如下:

  1: http://192.168.0.109:9000:9000   min=1.20s      max=1.20s      average=1.20s      errors=0   roundtrip=1.20s
  2: http://192.168.0.109:9000:9000   min=26.30ms    max=1.20s      average=614.18ms   errors=0   roundtrip=26.30ms
  3: http://192.168.0.109:9000:9000   min=0.42ms     max=1.20s      average=409.59ms   errors=0   roundtrip=0.42ms
  4: http://192.168.0.109:9000:9000   min=0.42ms     max=1.20s      average=307.38ms   errors=0   roundtrip=0.75ms
  5: http://192.168.0.109:9000:9000   min=0.33ms     max=1.20s      average=245.97ms   errors=0   roundtrip=0.33ms
  6: http://192.168.0.109:9000:9000   min=0.33ms     max=1.20s      average=205.06ms   errors=0   roundtrip=0.51ms

使用--count指定探测的次数,命令如下:

./mc ping local1 --count 5

探测5次后,自动停止,控制台的输出,如下:

  1: http://192.168.0.109:9000:9000   min=0.45ms     max=0.45ms     average=0.45ms     errors=0   roundtrip=0.45ms
  2: http://192.168.0.109:9000:9000   min=0.45ms     max=0.70ms     average=0.57ms     errors=0   roundtrip=0.70ms
  3: http://192.168.0.109:9000:9000   min=0.45ms     max=0.80ms     average=0.65ms     errors=0   roundtrip=0.80ms
  4: http://192.168.0.109:9000:9000   min=0.45ms     max=0.80ms     average=0.63ms     errors=0   roundtrip=0.58ms
  5: http://192.168.0.109:9000:9000   min=0.45ms     max=0.80ms     average=0.63ms     errors=0   roundtrip=0.63ms

使用--count指定探测的次数,同时使用--interval指定探测之间的时间间隔,命令如下:

./mc ping local1 --count 5 --interval 2

探测5次后,自动停止,控制台的输出,如下:

  1: http://192.168.0.109:9000:9000   min=0.55ms     max=0.55ms     average=0.55ms     errors=0   roundtrip=0.55ms
  2: http://192.168.0.109:9000:9000   min=0.55ms     max=0.74ms     average=0.64ms     errors=0   roundtrip=0.74ms
  3: http://192.168.0.109:9000:9000   min=0.55ms     max=0.74ms     average=0.65ms     errors=0   roundtrip=0.65ms
  4: http://192.168.0.109:9000:9000   min=0.55ms     max=0.74ms     average=0.65ms     errors=0   roundtrip=0.64ms
  5: http://192.168.0.109:9000:9000   min=0.55ms     max=11.21ms    average=2.76ms     errors=0   roundtrip=11.21ms