geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
#include "geopm/Agent.hpp"
#include <cmath>
#include <cstring>
#include <sstream>
#include <iostream>
#include <mutex>
#include "geopm_agent.h"
#include "geopm_plugin.hpp"
#include "geopm_pio.h"
#include "MonitorAgent.hpp"
#include "PowerBalancerAgent.hpp"
#include "PowerGovernorAgent.hpp"
#include "FrequencyMapAgent.hpp"
#include "geopm/Environment.hpp"
#include "geopm/Helper.hpp"
#include "geopm/Exception.hpp"
Namespaces | |
geopm | |
Functions | |
AgentFactory & | geopm::agent_factory (void) |
int | geopm_agent_supported (const char *agent_name) |
Query if system supports an agent type. More... | |
int | geopm_agent_num_policy (const char *agent_name, int *num_policy) |
Get number of policy parameters supported by agent. More... | |
int | geopm_agent_num_sample (const char *agent_name, int *num_sample) |
The number of sampled parameters provided by agent. More... | |
int | geopm_agent_policy_name (const char *agent_name, int policy_idx, size_t policy_name_max, char *policy_name) |
Get the name of a policy parameter. More... | |
int | geopm_agent_sample_name (const char *agent_name, int sample_idx, size_t sample_name_max, char *sample_name) |
The name of the indexed sample value. More... | |
int | geopm_agent_policy_json (const char *agent_name, const double *policy_array, size_t json_string_max, char *json_string) |
Create a json file to control agent policy statically. More... | |
int | geopm_agent_policy_json_partial (const char *agent_name, size_t policy_array_size, const double *policy_array, size_t json_string_max, char *json_string) |
Create a json file to control agent policy statically. More... | |
int | geopm_agent_name (int agent_idx, size_t agent_name_max, char *agent_name) |
The name of a specific agent. More... | |
int | geopm_agent_num_avail (int *num_agent) |
The number of available agents. More... | |
int geopm_agent_name | ( | int | agent_idx, |
size_t | agent_name_max, | ||
char * | agent_name | ||
) |
The name of a specific agent.
[in] | agent_idx | The index of the agent in question. |
[in] | agent_name_max | Number of bytes allocated for the agent_name string. |
[out] | agent_name | The name of the agent parameter provided by the indexed entry when the geopm_endpoint_num_agent() function is called. String is unmodified if an error condition occurs. |
int geopm_agent_num_avail | ( | int * | num_agent | ) |
The number of available agents.
[out] | num_agent | The number of agents currently available. |
int geopm_agent_num_policy | ( | const char * | agent_name, |
int * | num_policy | ||
) |
Get number of policy parameters supported by agent.
[in] | agent_name | name of agent type. |
[out] | num_policy | Number of policy parameters required by agent. |
int geopm_agent_num_sample | ( | const char * | agent_name, |
int * | num_sample | ||
) |
The number of sampled parameters provided by agent.
[in] | agent_name | Name of agent type. |
[out] | num_sample | The number of values provided by the agent when the geopm_agent_sample_name() function is called. |
int geopm_agent_policy_json | ( | const char * | agent_name, |
const double * | policy_array, | ||
size_t | json_string_max, | ||
char * | json_string | ||
) |
Create a json file to control agent policy statically.
[in] | agent_name | Name of agent type. |
[in] | policy_array | Values for each of the policy parameters supported by the agent, array length is determined by the geopm_agent_num_policy() function. |
[in] | json_string_max | Number of bytes allocated for json_string output. |
[out] | json_string | Buffer that will be populated with JSON that can be used to create a policy file. |
int geopm_agent_policy_json_partial | ( | const char * | agent_name, |
size_t | policy_array_size, | ||
const double * | policy_array, | ||
size_t | json_string_max, | ||
char * | json_string | ||
) |
Create a json file to control agent policy statically.
[in] | agent_name | Name of agent type. |
[in] | policy_array_size | Number of policy parameters in the array. The number of policies passed must be less than or equal to the number returned by the geopm_agent_num_policy() function. |
[in] | policy_array | Values for each of the policy parameters. |
[in] | json_string_max | Number of bytes allocated for json_string output. |
[out] | json_string | Buffer that will be populated with JSON that can be used to create a policy file. |
int geopm_agent_policy_name | ( | const char * | agent_name, |
int | policy_idx, | ||
size_t | policy_name_max, | ||
char * | policy_name | ||
) |
Get the name of a policy parameter.
[in] | agent_name | Name of agent type. |
[in] | policy_idx | Index into policy vector. |
[in] | policy_name_max | Number of bytes allocated for the policy_name string. |
[out] | policy_name | The name of the policy controlled by the indexed entry. String is unmodified if an error condition occurs. |
int geopm_agent_sample_name | ( | const char * | agent_name, |
int | sample_idx, | ||
size_t | sample_name_max, | ||
char * | sample_name | ||
) |
The name of the indexed sample value.
[in] | agent_name | Name of agent type. |
[in] | sample_idx | Index into sampled parameters. |
[in] | sample_name_max | Number of bytes allocated for the sample_name string. |
[out] | sample_name | The name of the sample parameter provided by the indexed entry when the geopm_agent_sample_name() function is called. String is unmodified if an error condition occurs. |
int geopm_agent_supported | ( | const char * | agent_name | ) |
Query if system supports an agent type.
[in] | agent_name | Name of agent type. |