---
title: check_link_status
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/llmdatadistdev/llmpr_42_0009.html
sourcePath: /source/zh/canncommercial/900/others/llmdatadistdev/llmpr_42_0009.html
indexId: e71a8fca73e1344296b0b101ce725dcb63140ec094286df692833136b999195970
---
# check_link_status

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | x |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


说明：针对 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 ，仅支持Atlas 800I A2 推理服务器、A200I A2 Box 异构组件。


#### 函数功能

可快速检测链路状态是否正常。


#### 函数原型

```
check_link_status(remote_cluster_id: int)
```


#### 参数说明

| 参数名称 | 数据类型 | 取值说明 |
| --- | --- | --- |
| remote\_cluster\_id | int | 远程集群ID。 |


#### 调用示例

```
from llm_datadist import LLMDataDist, LLMRole, LLMStatusCode, LLMClusterInfo
try:
    data_dist.check_link_status(remote_cluster_id=0)
except LLMException as ex:
    print(f"check_link_status exception:{ex.status_code}")
    raise ex
kv_cache_manager = data_dist.kv_cache_manager
kv_cache_manager.pull_cache(prompt_cache_key, local_kv_cache, batch_index=0)
```


#### 返回值

正常情况下无返回值。

运行失败会抛出LLMException异常。

参数错误可能抛出TypeError或ValueError。


#### 约束说明

只有Client侧可以调用。

调用失败如果异常错误码是不可恢复错误码，需重新建链。

调用失败时，需持续调用该接口直至成功，才能调用pull_cache、pull_blocks等接口。

该接口如果和pull_cache、pull_blocks等接口并发，可能抛出LLMException异常，错误码为LLM_LINK_BUSY。

超时时间由llm.SyncKvCacheWaitTime配置项指定。
