|
libadc-cxx 1.0.0
Structured logging for scientific computing
|
ldms_message_publish utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to ldmsd by invoking the 'ldms_message_publish' utility available in ldms versions from 4.5. Use the ldmsd_stream_publish_plugin for ldms versions 4.4 and below. More...


Public Member Functions | |
| ldms_message_publish_plugin () | |
| int | publish (std::shared_ptr< builder_api > b) |
| Publish the content of the builder. | |
| int | config (const std::map< std::string, std::string > &m) |
| Configure the plugin with the options given. | |
| int | config (const std::map< std::string, std::string > &m, string_view env_prefix) |
| Configure the plugin with the options given and the corresponding environment variables. | |
| const std::map< const std::string, const std::string > & | get_option_defaults () |
| Look up the settable options and their defaults. | |
| int | initialize () |
| Ready the plugin to publish following the configuration options set or defaulted. | |
| void | finalize () |
| Stop publishing and release any resources held for managing publication. | |
| void | pause () |
| Pause publishing until a call to resume. Duplicate calls are allowed. | |
| void | resume () |
| Resume publishing Duplicate calls are allowed. | |
| string_view | name () const |
| string_view | version () const |
| ~ldms_message_publish_plugin () | |
Static Public Attributes | |
| static const char * | adc_ldms_message_publish_plugin_directory_default = "/dev/shm/adc" |
| scratch directory for ldms_message_publish utility messages This directory must be globally writable and should be fast. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_DIRECTORY"). | |
| static const char * | adc_ldms_message_publish_plugin_prog_default = "/usr/sbin/ldms_msg_publish" |
| full path to ldms_message_publish utility This program should be world accessible. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_PROG"). | |
| static const char * | adc_ldms_message_publish_plugin_channel_default = "adc_publish_api" |
| channel of the ADC messages published LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_CHANNEL"). | |
| static const char * | adc_ldms_message_publish_plugin_auth_default = "munge" |
| authentication method for ldms message connections; ldmsd listeners must match. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_AUTH"). | |
| static const char * | adc_ldms_message_publish_plugin_port_default = "412" |
| port for message connections; ldmsd listeners must match. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_PORT"). | |
| static const char * | adc_ldms_message_publish_plugin_host_default = "localhost" |
| host for message connections; ldmsd must be listening on the host. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_HOST"). | |
| static const char * | adc_ldms_message_publish_plugin_affinity_default = "all" |
| affinity for spawned processes; defaults to all If not all, it should be a range list of cpu numbers, e,g. "0-1,56-57" on a 56 core hyperthreaded processor where admin tools should run on 2 lowest cores. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_AFFINITY"). | |
| static const char * | adc_ldms_message_publish_plugin_debug_default = "0" |
| ADC ldms-message plugin enable debug messages; (default "0": none) Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_DEBUG"). | |
ldms_message_publish utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to ldmsd by invoking the 'ldms_message_publish' utility available in ldms versions from 4.5. Use the ldmsd_stream_publish_plugin for ldms versions 4.4 and below.
Multiple independent instances of this plugin may be used simultaneously. The asynchronous tranmission spawns a separate shell process to handle tranmission and file cleanup.
Definition at line 27 of file ldms_message_publish.ipp.
|
inline |
Definition at line 182 of file ldms_message_publish.ipp.
|
inline |
Definition at line 295 of file ldms_message_publish.ipp.
|
inlinevirtual |
Publish the content of the builder.
| b | converted to a single json object and published |
Implements adc::publisher_api.
Definition at line 185 of file ldms_message_publish.ipp.
|
inlinevirtual |
Configure the plugin with the options given.
| m | a map with keys documented in the plugin-specific header. |
For plugin QQQ, Environment variables ADC_QQQ_PLUGIN_* will override the source code default for any key not defined in m. Here QQQ is the uppercase version of the plugin name.
Implements adc::publisher_api.
Definition at line 220 of file ldms_message_publish.ipp.
|
inlinevirtual |
Configure the plugin with the options given and the corresponding environment variables.
| m | a map with keys documented in the plugin-specific header. |
| env_prefix | is prepended to the expected keys for the plugin and values found with getenv that match are used, overriding elements of m. Typically, env_prefix will be PPP_ADC_QQQ_PLUGIN_ if application PPP wants to override the defaults of plugin QQQ. Here QQQ is the uppercase version of the plugin name. |
Implements adc::publisher_api.
Definition at line 224 of file ldms_message_publish.ipp.
|
inlinevirtual |
Look up the settable options and their defaults.
Some plugins without options will return an empty map.
Implements adc::publisher_api.
Definition at line 235 of file ldms_message_publish.ipp.
|
inlinevirtual |
Ready the plugin to publish following the configuration options set or defaulted.
Implements adc::publisher_api.
Definition at line 239 of file ldms_message_publish.ipp.
|
inlinevirtual |
Stop publishing and release any resources held for managing publication.
Implements adc::publisher_api.
Definition at line 267 of file ldms_message_publish.ipp.
|
inlinevirtual |
Pause publishing until a call to resume. Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 279 of file ldms_message_publish.ipp.
|
inlinevirtual |
Resume publishing Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 283 of file ldms_message_publish.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 287 of file ldms_message_publish.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 291 of file ldms_message_publish.ipp.
|
inlinestatic |
scratch directory for ldms_message_publish utility messages This directory must be globally writable and should be fast. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_DIRECTORY").
Definition at line 42 of file ldms_message_publish.ipp.
|
inlinestatic |
full path to ldms_message_publish utility This program should be world accessible. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_PROG").
Definition at line 47 of file ldms_message_publish.ipp.
|
inlinestatic |
channel of the ADC messages published LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_CHANNEL").
Definition at line 52 of file ldms_message_publish.ipp.
|
inlinestatic |
authentication method for ldms message connections; ldmsd listeners must match. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_AUTH").
Definition at line 56 of file ldms_message_publish.ipp.
|
inlinestatic |
port for message connections; ldmsd listeners must match. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_PORT").
Definition at line 60 of file ldms_message_publish.ipp.
|
inlinestatic |
host for message connections; ldmsd must be listening on the host. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_HOST").
Definition at line 64 of file ldms_message_publish.ipp.
|
inlinestatic |
affinity for spawned processes; defaults to all If not all, it should be a range list of cpu numbers, e,g. "0-1,56-57" on a 56 core hyperthreaded processor where admin tools should run on 2 lowest cores. Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_AFFINITY").
Definition at line 70 of file ldms_message_publish.ipp.
|
inlinestatic |
ADC ldms-message plugin enable debug messages; (default "0": none) Overridden with env("ADC_LDMS_MESSAGE_PUBLISH_PLUGIN_DEBUG").
Definition at line 74 of file ldms_message_publish.ipp.