我要评分
获取效率
正确性
完整性
易理解

BioShowCacheResource

Function Definition

Queries system cache resource usage. It requires the caller to invoke the BioFreeCacheResourcePtr interface to release the allocated memory resources for the query results.

Implementation

CResult BioShowCacheResource(CacheResourcesDesc **nodeDesc, uint64_t *nodeNum)

Parameters

Table 1 Parameters

Parameter

Data Type

Input/Output

Description

nodeDesc

CacheResourcesDesc**

Output

Cache resource usage of a node. For details about the parameters, see Table 2.

nodeNum

uint64_t*

Output

Number of nodes.

Table 2 Detailed parameter description

Parameter

Structure Field

Description

CacheResourcesDesc

nodeId

Node ID.

rCacheMemCapacity

Read cache memory capacity.

rCacheDiskCapacity

Read cache drive capacity.

wCacheMemCapacity

Write cache memory capacity.

wCacheDiskCapacity

Write cache drive capacity.

rCacheMemUsedSize

Read cache memory usage.

rCacheDiskUsedSize

Read cache drive usage.

wCacheMemUsedSize

Write cache memory usage.

wCacheDiskUsedSize

Write cache drive usage.

Return Values

Table 3 Return values

Return Value

Description

RET_CACHE_OK

The operation is successful.

RET_CACHE_NOT_READY

The TurboIO service is not ready.

RET_CACHE_EPERM

The input parameter is incorrect.

RET_CACHE_NOT_FOUND

The cache instance is not found.

RET_CACHE_NO_SPACE

Insufficient space.

RET_CACHE_ERROR

The operation failed.