# \</>CLI管理命令

### 1.查看当前存储使用情况：

命令可以展示Titan已用存储空间、用户设定的存储空间上限、以及当前可用存储空间。

```
titan-edge info
```

### 2.启动/停止节点服务：

允许用户通过命令启动或停止节点的服务，提供灵活的节点管理。

启动命令例：

```
titan-edge daemon start
```

停止命令例：

```
titan-edge daemon stop
```

### 3.查看设备ID

功能描述：显示当前节点的设备ID，这是节点在Titan网络中的唯一标识符。

```
titan-edge info
```

### 4.修改存储路径

```
titan-edge config set --storage-path /new/path/to/storage
```

**功能描述**

此命令允许您为Titan节点指定一个新的数据存储路径，用以存放所有节点数据。

**参数说明**

* `/new/path/to/storage`：请替换成您希望设置的新存储路径。

**重要步骤和注意事项**

**执行命令后**：原有的文件将自动迁移到新指定的目录。请注意，此过程不会删除旧目录中的文件。您需要手动访问旧目录并删除这些文件。

**重启节点**：为了让路径修改生效，您需要手动重启节点。请参照文档的[**第2个**](#id-2.-qi-dong-ting-zhi-jie-dian-fu-wu)操作，先停止节点，然后再启动。

**下载中的文件**：如果在执行路径修改操作时有文件正在下载，该操作可能会导致当前下载失败。请确保在修改存储路径前，没有进行中的下载任务。

### 5.修改存储空间大小

要设置Titan节点允许使用的最大存储空间大小，请执行以下命令：

```
titan-edge config set --storage-size 50GB
```

**功能描述**

此命令允许您调整分配给Titan节点使用的存储空间上限，以管理节点的数据容量。

**参数说明**

* `50GB`：请将此值替换为您希望设置的存储空间大小。大小可以根据需要设定，例如`100GB`、`500GB`等。

**重要步骤和注意事项**

**执行命令后的操作**：更改存储空间大小设置后，为了让这一更改生效，您需要手动重启Titan节点。

**重启节点**：请遵循文档中的[**第2个**](#id-2.-qi-dong-ting-zhi-jie-dian-fu-wu)操作步骤来重启节点。这包括先停止节点，然后再启动。

### 6.查看配置

此命令允许您查看Titan节点的所有配置设置，并可用于验证配置修改是否正确应用。

```
titan-edge config show
```

**生效条件**：请注意，虽然配置可能已经被修改并显示为新值，这些更改需要重启节点后才会生效。确保在做出重要配置更改后，按照正确的程序重启您的Titan节点。

### 7.查看设备绑定信息

要显示当前Titan节点的设备绑定信息，请使用以下命令：

```
titan-edge show binding-info https://web-server-api-url
```

**注**：在命令中，`https://web-server-api-url` 应替换为当前网络实际使用的Web服务器API URL，如下：

```
https://api-test1.container1.titannet.io/api/v2/device
```

在未来，网络实际使用的Web服务器API URL可能会不定期更新。

### 8.查看节点是否有下载任务

要查看Titan节点是否有正在进行的下载任务，请使用以下命令：

```
titan-edge cache
```

**功能描述**

此命令提供了有关Titan节点缓存状态的信息，包括等待缓存的资产数量。这些信息帮助您了解节点当前是否正在处理下载任务。

<figure><img src="/files/Lhyf9KDmXUSZiBTvTyNI" alt=""><figcaption></figcaption></figure>

\*如上图所示，图中的 wait cache asset count 不为0时，代表节点有下载任务。

### 9.后台运行指令

```
nohup ./titan-edge daemon start --init --url https://test-locator.titannet.io:5000/rpc/v0  > edge.log 2>&1 &
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titannet.gitbook.io/titan-network-cn/hui-geng-si-ce-shi-wang/huygens-testnet/an-zhuang-cheng-xu-zhuan-qu/cli-guan-li-ming-ling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
