Docs Home → MongoDB Manual
ping
Definition定义
ping
-
The ping
command is a no-op used to test whether a server is responding to commands. This command will return immediately even if the server is write-locked:ping
命令是一个非操作,用于测试服务器是否响应命令。即使服务器被写锁定,此命令也会立即返回:
Syntax语法
The command has the following syntax:该命令具有以下语法:
db.runCommand(
{
ping: 1
}
)
The value (e.g. 1
above) does not impact the behavior of the command.该值(例如,上面的1
)不会影响命令的行为。