mc ping
The mc ping
command performs a liveness check on a specified target.
Syntax
Parameters
TARGET
Required
The full path to the alias or prefix where the command should run.
--count
Optional
Specify the number of times to perform the check.
If not specified, the liveness check performs continuously until stopped.
--error-count
Optional
Specify a number of errors to receive before exiting.
For example, to stop the ping process after receiving five errors, use
mc ping TARGET -e 5
--exit
Optional
Exit after the first successful check.
--interval
Optional
The length of time in seconds to wait between requests.
By default, the command waits 1 second between requests.
--distributed
Optional
Send requests to all servers in the AIStor cluster.
Use this option for distributed deployments where you have direct access to each node or pod. This flag does not work when nodes are placed behind a service, such as a load balancer.
Global Flags
This command supports any of the global flags.
Examples
Return Latency and Liveness for 5 Requests
The following command sends a liveness check for a deployment with the alias myminio
five times, outputs the result of each check, then ends.
mc ping myminio --count 5
Send Liveness Checks Repeatedly with 5 Minute Wait Between Each Request
The following command sends continuous liveness check requests with an interval of 5 minutes (300 seconds) between each request.
mc ping myminio --interval 300
End Liveness Checks for Error Counts Greater Than 20
The following command sends continuous liveness checks until 20 errors have been encountered:
mc ping myminio --error-count 20