Plugin:DCPMM/tests

From collectd Wiki
< Plugin:DCPMM
Revision as of 14:26, 18 March 2020 by Efoley (talk | contribs) (Add testplan for DCPMM plugin)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page contains tests instructions for the DCPMM plugin. This page is meant to aid in testing at release time and be a guide for developing automated tests. Please add any tests that you have run when testing this plugin.

OPNFV/Barometer

These tests are specified by the high level design guide in Barometer. They are run manually.

# Summary collectd.conf Steps Expected result
1 Incorrect XML format in config file
 <Plugin dcp>
   Interval 10.0
   CollectHealth false
   CollectPerfMetrics true
   EnableDispatchAll false
 </Plugin>
  1. Modify the XML format in collectd.conf
  2. Run collectd
  • Collectd identifies the incorrect xml format and exits with the following error:
   Parse error in file `etc/collectd.conf', line 550 near `<newline>': syntax error, unexpected EOL
   yyparse returned error #1
   configfile: Cannot read file `etc/collectd.conf'.
   Unable to read config file etc/collectd.conf.
   Error: Parsing the config file failed
2 Invalid input parameter value for the plugin
<Plugin dcpmm>
  Interval @#$
  CollectHealth false
  CollectPerfMetrics true
  EnableDispatchAll false
</Plugin>
  1. Provide special characters as the input parameter
  2. Run collectd
  • Collectd identifies the incorrect input value and exits with the following error:
   Parse error in file `etc/collectd.conf', line 551 near `<newline>': syntax error, unexpected EOL
   yyparse returned error #1
   configfile: Cannot read file `etc/collectd.conf'.
   Unable to read config file etc/collectd.conf.
   Error: Parsing the config file failed!
<Plugin dcpmm>
  Interval asd
  CollectHealth false
  CollectPerfMetrics true
  EnableDispatchAll false
</Plugin>
  1. Provide string characters as the input parameter
  2. Run collectd
  • Collectd identifies the incorrect input value and exits with the following error:
   [2019-09-06 14:14:45] dcpmm plugin: The `Interval' option requires exactly one numeric argument.
   [2019-09-06 14:14:45] dcpmm: Failed to parse configuration parameters
   Error: Parsing the config file failed!
<Plugin dcpmm>
  Interval -1.0
  CollectHealth false
  CollectPerfMetrics true
  EnableDispatchAll false
</Plugin>
  1. Provide negative number as the input parameter
  2. Run collectd
  • Collectd identifies the incorrect input value and exits with the following error:
   [2019-09-06 14:15:09] dcpmm plugin: The numeric argument of the `Interval' option must not be negative.
   [2019-09-06 14:15:09] dcpmm: Failed to parse configuration parameters
   Error: Parsing the config file failed
3 Invalid input parameter name for the plugin
<Plugin dcpmm>
  Interval 1.0
  CollectHealth false
  CollectPerfMet true
  EnableDispatchAll false
</Plugin>
  1. Update “CollectPerfMetrics” to an incorrect parameter name.
  2. Run collectd
  • Collectd identifies the incorrect input parameter and exits with the following error:
   [2019-09-06 14:36:54] dcpmm: Unkown configuration parameter CollectPerfMet.
   [2019-09-06 14:36:54] dcpmm: Failed to parse configuration parameters
   Error: Parsing the config file failed!
 <Plugin dcpmm>
   Interval 1.0
   CollectHealth false
   CollectPerfMetrics true
   EnableDispatchAll false
   NewParameter true
 </Plugin>
  1. Add a new invalid parameter
  2. Run collectd
  • Collectd identifies the invalid input parameter and exits with the following error:
   [2019-09-06 14:36:54] dcpmm: Unkown configuration parameter NewParameter.
   [2019-09-06 14:36:54] dcpmm: Failed to parse configuration parameters
   Error: Parsing the config file failed!
4 Run dcpmm plugin with default plugin configuration and verify the output using csv plugin
  1. Enable dcpmm and csv plugin in collectd.conf
  2. Run collectd
  • dcpmm plugin collects the memory performance metrics at the default interval (10s) and the output of the csv plugin contains output files with values for memory performance metrics and timestamp at var/lib/collectd/<hostname>/.
  • The csv plugin output should contain dimm-x folders. x should have the value 0 - n, n being the number of DCPMMs available in the system (each DCPMM having a corresponding folder).
  • Each dcpmm-x folder should contain the following csv files:
   buffer-read_hit_ratio-2019-10-31        media-media_read_ops-2019-10-31           media-total_bytes_written-2019-10-31
   buffer-write_hit_ratio-2019-10-31       media-media_write_ops-2019-10-31          media-write_64B_ops_rcvd-2019-10-31
   controller-host_reads-2019-10-31       media-read_64B_ops_rcvd-2019-10-31      timestamp-epoch-2019-10-31
   controller-host_writes-2019-10-31      media-total_bytes_read-2019-10-31           timestamp-tsc_cycles-2019-10-31
  • Each csv file should have a content similar to the following:
   epoch,value
   1572553302.585,395.000000
   1572553312.585,398.000000
   1572553322.585,398.000000
   1572553332.585,399.000000
5 Run dcpmm plugin to collect health information metrics and verify the output using csv plugin
<Plugin dcpmm>
  Interval 10.0
  CollectHealth true
  CollectPerfMetrics false
  EnableDispatchAll false
</Plugin>
  1. Enable dcpmm with the following configuration and csv plugin in collectd.conf
  2. Run collectd
  • dcpmm plugin collects the health information metrics at the default interval (10s) and the output of the csv plugin contains output files with values for health information metrics and timestamp at var/lib/collectd/<hostname>/.
  • The csv plugin output should contain dimm-x folders. x should have the value 0 - n, n being the number of DCPMMs available in the system (each DCPMM having a corresponding folder).
  • Each dcpmm-x folder should contain the following csv files:
   health-controller_temperature-2019-10-31  health-max_media_temperature-2019-10-31  health-power_on_time-2019-10-31
   health-health_status-2019-10-31                  health-media_temperature-2019-10-31          health-uptime-2019-10-31
   health-last_shutdown_time-2019-10-31        health-lifespan_remaining-2019-10-31           timestamp-epoch-2019-10-31
   health-max_controller_temperature-2019-10-31 health-lifespan_used-2019-10-31             timestamp-tsc_cycles-2019-10-31
  • Each csv file should have a content similar to the following:
   epoch,value
   1572553302.585,100.000000
   1572553312.585,100.000000
   1572553322.585,100.000000
   1572553332.585,100.000000
6 Run dcpmm plugin with different interval than the collectd default interval and verify the output using csv plugin
<Plugin dcpmm>
  Interval 2.0
  CollectHealth false
  CollectPerfMetrics true
  EnableDispatchAll false
</Plugin>
  1. Update dcpmm config values to match the following:
  2. Run collectd
  • Collectd collectd memory performance metrics every 2 seconds and the epoch value will be 2 seconds apart in the csv plugin output.
  • Each csv file should have epoch values same as the following:
   epoch,value
   1572553302.585,395.000000
   1572553304.585,398.000000
   1572553306.585,398.000000
   1572553308.585,399.000000
7 Run dcpmm plugin to collect both memory performance and health information metrics and verify the output using csv plugin
<Plugin dcpmm>
  Interval 10.0
  CollectHealth true
  CollectPerfMetrics true
  EnableDispatchAll false
</Plugin>
  1. Enable dcpmm with the following configuration and csv plugin in collectd.conf
  2. Run collectd
  • Simultaneous collection of memory performance and health information metrics is disabled currently and collectd proceeds to collect memory performance metrics with the following warning:
   [2019-12-02 15:42:06] WARNING: Health info and performance metrics cannot be collected simultaneously. Continuing with performance metrics collection...
8 Run dcpmm plugin by enabling memory performance and EnableDispatchAll, and verify the output using csv plugin
<Plugin dcpmm>
  Interval 10.0
  CollectHealth false
  CollectPerfMetrics true
  EnableDispatchAll true
</Plugin>
  1. Enable dcpmm with the following configuration and csv plugin in collectd.conf
  2. Run collectd
  • Collectd collects memory performance metrics and the csv plugin will create output files for memory performance metrics. The parameter EnableDispatchAll is ignored in this use-case.
9 Run dcpmm plugin by enabling health information metrics and EnableDispatchAll, and verify the output using csv plugin
<Plugin dcpmm>
  Interval 10.0
  CollectHealth true
  CollectPerfMetrics false
  EnableDispatchAll true
</Plugin>
  1. Enable dcpmm with the following configuration and csv plugin in collectd.conf
  2. Run collectd
  • Collectd collects health information metrics and the csv plugin will create output files for health information metrics. The parameter EnableDispatchAll is ignored in this use-case.
10 Run dcpmm plugin by disabling both memory performance and health information metrics
<Plugin dcpmm>
  Interval 10.0
  CollectHealth false
  CollectPerfMetrics false
  EnableDispatchAll false
</Plugin>
  1. Enable dcpmm with the following configuration and csv plugin in collectd.conf
  2. Run collectd
  • Collectd exits with the following error:
   [2019-12-02 15:42:06] dcpmm: CollectdHealth and CollectPerfMetrics are disabled. Enable atleast one.
   [2019-12-02 15:42:06] Done parsing `/root/clct/share/collectd/types.db'
   Error: Parsing the config file failed!
11 Run dcpmm plugin as a normal user (without sudo or root permissions)
  1. Enable dcpmm plugin
  2. Run collectd as a normal user
  • dcpmm plugin exits with the following error at the init callback but collectd continues execution with other plugins if any.
   [2019-12-02 15:52:06] dcpmm: Failed to obtain count of Intel(R) Optane DCPMM. A common cause for this is collectd running without root privileges. Ensure that collectd is running with root privileges. Also, make sure that Intel(R) Optane DC Persistent Memory is available in the system.
12 Run dcpmm plugin on a platform without Intel Optane DC Persistent Memory availability
  1. Enable dcpmm plugin
  2. Run collectd
  • dcpmm plugin exits with the following error at the init callback but collectd continues execution with other plugins if any.
   [2019-12-02 15:52:06] dcpmm: Failed to obtain count of Intel(R) Optane DCPMM. A common cause for this is collectd running without root privileges. Ensure that collectd is running with root privileges. Also, make sure that Intel(R) Optane DC Persistent Memory is available in the system.

See also