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


Public Member Functions | |
| ldmsd_stream_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 |
| ~ldmsd_stream_publish_plugin () | |
Static Public Attributes | |
| static const char * | adc_ldmsd_stream_publish_plugin_directory_default = "/dev/shm/adc" |
| scratch directory for ldmsd_stream_publish utility messages This directory must be globally writable and should be fast. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_DIRECTORY"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_prog_default = "/usr/sbin/ldmsd_stream_publish" |
| full path to ldmsd_stream_publish utility This program should be world accessible. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_PROG"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_stream_default = "adc_publish_api" |
| name of the stream ADC messages go into LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_STREAM"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_auth_default = "munge" |
| authentication method for stream connections; ldmsd listeners must match. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_AUTH"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_port_default = "412" |
| port for stream connections; ldmsd listeners must match. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_PORT"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_host_default = "localhost" |
| host for stream connections; ldmsd must be listening on the host. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_HOST"). | |
| static const char * | adc_ldmsd_stream_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_LDMSD_STREAM_PUBLISH_PLUGIN_AFFINITY"). | |
| static const char * | adc_ldmsd_stream_publish_plugin_debug_default = "0" |
| ADC ldmsd-stream plugin enable debug messages; (default "0": none) Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_DEBUG"). | |
ldmsd_stream_publish utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to ldmsd by invoking the 'ldmsd_stream_publish' utility available in ldms versions up to 4.4. Use the ldms_message_publish_plugin for ldms versions 4.5 and above.
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 ldmsd_stream_publish.ipp.
|
inline |
Definition at line 182 of file ldmsd_stream_publish.ipp.
|
inline |
Definition at line 295 of file ldmsd_stream_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 ldmsd_stream_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 ldmsd_stream_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 ldmsd_stream_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 ldmsd_stream_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 ldmsd_stream_publish.ipp.
|
inlinevirtual |
Stop publishing and release any resources held for managing publication.
Implements adc::publisher_api.
Definition at line 267 of file ldmsd_stream_publish.ipp.
|
inlinevirtual |
Pause publishing until a call to resume. Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 279 of file ldmsd_stream_publish.ipp.
|
inlinevirtual |
Resume publishing Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 283 of file ldmsd_stream_publish.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 287 of file ldmsd_stream_publish.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 291 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
scratch directory for ldmsd_stream_publish utility messages This directory must be globally writable and should be fast. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_DIRECTORY").
Definition at line 42 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
full path to ldmsd_stream_publish utility This program should be world accessible. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_PROG").
Definition at line 47 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
name of the stream ADC messages go into LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_STREAM").
Definition at line 52 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
authentication method for stream connections; ldmsd listeners must match. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_AUTH").
Definition at line 56 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
port for stream connections; ldmsd listeners must match. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_PORT").
Definition at line 60 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
host for stream connections; ldmsd must be listening on the host. Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_HOST").
Definition at line 64 of file ldmsd_stream_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_LDMSD_STREAM_PUBLISH_PLUGIN_AFFINITY").
Definition at line 70 of file ldmsd_stream_publish.ipp.
|
inlinestatic |
ADC ldmsd-stream plugin enable debug messages; (default "0": none) Overridden with env("ADC_LDMSD_STREAM_PUBLISH_PLUGIN_DEBUG").
Definition at line 74 of file ldmsd_stream_publish.ipp.