PING
Returns PONG or echoes back the given message.
Syntax
Section titled “Syntax”PING [message]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | No | Optional message to echo back |
Return Value
Section titled “Return Value”- Without message: Simple string
PONG. - With message: Bulk string containing the provided message.
Behavior
Section titled “Behavior”If a non-empty message is provided, returns it as a bulk string. Otherwise, returns the simple string PONG.
This command does not require the cluster to be initialized.
Errors
Section titled “Errors”No command-specific errors.
Examples
Section titled “Examples”Without message:
127.0.0.1:5484> PINGPONGWith message:
127.0.0.1:5484> PING "hello world""hello world"