lmcache ping#

lmcache ping 命令用于检查 LMCache KV Cache 服务器或 vLLM 服务引擎的存活状态。

# Ping the KV cache server (default: http://localhost:8080)
lmcache ping kvcache

# Ping the serving engine (default: http://localhost:8000)
lmcache ping engine --url http://localhost:8000
======= Ping KV Cache ========
Status:                   OK
Round trip time (ms):     3.42
==============================

ping kvcache 检查 /healthcheck 端点; ping engine 检查 /health

选项#

标志

描述

kvcache | engine

要 ping 的目标(位置参数,必填)。

--url

服务器 URL。对于 kvcache 默认为 http://localhost:8080,对于 engine 默认为 http://localhost:8000

--format

输出格式:terminal``(默认)或``json

--output PATH

将指标保存到文件中(格式遵循 --format)。

-q / --quiet

抑制标准输出。仅返回退出代码。

JSON 输出#

lmcache ping kvcache --format json
{
  "title": "Ping KV Cache",
  "metrics": {
    "status": "OK",
    "round_trip_time_ms": 3.42
  }
}

退出代码#

代码

含义

0

服务器可达(HTTP 200)。

1

连接失败或非 200 响应。