Dynamic Load Balance 3.6.1+32-59d1
Functions
DLB_interface_stats.c File Reference
#include "apis/dlb_stats.h"
#include "LB_comm/shmem_procinfo.h"
#include "LB_core/spd.h"
#include "apis/dlb_errors.h"
#include "support/dlb_common.h"
#include "support/mask_utils.h"
#include "support/options.h"
#include <stddef.h>
Include dependency graph for DLB_interface_stats.c:

Functions

DLB_EXPORT_SYMBOL int DLB_Stats_Init (void)
 Initialize DLB Statistics Module. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_Finalize (void)
 Finalize DLB Statistics Module. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetNumCpus (int *ncpus)
 Get the total number of available CPUs in the node. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetPidList (int *pidlist, int *nelems, int max_len)
 Get the PID's attached to this module. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuUsage (int pid, double *usage)
 Get the CPU Usage of the given PID. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuAvgUsage (int pid, double *usage)
 Get the CPU Average Usage of the given PID. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuUsageList (double *usagelist, int *nelems, int max_len)
 Get the CPU usage of all the attached PIDs. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuAvgUsageList (double *avgusagelist, int *nelems, int max_len)
 Get the CPU Average usage of all the attached PIDs. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetNodeUsage (double *usage)
 Get the CPU Usage of all the DLB processes in the node. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetNodeAvgUsage (double *usage)
 Get the CPU Average Usage of all the DLB processes in the node. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetActiveCpus (int pid, int *ncpus)
 Get the number of CPUs assigned to a given process. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetActiveCpusList (int *cpuslist, int *nelems, int max_len)
 Get the number of CPUs assigned to each process. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetLoadAvg (int pid, double *load)
 Get the Load Average of a given process. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateIdle (int cpu, float *percentage)
 Get the percentage of time that the CPU has been in state IDLE. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateOwned (int cpu, float *percentage)
 Get the percentage of time that the CPU has been in state OWNED. More...
 
DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateGuested (int cpu, float *percentage)
 Get the percentage of time that the CPU has been in state GUESTED. More...
 

Function Documentation

◆ DLB_Stats_Init()

DLB_EXPORT_SYMBOL int DLB_Stats_Init ( void  )

Initialize DLB Statistics Module.

Returns
error code

◆ DLB_Stats_Finalize()

DLB_EXPORT_SYMBOL int DLB_Stats_Finalize ( void  )

Finalize DLB Statistics Module.

Returns
error code

◆ DLB_Stats_GetNumCpus()

DLB_EXPORT_SYMBOL int DLB_Stats_GetNumCpus ( int *  ncpus)

Get the total number of available CPUs in the node.

Parameters
[out]ncpusthe number of CPUs
Returns
error code

◆ DLB_Stats_GetPidList()

DLB_EXPORT_SYMBOL int DLB_Stats_GetPidList ( int *  pidlist,
int *  nelems,
int  max_len 
)

Get the PID's attached to this module.

Parameters
[out]pidlistThe output list
[out]nelemsNumber of elements in the list
[in]max_lenMax capacity of the list
Returns
error code

◆ DLB_Stats_GetCpuUsage()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuUsage ( int  pid,
double *  usage 
)

Get the CPU Usage of the given PID.

Parameters
[in]pidPID to consult
[out]usagethe CPU usage of the given PID, or -1.0 if not found
Returns
error code

◆ DLB_Stats_GetCpuAvgUsage()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuAvgUsage ( int  pid,
double *  usage 
)

Get the CPU Average Usage of the given PID.

Parameters
[in]pidPID to consult
[out]usagethe CPU usage of the given PID, or -1.0 if not found
Returns
error code

◆ DLB_Stats_GetCpuUsageList()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuUsageList ( double *  usagelist,
int *  nelems,
int  max_len 
)

Get the CPU usage of all the attached PIDs.

Parameters
[out]usagelistThe output list
[out]nelemsNumber of elements in the list
[in]max_lenMax capacity of the list
Returns
error code

◆ DLB_Stats_GetCpuAvgUsageList()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuAvgUsageList ( double *  avgusagelist,
int *  nelems,
int  max_len 
)

Get the CPU Average usage of all the attached PIDs.

Parameters
[out]avgusagelistThe output list
[out]nelemsNumber of elements in the list
[in]max_lenMax capacity of the list
Returns
error code

◆ DLB_Stats_GetNodeUsage()

DLB_EXPORT_SYMBOL int DLB_Stats_GetNodeUsage ( double *  usage)

Get the CPU Usage of all the DLB processes in the node.

Parameters
[out]usagethe Node Usage
Returns
error code

◆ DLB_Stats_GetNodeAvgUsage()

DLB_EXPORT_SYMBOL int DLB_Stats_GetNodeAvgUsage ( double *  usage)

Get the CPU Average Usage of all the DLB processes in the node.

Parameters
[out]usagethe Node Usage
Returns
error code

◆ DLB_Stats_GetActiveCpus()

DLB_EXPORT_SYMBOL int DLB_Stats_GetActiveCpus ( int  pid,
int *  ncpus 
)

Get the number of CPUs assigned to a given process.

Parameters
[in]pidProcess ID to consult
[out]ncpusthe number of CPUs used by a process
Returns
error code

◆ DLB_Stats_GetActiveCpusList()

DLB_EXPORT_SYMBOL int DLB_Stats_GetActiveCpusList ( int *  cpuslist,
int *  nelems,
int  max_len 
)

Get the number of CPUs assigned to each process.

Parameters
[out]cpuslistThe output list
[out]nelemsNumber of elements in the list
[in]max_lenMax capacity of the list
Returns
error code

◆ DLB_Stats_GetLoadAvg()

DLB_EXPORT_SYMBOL int DLB_Stats_GetLoadAvg ( int  pid,
double *  load 
)

Get the Load Average of a given process.

Parameters
[in]pidProcess ID to consult
[out]loaddouble[3] Load Average ( 1min 5min 15min )
Returns
error code

◆ DLB_Stats_GetCpuStateIdle()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateIdle ( int  cpu,
float *  percentage 
)

Get the percentage of time that the CPU has been in state IDLE.

Parameters
[in]cpuCPU id
[out]percentagepercentage of state/total
Returns
error code

DEPRECATED: Functionality no longer provided.

◆ DLB_Stats_GetCpuStateOwned()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateOwned ( int  cpu,
float *  percentage 
)

Get the percentage of time that the CPU has been in state OWNED.

Parameters
[in]cpuCPU id
[out]percentagepercentage of state/total
Returns
error code

DEPRECATED: Functionality no longer provided.

◆ DLB_Stats_GetCpuStateGuested()

DLB_EXPORT_SYMBOL int DLB_Stats_GetCpuStateGuested ( int  cpu,
float *  percentage 
)

Get the percentage of time that the CPU has been in state GUESTED.

Parameters
[in]cpuCPU id
[out]percentagepercentage of state/total
Returns
error code

DEPRECATED: Functionality no longer provided.