Dynamic Load Balance 3.6.1+32-59d1
dlb_stats.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2024 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20#ifndef DLB_STATS_H
21#define DLB_STATS_H
22
23#ifdef __cplusplus
24extern "C"
25{
26#endif
27
28/*********************************************************************************/
29/* Statistics Module */
30/*********************************************************************************/
31
35int DLB_Stats_Init(void);
36
40int DLB_Stats_Finalize(void);
41
46int DLB_Stats_GetNumCpus(int *ncpus);
47
54int DLB_Stats_GetPidList(int *pidlist,int *nelems,int max_len);
55
61int DLB_Stats_GetCpuUsage(int pid, double *usage);
62
68int DLB_Stats_GetCpuAvgUsage(int pid, double *usage);
69
76int DLB_Stats_GetCpuUsageList(double *usagelist,int *nelems,int max_len);
77
84int DLB_Stats_GetCpuAvgUsageList(double *avgusagelist,int *nelems,int max_len);
85
90int DLB_Stats_GetNodeUsage(double *usage);
91
96int DLB_Stats_GetNodeAvgUsage(double *usage);
97
103int DLB_Stats_GetActiveCpus(int pid, int *ncpus);
104
111int DLB_Stats_GetActiveCpusList(int *cpuslist,int *nelems,int max_len);
112
118int DLB_Stats_GetLoadAvg(int pid, double *load);
119
127int DLB_Stats_GetCpuStateIdle(int cpu, float *percentage)
128 __attribute__((deprecated("Functionality no longer provided")));
129
137int DLB_Stats_GetCpuStateOwned(int cpu, float *percentage)
138 __attribute__((deprecated("Functionality no longer provided")));
139
147int DLB_Stats_GetCpuStateGuested(int cpu, float *percentage)
148 __attribute__((deprecated("Functionality no longer provided")));
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif /* DLB_STATS_H */
__attribute__((constructor))
Definition: DLB_interface.c:47
int DLB_Stats_GetCpuUsage(int pid, double *usage)
Get the CPU Usage of the given PID.
Definition: DLB_interface_stats.c:63
int DLB_Stats_Init(void)
Initialize DLB Statistics Module.
Definition: DLB_interface_stats.c:35
int DLB_Stats_GetCpuAvgUsage(int pid, double *usage)
Get the CPU Average Usage of the given PID.
Definition: DLB_interface_stats.c:69
int DLB_Stats_GetPidList(int *pidlist, int *nelems, int max_len)
Get the PID's attached to this module.
Definition: DLB_interface_stats.c:57
int DLB_Stats_GetCpuAvgUsageList(double *avgusagelist, int *nelems, int max_len)
Get the CPU Average usage of all the attached PIDs.
Definition: DLB_interface_stats.c:81
int DLB_Stats_Finalize(void)
Finalize DLB Statistics Module.
Definition: DLB_interface_stats.c:45
int DLB_Stats_GetCpuStateIdle(int cpu, float *percentage) __attribute__((deprecated("Functionality no longer provided")))
Get the percentage of time that the CPU has been in state IDLE.
Definition: DLB_interface_stats.c:116
int DLB_Stats_GetLoadAvg(int pid, double *load)
Get the Load Average of a given process.
Definition: DLB_interface_stats.c:111
int DLB_Stats_GetCpuStateGuested(int cpu, float *percentage) __attribute__((deprecated("Functionality no longer provided")))
Get the percentage of time that the CPU has been in state GUESTED.
Definition: DLB_interface_stats.c:126
int DLB_Stats_GetActiveCpusList(int *cpuslist, int *nelems, int max_len)
Get the number of CPUs assigned to each process.
Definition: DLB_interface_stats.c:105
int DLB_Stats_GetCpuUsageList(double *usagelist, int *nelems, int max_len)
Get the CPU usage of all the attached PIDs.
Definition: DLB_interface_stats.c:75
int DLB_Stats_GetNumCpus(int *ncpus)
Get the total number of available CPUs in the node.
Definition: DLB_interface_stats.c:51
int DLB_Stats_GetCpuStateOwned(int cpu, float *percentage) __attribute__((deprecated("Functionality no longer provided")))
Get the percentage of time that the CPU has been in state OWNED.
Definition: DLB_interface_stats.c:121
int DLB_Stats_GetActiveCpus(int pid, int *ncpus)
Get the number of CPUs assigned to a given process.
Definition: DLB_interface_stats.c:99
int DLB_Stats_GetNodeUsage(double *usage)
Get the CPU Usage of all the DLB processes in the node.
Definition: DLB_interface_stats.c:87
int DLB_Stats_GetNodeAvgUsage(double *usage)
Get the CPU Average Usage of all the DLB processes in the node.
Definition: DLB_interface_stats.c:93