diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index a189993..4737576 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -268,7 +268,21 @@ jobs: mv log/main.log log/cacti.log echo "== end-to-end log" cat log/e2e.log - if grep -E "FATAL:|ERROR:|WARNING:" log/e2e.log | grep -v "GPU WARNING: Node [0-9]*: collection failed"; then + # Cacti shares this log with core and other plugins. Gate only on + # diagnostics emitted by this plugin; the assertions and command + # status above cover the end-to-end test itself. + awk ' + /GPU (FATAL|ERROR|WARNING):/ && $0 !~ /GPU WARNING: Node [0-9]+: collection failed/ { + print + found = 1 + } + END { if (found) exit 10 } + ' log/e2e.log + scan_rc=$? + if [ "$scan_rc" -eq 10 ]; then + rc=1 + elif [ "$scan_rc" -ne 0 ]; then + echo "Unable to scan the end-to-end log (awk exit $scan_rc)" >&2 rc=1 fi if [ "$rc" -ne 0 ]; then diff --git a/CHANGELOG.md b/CHANGELOG.md index 07c8b04..65d7e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,12 @@ Phase 1 (NVIDIA through SNMP extend), first version 0.1.0. Not yet run on GPU ha - GPU Nodes (GPU Admin), GPU Inventory and GPU Health (GPU View), each limited to devices the user may see. - GPU identity records keyed by vendor and UUID, with replacement detection, confirmed moves between nodes, absence after a configurable number of collections, and JSON export. - Collection of `nvidia-smi` through two fixed SNMP `extend` lines on each node ([docs/node-setup.md](docs/node-setup.md)), with strict parsing that turns any bad output into unknown values. -- The *GPU - Devices* data query, the *GPU - Metrics* data template, and ten graphs per GPU: Utilization, Memory, Temperature, Power, Clocks, Throttle, ECC Errors, New ECC Errors, Retired Pages, and Sample Age. +- The *GPU - Devices* data query, the *GPU - Metrics* data template, and eleven graphs per GPU: Utilization, Memory, Temperature, Power, Power Percent, Clocks, Throttle, ECC Errors, New ECC Errors, Retired Pages, and Sample Age. - Decoded clock event reasons as alertable 0 or 1 indicators, with the raw mask kept and shown on GPU Health. - The clock event reasons are read as `clocks_event_reasons.active`, falling back to `clocks_throttle_reasons.active` through an optional third extend entry, `cacti_gpu_legacy`, when nvidia-smi refuses the new name (#36). - At most 128 GPUs per node are supported, which keeps the metrics output well under snmpd's 100 KiB limit. - New corrected and uncorrected ECC errors since the previous sample, computed by the plugin as gauges; retired single-bit and double-bit page counts; the ECC mode, shown on GPU Health when ECC values are unknown. -- Thold threshold templates for temperature, power against its limit, the hardware and thermal throttle indicators, new uncorrected ECC errors, pending page retirement, and sample age ([docs/alerting.md](docs/alerting.md)). +- Thold threshold templates for temperature, power percentage against its limit, the hardware and thermal throttle indicators, new uncorrected ECC errors, pending page retirement, and sample age ([docs/alerting.md](docs/alerting.md)). - The GPU Health page: freshness, last collection outcome, Maint state, backend, tool and driver versions, GPU presence, ECC state, and the raw clock event mask. It never contacts a node. - An RRD file found at a new GPU data source's path is renamed instead of reused, so a database restored older than the RRD directory attaches no history to another GPU ([docs/backup.md](docs/backup.md)). - *Remove the plugin's Cacti objects on uninstall* (default off): uninstall then removes the plugin's templates that nothing outside it uses, and its data query XML if unchanged. It never deletes RRD files, devices, graphs, or data sources. @@ -28,7 +28,7 @@ Phase 1 (NVIDIA through SNMP extend), first version 0.1.0. Not yet run on GPU ha - Schema version 3 adds the observation columns `ecc_corr_new`, `ecc_uncorr_new`, `retired_sbe`, `retired_dbe`, and `ecc_mode`. The upgrade runs when the Plugins page or a GPU page is opened. - The metrics `extend` line now also asks for `ecc.mode.current`, `retired_pages.sbe`, and `retired_pages.dbe`. Update it on every node from [docs/node-setup.md](docs/node-setup.md); until then the node's collection fails with *Output rejected*. - Only on a node whose `nvidia-smi` is older than the clock event reasons rename, add the optional `cacti_gpu_legacy` extend line from the same page. A metrics line with the current field list that asks for `clocks_throttle_reasons.active` in the last position also works, because both names print the same bitmask there; a line with the earlier field list does not. -- Re-import `templates/gpu_thold_templates.xml` in Thold to pick up template changes. +- Re-import `templates/gpu_thold_templates.xml` in Thold to pick up template changes. Existing power threshold rows keep their stored settings after a template re-import; edit each existing power threshold or recreate it from the template to monitor the derived `power_pct` value. ### Not yet supported diff --git a/docs/PLAN.md b/docs/PLAN.md index f0950ff..362deb9 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -242,7 +242,7 @@ Rules, tested by fixtures (REQ-ID-001 to 006): | Data source and graphs | Graph templates per GPU | Created by Cacti's data query path from the templates | | Data source for staleness | A field of the same data query (`age`) | Always numeric | -As built in milestone 3: the data query is *GPU - Devices*, one data template (*GPU - Metrics*) holds every model field, and eight graph templates (Utilization, Memory, Temperature, Power, Clocks, Throttle, ECC Errors, Sample Age) are created for each present GPU. Every model field is drawn by one of them, because `rrdtool_function_create()` puts into the RRD file only the data source items some graph item uses; an undrawn field such as a throttle indicator or `age` would never be stored, so Thold could not use it. The plugin copies the data query XML to `/resource/script_server/plugin_gpu.xml`, so that directory must be writable by the installing user. Absent GPUs stay in the listing rather than using `index_transient`; an operator's **Remove from Data Query** on an absent GPU takes it out, and it returns if reported again. The index delimiter is `!`, which a `vendor/UUID` key cannot contain, and the data query sets `arg_num_indexes`. Uninstall removes the templates and the XML only when *Remove the plugin's Cacti objects on uninstall* is checked (default off), each template only where nothing outside the plugin uses it and the XML only if unchanged; it never deletes RRD files, devices, graphs, or data sources (#30). Milestone 4 adds *New ECC Errors* and *Retired Pages*, ten graphs in all. +As built in milestone 3: the data query is *GPU - Devices*, one data template (*GPU - Metrics*) holds every model field, and graph templates cover Utilization, Memory, Temperature, Power, Power Percent, Clocks, Throttle, ECC Errors, New ECC Errors, Retired Pages, and Sample Age. Every model field is drawn by one of them, because `rrdtool_function_create()` puts into the RRD file only the data source items some graph item uses; an undrawn field such as a throttle indicator or `age` would never be stored, so Thold could not use it. The plugin copies the data query XML to `/resource/script_server/plugin_gpu.xml`, so that directory must be writable by the installing user. Absent GPUs stay in the listing rather than using `index_transient`; an operator's **Remove from Data Query** on an absent GPU takes it out, and it returns if reported again. The index delimiter is `!`, which a `vendor/UUID` key cannot contain, and the data query sets `arg_num_indexes`. Uninstall removes the templates and the XML only when *Remove the plugin's Cacti objects on uninstall* is checked (default off), each template only where nothing outside the plugin uses it and the XML only if unchanged; it never deletes RRD files, devices, graphs, or data sources (#30). Milestone 4 adds *New ECC Errors* and *Retired Pages*. Templates ship as Cacti template XML and are imported with `import_xml_data()`, matched by hash so re-imports update rather than duplicate, under a lock so two upgrades cannot import together. The data query uses reindex method None; the plugin runs a forced reindex after each inventory change so titles refresh. `api_device_update_host_template()` (called from `api_device_save()` when a template is applied) runs `REPLACE INTO host_snmp_query` with the global default reindex method for data queries that have no cache rows yet, so the plugin sets None again afterward; `api_device_save()` itself only forces method 0 for devices with SNMP version 0. Confirmed by source at `release/1.2.31` and `1.2.x`; running it is *live* ([research/cacti-core.md](research/cacti-core.md)). A data query XML may instead set `index_transient`, which stops removed indexes being marked orphan; M3 chooses between that and keeping absent GPUs in the listing. diff --git a/docs/alerting.md b/docs/alerting.md index 698b737..21d564b 100644 --- a/docs/alerting.md +++ b/docs/alerting.md @@ -12,14 +12,14 @@ Tested against Thold v1.8.2 (`1eb406bd0f81f3204358cce7bd43c8bb5adc8e4a`) and Mai 4. Turn on Thold's *Auto Create Thresholds* setting, so Thold creates the thresholds as the plugin creates each GPU's graphs. This is the path the end-to-end test takes. 5. Devices that already had the GPU Node template before step 3 are not linked yet: add the templates under *Associated Threshold Templates* on each device's page, then select the devices under **Management > Devices** and run the **Apply Thresholds** action. -Thold creates one threshold per template for each GPU's data source. Notification lists, emails, and repeat settings are Thold's; set them on the templates or the thresholds. +Thold creates one threshold per template for each GPU's data source. Notification lists, emails, and repeat settings are Thold's; set them on the templates or thresholds. ## Shipped templates | Template | Item | Breaches when | After | |---|---|---|---| | GPU - Temperature High | `temp_gpu` | above 85 °C | 2 polls | -| GPU - Power Above Limit | `power` | above 100 percent of `power_limit` | 2 polls | +| GPU - Power Above Limit | `power_pct` | above 100 percent of the current power limit | 2 polls | | GPU - Software Thermal Slowdown | `thr_sw_thermal` | 1 | 1 poll | | GPU - Hardware Thermal Slowdown | `thr_hw_thermal` | 1 | 1 poll | | GPU - Hardware Power Brake | `thr_hw_power_brake` | 1 | 1 poll | @@ -46,7 +46,7 @@ The template list is generated from `lib/TholdTemplateXml.php`, and a unit test ## What the end-to-end test proves -`tests/bin/alert-flow.php` imports the shipped templates with Thold's own import, links them to the GPU Node template, and lets Thold create the thresholds when the plugin creates the graphs. It then changes the fake `nvidia-smi` output behind a real `snmpd`, collects over SNMPv3, runs Cacti's poller and Thold's check, and reads Thold's log: +`tests/bin/alert-flow.php` imports the shipped templates with Thold's own import, links them to the GPU Node template, and lets Thold create the thresholds when the plugin creates the graphs. The `power_pct` data source is computed from the current sample's `power` and `power_limit` values without integer rounding. Missing readings and nonpositive limits produce an unknown value, which does not breach. The test then changes the fake `nvidia-smi` output behind a real `snmpd`, collects over SNMPv3, runs Cacti's poller and Thold's check, and reads Thold's log: - a hot, hardware-throttled GPU with new uncorrected errors and a pending page retirement fires each threshold, the temperature only on its second poll, and each restores when the value returns; - a driver reload drops the ECC total to 0: the new-error value reads `U`, nothing breaches, and Thold stays enabled; two new errors after the reset fire the threshold again, and it restores; diff --git a/docs/metrics.md b/docs/metrics.md index 450f89a..2d37ab9 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -14,6 +14,7 @@ Milestone 3 implements the nvidia-smi column. The DCGM and AMD columns record th | `temp_gpu` | GPU temperature | degrees C | gauge | U to U | `temperature.gpu` | 150 | `metric --temperature` `edge` (#18) | | `power` | Board power draw | watts | gauge | 0 to U | `power.draw` | 155 | `metric --power` `socket_power` | | `power_limit` | Board power limit | watts | gauge | 0 to U | `power.limit` | 160 | #18 | +| `power_pct` | Board power as a percentage of its limit | percent | gauge | 0 to U | computed from current `power` and `power_limit` samples | computed from `power` and `power_limit` in the current sample | computed from `power` and `power_limit` in the current sample | | `clock_sm` | SM clock | MHz | gauge | 0 to U | `clocks.sm` | 1603 (hertz, divided by 1,000,000), or 100 (unit not stated) | `metric --clock` (#18) | | `clock_mem` | Memory clock | MHz | gauge | 0 to U | `clocks.mem` | 1604 (hertz, divided by 1,000,000), or 101 (unit not stated) | `metric --clock` (#18) | | `ecc_corr` | Corrected ECC errors since driver load | count | gauge | 0 to U | `ecc.errors.corrected.volatile.total` | 310 | `metric --ecc` `total_correctable_count` | diff --git a/lib/Freshness.php b/lib/Freshness.php index 347bf23..f5bd75e 100644 --- a/lib/Freshness.php +++ b/lib/Freshness.php @@ -77,6 +77,13 @@ public static function value(string $field, array $row, int $now, int $staleAfte return null; } + if ($field === 'power_pct') { + $power = Row::float($row, 'power'); + $limit = Row::float($row, 'power_limit'); + + return $power === null || $limit === null || $limit <= 0.0 ? null : $power / $limit * 100.0; + } + return in_array($field, Schema::observationMetrics(), true) ? Row::float($row, $field) : null; } diff --git a/lib/MetricModel.php b/lib/MetricModel.php index cf1821c..73e5cfc 100644 --- a/lib/MetricModel.php +++ b/lib/MetricModel.php @@ -78,6 +78,7 @@ public static function all(): array { new Metric('temp_gpu', 'GPU temperature', 'degrees C', $gauge, null, null, 'temperature.gpu', 1.0, null, '150', 1.0, '`metric --temperature` `edge` (#18)'), new Metric('power', 'Board power draw', 'watts', $gauge, 0.0, null, 'power.draw', 1.0, null, '155', 1.0, '`metric --power` `socket_power`'), new Metric('power_limit', 'Board power limit', 'watts', $gauge, 0.0, null, 'power.limit', 1.0, null, '160', 1.0, '#18'), + new Metric('power_pct', 'Board power as a percentage of its limit', 'percent', $gauge, 0.0, null, null, 1.0, null, 'computed from `power` and `power_limit` in the current sample', 1.0, 'computed from `power` and `power_limit` in the current sample'), new Metric('clock_sm', 'SM clock', 'MHz', $gauge, 0.0, null, 'clocks.sm', 1.0, null, '1603 (hertz, divided by 1,000,000), or 100 (unit not stated)', 1.0e-6, '`metric --clock` (#18)'), new Metric('clock_mem', 'Memory clock', 'MHz', $gauge, 0.0, null, 'clocks.mem', 1.0, null, '1604 (hertz, divided by 1,000,000), or 101 (unit not stated)', 1.0e-6, '`metric --clock` (#18)'), new Metric('ecc_corr', 'Corrected ECC errors since driver load', 'count', $gauge, 0.0, null, 'ecc.errors.corrected.volatile.total', 1.0, null, '310', 1.0, '`metric --ecc` `total_correctable_count`'), @@ -162,6 +163,7 @@ public static function table(): string { $metric->nvidiaField !== null => sprintf('`%s`', $metric->nvidiaField), $metric->maskBit !== null => sprintf('`%s`, bit 0x%X', self::MASK_FIELD, $metric->maskBit), isset(self::DELTAS[$metric->name]) => sprintf('computed from consecutive `%s` samples', self::DELTAS[$metric->name]), + $metric->name === 'power_pct' => 'computed from current `power` and `power_limit` samples', default => 'computed from `timestamp`', }; diff --git a/lib/TemplateXml.php b/lib/TemplateXml.php index 103223d..f493ec2 100644 --- a/lib/TemplateXml.php +++ b/lib/TemplateXml.php @@ -106,6 +106,9 @@ public static function graphs(): array { ['power', self::AREA, 'F2B705', 'Draw'], ['power_limit', self::LINE1, 'B00020', 'Limit'], ]], + 'GPU - Power Percent' => ['label' => 'percent of limit', 'base' => 1000, 'upper' => '0', 'items' => [ + ['power_pct', self::LINE2, 'F2B705', 'Draw'], + ]], 'GPU - Clocks' => ['label' => 'MHz', 'base' => 1000, 'upper' => '0', 'items' => [ ['clock_sm', self::LINE2, '76B900', 'SM'], ['clock_mem', self::LINE1, '7A3E9D', 'Memory'], diff --git a/lib/TholdTemplateXml.php b/lib/TholdTemplateXml.php index 0064ea7..1c51721 100644 --- a/lib/TholdTemplateXml.php +++ b/lib/TholdTemplateXml.php @@ -42,20 +42,12 @@ final class TholdTemplateXml { public const FILE = 'gpu_thold_templates.xml'; - // Thold's thold_type 0 is High / Low; data_type 0 is the exact value - // and 3 is an RPN expression. The percentage helper maps an unknown - // power limit to zero, so power uses an explicit unknown-preserving RPN. + // Thold's data_type 0 compares the stored gauge value directly. private const HIGH_LOW = 0; private const EXACT = 0; - private const EXPRESSION = 3; - - public const POWER_EXPRESSION = 'POWER,UN,POWER_LIMIT,UN,OR,POWER_LIMIT,UN,1,POWER_LIMIT,IF,0,LE,OR,UNKN,' - . 'POWER,UN,0,POWER,IF,POWER_LIMIT,UN,1,POWER_LIMIT,IF,0,LE,1,' - . 'POWER_LIMIT,UN,1,POWER_LIMIT,IF,IF,/,100,*,IF'; /** - * name => [data source item, high threshold, fail trigger in polls, - * percentage of this item, or '']. + * name => [data source item, high threshold, fail trigger in polls, '']. * * A fail trigger counts Cacti polls; the collector reads each node once * per poller cycle, so one poll is one collection interval @@ -66,7 +58,7 @@ final class TholdTemplateXml { public static function templates(): array { return [ 'GPU - Temperature High' => ['temp_gpu', '85', 2, ''], - 'GPU - Power Above Limit' => ['power', '100', 2, 'power_limit'], + 'GPU - Power Above Limit' => ['power_pct', '100', 2, ''], 'GPU - Software Thermal Slowdown' => ['thr_sw_thermal', '0.5', 1, ''], 'GPU - Hardware Thermal Slowdown' => ['thr_hw_thermal', '0.5', 1, ''], 'GPU - Hardware Power Brake' => ['thr_hw_power_brake', '0.5', 1, ''], @@ -93,7 +85,7 @@ public static function xml(): string { $out = "\n"; $sequence = 1; - foreach (self::templates() as $name => [$item, $high, $trigger, $percentOf]) { + foreach (self::templates() as $name => [$item, $high, $trigger]) { $metric = MetricModel::find($item); if ($metric === null) { @@ -113,9 +105,9 @@ public static function xml(): string { 'thold_hi' => $high, 'thold_low' => '', 'thold_fail_trigger' => (string) $trigger, - 'data_type' => (string) ($percentOf === '' ? self::EXACT : self::EXPRESSION), + 'data_type' => (string) self::EXACT, 'percent_ds' => '', - 'expression' => $percentOf === '' ? '' : self::POWER_EXPRESSION, + 'expression' => '', 'repeat_alert' => '0', 'restored_alert' => '', ]; diff --git a/resource/script_server/plugin_gpu.xml b/resource/script_server/plugin_gpu.xml index 0c9dd62..346ffae 100644 --- a/resource/script_server/plugin_gpu.xml +++ b/resource/script_server/plugin_gpu.xml @@ -69,6 +69,11 @@ output power_limit + + Board power as a percentage of its limit + output + power_pct + SM clock output diff --git a/templates/gpu_templates.xml b/templates/gpu_templates.xml index 6696741..137a77e 100644 --- a/templates/gpu_templates.xml +++ b/templates/gpu_templates.xml @@ -863,6 +863,159 @@ + + GPU - Power Percent + + + + on + |host_description| - GPU |query_gpuIndex| |query_gpuName| - Power Percent + + percent of limit + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 0 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + + + 0 + + 0 + + + + 5 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 + F2B705 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Draw + + 2.00 + + 0 + 1 + + + 9 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Current: + + 1.00 + + 0 + 2 + + + 9 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Average: + + 1.00 + + 0 + 3 + + + 9 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Maximum: + on + 1.00 + + 0 + 4 + + + + + Data Source [power_pct] + + task_item_id + hash_000103cdd0da4c65d7197ec92d252bc1cf3828|hash_00010346099a0e73ffdc35d5218166ca50ba17|hash_00010387e2df761502294d2223fcd8d31a9ef2|hash_0001031a7d06949425580f31f24114fff3f014 + + + GPU - Clocks @@ -2632,6 +2785,20 @@ 0 + + + power_pct + + 0 + + U + + 1 + + 600 + + 0 + clock_sm @@ -2907,80 +3074,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3038,80 +3210,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3169,80 +3346,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3300,80 +3482,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3391,6 +3578,142 @@ + + hash_0001033c6b1d50381d838a28d27cefc1fe0db2 + GPU - Power Percent + + + util_gpu + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103386498e2ba28dc691ae80400fd9f81cb + + + util_mem + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103fcfd3c9bc04ccdce72e777c017bd52ec + + + mem_used + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103fe69c23cfa14f29431c620ef604c30f3 + + + mem_total + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801031ef6a201b4c8317435dd4f8f03c97c3e + + + temp_gpu + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103a269082db3ee8d772f5f44f27b3f7a23 + + + power + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801038cbec3da5106f36e5d6c2394eb3ec1a2 + + + power_limit + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010315673384900d4c1c618661df74458d3a + + + power_pct + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 + + + clock_sm + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + + + clock_mem + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + + + ecc_corr + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103a6324b601765f3fba880c82483cab1a4 + + + ecc_uncorr + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + + + ecc_corr_new + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + + + ecc_uncorr_new + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103c46dce5c285e4686088f1b510da6e966 + + + retired_pending + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + + + retired_sbe + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103c2afb6ee87f53f498a736738e5bd0113 + + + retired_dbe + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010378bed9f1d5da131bc2e3939e967fb9df + + + thr_sw_power_cap + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103e2d56f87cdaca55a819207fe6a19cd9d + + + thr_hw_slowdown + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010315564beb5b304bad49dbca0cb469bb2f + + + thr_sw_thermal + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_080103684afab926b998321a7a6fac6f5a393b + + + thr_hw_thermal + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + + + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + + age + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f + + + + + title + 1 + |host_description| - GPU |query_gpuIndex| |query_gpuName| - Power Percent + + + + + name + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + 1 + |host_description| - GPU |query_gpuIndex| |query_gpuName| + + + hash_0001039731ead9f1bdb18ff2a968a804253ba0 GPU - Clocks @@ -3431,80 +3754,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3562,80 +3890,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 + retired_dbe + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010378bed9f1d5da131bc2e3939e967fb9df + + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_080103e2d56f87cdaca55a819207fe6a19cd9d - - + + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010315564beb5b304bad49dbca0cb469bb2f - - + + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_080103684afab926b998321a7a6fac6f5a393b - - + + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_0801035f35b5a45efe842fa4a8dec1cdac348e - - + + thr_hw_power_brake hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010340894c404284f5ad11902bd285da8568 - - + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3693,80 +4026,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3824,80 +4162,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -3955,80 +4298,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + @@ -4086,80 +4434,85 @@ hash_08010315673384900d4c1c618661df74458d3a - clock_sm + power_pct hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 + hash_0801034e1ad5afa663c9cadbc98f31b5595627 - clock_mem + clock_sm hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 + hash_0801031fcd3d5df2d1a8ec6eb2e7943e3aeda3 - ecc_corr + clock_mem hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103a6324b601765f3fba880c82483cab1a4 + hash_080103a8fa9aab83a40aa7739c39ef9c8ea184 - ecc_uncorr + ecc_corr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ad88ffa3dd274846760a8d68f2a0a60 + hash_080103a6324b601765f3fba880c82483cab1a4 - ecc_corr_new + ecc_uncorr hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a + hash_0801031ad88ffa3dd274846760a8d68f2a0a60 - ecc_uncorr_new + ecc_corr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c46dce5c285e4686088f1b510da6e966 + hash_0801031ba5b836a0ff7ecfa9feba3d334fbc0a - retired_pending + ecc_uncorr_new hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 + hash_080103c46dce5c285e4686088f1b510da6e966 - retired_sbe + retired_pending hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103c2afb6ee87f53f498a736738e5bd0113 + hash_080103db6f1d51fd093d2d28b0cab3c1bd19a0 - retired_dbe + retired_sbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010378bed9f1d5da131bc2e3939e967fb9df + hash_080103c2afb6ee87f53f498a736738e5bd0113 - thr_sw_power_cap + retired_dbe hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103e2d56f87cdaca55a819207fe6a19cd9d + hash_08010378bed9f1d5da131bc2e3939e967fb9df - thr_hw_slowdown + thr_sw_power_cap hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010315564beb5b304bad49dbca0cb469bb2f + hash_080103e2d56f87cdaca55a819207fe6a19cd9d - thr_sw_thermal + thr_hw_slowdown hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_080103684afab926b998321a7a6fac6f5a393b + hash_08010315564beb5b304bad49dbca0cb469bb2f - thr_hw_thermal + thr_sw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_0801035f35b5a45efe842fa4a8dec1cdac348e + hash_080103684afab926b998321a7a6fac6f5a393b - thr_hw_power_brake + thr_hw_thermal hash_0101037f7ae72a8e79a16815acaea47b35ab66 - hash_08010340894c404284f5ad11902bd285da8568 + hash_0801035f35b5a45efe842fa4a8dec1cdac348e + thr_hw_power_brake + hash_0101037f7ae72a8e79a16815acaea47b35ab66 + hash_08010340894c404284f5ad11902bd285da8568 + + age hash_0101037f7ae72a8e79a16815acaea47b35ab66 hash_08010391f7fdb74f0d794e1fbe5e362a45dd1f - + diff --git a/templates/gpu_thold_templates.xml b/templates/gpu_thold_templates.xml index c3d30cf..56f4341 100644 --- a/templates/gpu_thold_templates.xml +++ b/templates/gpu_thold_templates.xml @@ -23,17 +23,17 @@ GPU - Power Above Limit 7f7ae72a8e79a16815acaea47b35ab66 GPU - Metrics - 8cbec3da5106f36e5d6c2394eb3ec1a2 - power - Board power draw + 4e1ad5afa663c9cadbc98f31b5595627 + power_pct + Board power as a percentage of its limit on 0 100 2 - 3 + 0 - POWER,UN,POWER_LIMIT,UN,OR,POWER_LIMIT,UN,1,POWER_LIMIT,IF,0,LE,OR,UNKN,POWER,UN,0,POWER,IF,POWER_LIMIT,UN,1,POWER_LIMIT,IF,0,LE,1,POWER_LIMIT,UN,1,POWER_LIMIT,IF,IF,/,100,*,IF + 0 diff --git a/tests/Integration/LifecycleTest.php b/tests/Integration/LifecycleTest.php index ffce42c..6ee5331 100644 --- a/tests/Integration/LifecycleTest.php +++ b/tests/Integration/LifecycleTest.php @@ -95,7 +95,7 @@ }); it('imports the shipped templates once, and a forced re-import updates them in place', function () { - $objects = ['data_query' => 1, 'data_template' => 1, 'graph_templates' => 10, 'graph_items' => 88, 'device_template' => 1, 'dq_graphs' => 10, 'dq_file' => true]; + $objects = ['data_query' => 1, 'data_template' => 1, 'graph_templates' => 11, 'graph_items' => 92, 'device_template' => 1, 'dq_graphs' => 11, 'dq_file' => true]; expect(lifecycle('install')['objects'])->toBe($objects); diff --git a/tests/Unit/CollectorTest.php b/tests/Unit/CollectorTest.php index d44689b..0270b29 100644 --- a/tests/Unit/CollectorTest.php +++ b/tests/Unit/CollectorTest.php @@ -340,7 +340,7 @@ function collect_observations(FixtureReader $reader): array { ]); it('keeps one observation column per stored model field', function () { - expect(Schema::observationMetrics())->toEqualCanonicalizing(array_values(array_diff(\Somethingwithproof\Gpu\MetricModel::names(), ['age']))); + expect(Schema::observationMetrics())->toEqualCanonicalizing(array_values(array_diff(\Somethingwithproof\Gpu\MetricModel::names(), ['age', 'power_pct']))); }); it('computes new ECC errors from the stored total, as unknown across a reset or a missing total', function () { diff --git a/tests/Unit/NvidiaSmiParserTest.php b/tests/Unit/NvidiaSmiParserTest.php index 90b7db7..353943e 100644 --- a/tests/Unit/NvidiaSmiParserTest.php +++ b/tests/Unit/NvidiaSmiParserTest.php @@ -77,7 +77,7 @@ function smi_error(ExtendOutput $metrics, ?ExtendOutput $names = null): Collecti ->and($first->values['mem_used'])->toBe(2048 * 1048576.0) ->and($first->values['mem_total'])->toBe(81559 * 1048576.0) ->and($first->values['clock_sm'])->toBe(1410.0) - ->and(array_keys($first->values))->toEqualCanonicalizing(array_values(array_diff(MetricModel::names(), ['age'], array_keys(MetricModel::DELTAS)))); + ->and(array_keys($first->values))->toEqualCanonicalizing(array_values(array_diff(MetricModel::names(), ['age', 'power_pct'], array_keys(MetricModel::DELTAS)))); })->with([ ['r580-8gpu', 8, '580.95.05'], ['r595-1gpu', 1, '595.45.04'], diff --git a/tests/Unit/ScriptServerTest.php b/tests/Unit/ScriptServerTest.php index e0ca253..b207fd1 100644 --- a/tests/Unit/ScriptServerTest.php +++ b/tests/Unit/ScriptServerTest.php @@ -56,6 +56,12 @@ function ss(): ScriptServer { ->and(Freshness::format(Freshness::value('no_such_field', ss_row(), SS_NOW, 600)))->toBe('U'); }); +it('computes power percentage precisely and leaves missing or nonpositive limits unknown', function () { + expect(Freshness::format(Freshness::value('power_pct', ss_row(['power' => '200.25', 'power_limit' => '200.50']), SS_NOW, 600)))->toBe('99.875312') + ->and(Freshness::format(Freshness::value('power_pct', ss_row(['power' => '200.25', 'power_limit' => '0']), SS_NOW, 600)))->toBe('U') + ->and(Freshness::format(Freshness::value('power_pct', ss_row(['power' => 'N/A', 'power_limit' => '200.50']), SS_NOW, 600)))->toBe('U'); +}); + it('prints unknown for stale, absent, unreported, failed, and never sampled GPUs, keeping age where a sample exists', function (array $row, string $value, string $age) { expect(Freshness::format(Freshness::value('util_gpu', ss_row($row), SS_NOW, 600)))->toBe($value) ->and(Freshness::format(Freshness::value('age', ss_row($row), SS_NOW, 600)))->toBe($age); diff --git a/tests/Unit/TholdTemplateXmlTest.php b/tests/Unit/TholdTemplateXmlTest.php index cfa37ea..a2939f6 100644 --- a/tests/Unit/TholdTemplateXmlTest.php +++ b/tests/Unit/TholdTemplateXmlTest.php @@ -57,7 +57,7 @@ } } - foreach (TholdTemplateXml::templates() as $name => [$item, $high, $trigger, $percentOf]) { + foreach (TholdTemplateXml::templates() as $name => [$item, $high, $trigger]) { $metric = MetricModel::find($item); expect($metric)->not->toBeNull() @@ -66,9 +66,6 @@ ->and(is_numeric($high))->toBeTrue() ->and($trigger)->toBeGreaterThanOrEqual(1); - if ($percentOf !== '') { - expect($drawn)->toContain($percentOf); - } } $items = array_column(TholdTemplateXml::templates(), 0); @@ -81,6 +78,24 @@ ->and($items)->toContain('thr_hw_thermal'); }); +it('uses an exact Thold threshold on the derived power percentage', function () { + $xml = simplexml_load_string(TholdTemplateXml::xml()); + $power = null; + + foreach ($xml->children() as $template) { + if ((string) $template->name === 'GPU - Power Above Limit') { + $power = $template; + break; + } + } + + expect($power)->not->toBeNull() + ->and((string) $power->data_source_name)->toBe('power_pct') + ->and((string) $power->data_type)->toBe('0') + ->and((string) $power->percent_ds)->toBe('') + ->and((string) $power->expression)->toBe(''); +}); + it('stores every data source as a gauge, so Thold never computes a rate from an unknown value', function () { $xml = TemplateXml::templates(); diff --git a/tests/bin/alert-flow.php b/tests/bin/alert-flow.php index 67e7f96..9f8f6ea 100644 --- a/tests/bin/alert-flow.php +++ b/tests/bin/alert-flow.php @@ -230,15 +230,6 @@ function alert_thold_enabled(string $round): void { $alert_result = thold_template_import((string) file_get_contents($config['base_path'] . '/plugins/gpu/templates/' . TholdTemplateXml::FILE)); -// Exercise Thold's real evaluator: it must preserve unknown power/limits -// and avoid division by zero even though RPN evaluates both IF branches. -foreach (array(array(250, 200, 125), array(0, 200, 0), array('U', 200, 'U'), array(250, 'U', 'U'), array(250, 0, 'U'), array(250, -1, 'U'), array('U', 'U', 'U')) as $case) { - $rrds = array(1 => array('POWER' => $case[0], 'POWER_LIMIT' => $case[1])); - $times = array(); - $value = thold_calculate_expression(array('name' => 'GPU power', 'local_data_id' => 1, 'expression' => TholdTemplateXml::POWER_EXPRESSION), $case[0], $rrds, $times); - e2e_check($value == $case[2] && empty($GLOBALS['rpn_error']), 'power expression preserves the expected value for ' . json_encode(array($case[0], $case[1]))); -} - e2e_check(count($alert_result['success'] ?? array()) === count(TholdTemplateXml::templates()) && empty($alert_result['errors']) && empty($alert_result['failure']), 'setup: Thold imported every shipped template (' . json_encode($alert_result) . ')'); $alert_host_template = (new \Somethingwithproof\Gpu\CactiObjectRepository(false))->idByHash('host_template', TemplateXml::hash('02', TemplateXml::DEVICE_TEMPLATE)); @@ -263,8 +254,9 @@ function alert_thold_enabled(string $round): void { foreach (TholdTemplateXml::templates() as $alert_name => $spec) { $t = alert_thold($spec[0]); + $data_type = 0; - e2e_check(($t['thold_hi'] ?? '') === $spec[1] && ($t['thold_enabled'] ?? '') === 'on' && (int) ($t['data_type'] ?? -1) === ($spec[3] === '' ? 0 : 3) && ($t['expression'] ?? '') === ($spec[3] === '' ? '' : TholdTemplateXml::POWER_EXPRESSION), "setup: '$alert_name' is on GPU 0 above " . $spec[1]); + e2e_check(($t['thold_hi'] ?? '') === $spec[1] && ($t['thold_enabled'] ?? '') === 'on' && (int) ($t['data_type'] ?? -1) === $data_type && ($t['percent_ds'] ?? '') === $spec[3] && ($t['expression'] ?? '') === '', "setup: '$alert_name' is on GPU 0 above " . $spec[1]); } // A low staleness threshold for this test only (the template's is 900 s). @@ -281,6 +273,34 @@ function alert_thold_enabled(string $round): void { $logged = alert_round('baseline', array()); alert_expect('baseline', $logged, $quiet); e2e_check(is_numeric(alert_thold('temp_gpu')['lastread'] ?? '') && is_numeric(alert_thold('age')['lastread'] ?? '') && (alert_thold('ecc_uncorr_new')['lastread'] ?? '') === '0', 'baseline: Thold read temperature, age, and zero new ECC errors'); +$power = alert_thold('power_pct')['lastread'] ?? ''; +e2e_check(is_numeric($power) && abs((float) $power - (100.5 / 700 * 100)) < 0.01, 'baseline: Thold read the derived power percentage'); + +/* The current power sample and limit determine the percentage. */ + +$logged = alert_round('power unknown with a valid limit', array('power.draw' => 'N/A')); +alert_expect('power unknown with a valid limit', $logged, array('power_pct' => array(false, array())) + $quiet); +e2e_check(!is_numeric(alert_thold('power_pct')['lastread'] ?? ''), 'power unknown with a valid limit: the derived value is unknown'); +e2e_check(e2e_ss($e2e_host, 'get', 'power_pct', e2e_key(1)) === 'U', 'power unknown with a valid limit: the script server returns U'); + +$logged = alert_round('zero power limit', array('power.limit' => '0.00')); +alert_expect('zero power limit', $logged, array('power_pct' => array(false, array())) + $quiet); +e2e_check(!is_numeric(alert_thold('power_pct')['lastread'] ?? ''), 'zero power limit: the derived value is unknown and does not breach'); +e2e_check(e2e_ss($e2e_host, 'get', 'power_pct', e2e_key(1)) === 'U', 'zero power limit: the script server returns U'); + +$logged = alert_round('fractional power limit', array('power.draw' => '200.25', 'power.limit' => '200.50')); +alert_expect('fractional power limit', $logged, array('power_pct' => array(false, array())) + $quiet); +e2e_check(abs((float) (alert_thold('power_pct')['lastread'] ?? 0) - (200.25 / 200.50 * 100)) < 0.000001, 'fractional power limit: Thold preserves decimal precision below 100 percent'); + +$logged = alert_round('power exceeds changed limit', array('power.draw' => '250.00', 'power.limit' => '200.00')); +alert_expect('power exceeds changed limit', $logged, array('power_pct' => array(true, array())) + $quiet); +e2e_check(abs((float) (alert_thold('power_pct')['lastread'] ?? 0) - 125) < 0.01, 'power exceeds changed limit: Thold used the current 200 W limit rather than the previous poll'); + +$logged = alert_round('power exceed persists', array('power.draw' => '250.00', 'power.limit' => '200.00')); +alert_expect('power exceed persists', $logged, array('power_pct' => array(true, array(ALERT_NOTIFY))) + $quiet); + +$logged = alert_round('power returns below limit', array('power.draw' => '100.50', 'power.limit' => '700.00')); +alert_expect('power returns below limit', $logged, array('power_pct' => array(false, array(ALERT_RESTORE))) + $quiet); /* A fault: hot, throttled by hardware, new uncorrected errors, a page pending. */