Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Functions
Switch CPU API [OPENAPI_SWITCH_CPU]

Data Structures

struct  OPEN_CPU_PERIOD_UTIL_INFO_t
 

Macros

#define OPEN_CPU_UTIL_SCALAR   10000
 

Functions

open_error_t openapiCpuUtilMaxPeriodsGet (openapiClientHandle_t *client_handle, uint32_t *max)
 Get the maximum number of periods tracked for CPU utilization. More...
 
open_error_t openapiTotalCpuUtilArrayGet (openapiClientHandle_t *client_handle, open_buffdesc *data)
 Get CPU utilization for all tracked periods. More...
 

Detailed Description

Function Documentation

open_error_t openapiCpuUtilMaxPeriodsGet ( openapiClientHandle_t client_handle,
uint32_t *  max 
)

Get the maximum number of periods tracked for CPU utilization.

Parameters
[in]client_handleClient handle from registration API
[out]maxMaximum number of tracked CPU utilization periods.
Return values
OPEN_E_NONEoperation was successful.
OPEN_E_PARAMan invalid parameter was passed.

OpEN API Version: 1.18

Examples:
switch_cpu_example.c.
open_error_t openapiTotalCpuUtilArrayGet ( openapiClientHandle_t client_handle,
open_buffdesc data 
)

Get CPU utilization for all tracked periods.

Parameters
[in]client_handleClient handle from registration API
[out]dataCPU Utilization data.
Return values
OPEN_E_NONEoperation was successful.
OPEN_E_FAILa failure occurred.
OPEN_E_PARAMan invalid parameter was passed.
Note
Minimum number of bytes in data buffer is found by calling openapiCpuUtilMaxPeriodsGet() and multiplying the result by sizeof(OPEN_CPU_PERIOD_UTIL_INFO_t).
Values in the utilization field of OPEN_CPU_PERIOD_UTIL_INFO_t are floating point scaled by OPEN_CPU_UTIL_SCALAR and represented as unsigned integer values. For example, 15.4567% will be represented as 154567.

OpEN API Version: 1.18

Examples:
switch_cpu_example.c.