Variorum JSON-Support Functions

Variorum provides the following high-level functions that return a JSON object for easier integration with external software.

Defined in variorum/variorum.h.

Warning

doxygenfunction: Cannot find function “variorum_get_node_power_json” in doxygen xml output for project “variorum” from directory: ../dox/xml

int variorum_get_node_power_domain_info_json(char **get_domain_obj_str)

Populate a string in JSON format with measurable and controllable power domains, along with the ranges.

Supported Architectures:

  • AMD EPYC Milan

  • ARM Juno r2

  • Ampere Neoverse N1

  • IBM Power9

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

  • Intel Sapphire Rapids

Parameters:

get_domain_obj_str[out] String (passed by reference) that contains the node-level domain information.

Returns:

0 if successful, otherwise -1. Note that feature not implemented returns a -1 for the JSON APIs so that users don’t have to explicitly check for NULL strings.

int variorum_get_thermals_json(char **get_thermal_obj_str)

Populate a string in nested JSON format for temperature readouts.

Format: hostname { Socket_n { CPU { Core { Sensor Name : Temp in C }, Mem { Sensor Name : Temp in C } } GPU { Device : Temp in C } } } where n is the socket number

Supported Architectures:

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • IBM Power9

  • AMD Instinct

  • NVIDIA Volta

Parameters:

get_thermal_obj_str[out] String (passed by reference) that contains node-level thermal information.

Returns:

0 if successful, otherwise -1. Note that feature not implemented returns a -1 for the JSON APIs so that users don’t have to explicitly check for NULL strings.

int variorum_get_frequency_json(char **get_frequency_obj_str)

Populate a string in JSON format with node level frequency information.

Supported Architectures:

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • IBM Power9

  • AMD Instinct

  • NVIDIA Volta

Parameters:

get_frequency_obj_str[out] String (passed by reference) that contains the node-level frequency information.

Returns:

0 if successful, otherwise -1. Note that feature not implemented returns a -1 for the JSON APIs so that users don’t have to explicitly check for NULL strings.

int variorum_get_utilization_json(char **get_util_obj_str)

Populate a string in JSON format with total CPU node utilization, user CPU utilization, kernel CPU utilization, total node memory utilization, and GPU utilization.

Format: { “hostname”: { “CPU”: { “total_util%”: total_CPU_utilization, “user_util%”: user_utilization, “system_util%”: system_utilization, }, “GPU”: { Socket_n : { GPUnm_util% : GPU_utilization }, “memory_util%”: total_memory_utilization, “timestamp” : timestamp } where n is the socket number and m is the GPU id.

Supported Architectures:

  • AMD Radeon Instinct GPUs (MI50 onwards)

  • NVIDIA Volta

Architectures that do not have API support:

  • AMD EPYC Milan

  • IBM Power9

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Ice Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

Parameters:

get_util_obj_str[out] String (passed by reference) that contains node-level utilization information.

Returns:

0 if successful, otherwise -1. Note that feature not implemented returns a -1 for the JSON APIs so that users don’t have to explicitly check for NULL strings.

int variorum_get_energy_json(char **get_energy_obj_str)

Populate a string in JSON format with node level energy information.

Supported Architectures:

  • IBM Power9

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

Parameters:

get_energy_obj_str[out] String (passed by reference) containing the node-level energy information.

Returns:

0 if successful, otherwise -1. Note that feature not implemented returns a -1 for the JSON APIs so that users don’t have to explicitly check for NULL strings.