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.

int variorum_get_node_power_json(char **get_power_obj_str)

Populate a string in JSON format with total node power, socket-level, memory-level and GPU-level power.

Supported Architectures:

  • AMD EPYC Milan

  • ARM Juno r2 - 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

Return

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.

Parameters
  • [out] output: String (passed by reference) that contains the node-level power information.

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 - 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

Return

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.

Parameters
  • [out] output: String (passed by reference) that contains the node-level domain information.