News: 0001635925

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Intel Working On pmtctl Tool For Linux In Dealing With Platform Telemetry Data

([Intel] 5 Minutes Ago pmtctl)


A set if 17 patches were posted today to the Linux kernel mailing list for introducing a new tool in the kernel source tree, pmtctl . This new pmtctl tool is for interfacing with Intel Platform Monitoring Technology.

Intel's [1]Platform Monitoring Technology (PMT) is already supported by the mainline Linux kernel while pmtctl is a new convenient tool for dealing with these telemetry metrics. Like Turbostat and various other small utilities, Intel is aiming to have pmtctl live within the Linux kernel source tree.

Intel engineer David Box explained of the new pmtctl tool:

"Intel Platform Monitoring Technology (PMT) exposes per-component telemetry counters through sysfs via the pmt_telemetry auxiliary bus driver. Each telemetry device provides a data file that can be read to sample the underlying hardware telemetry data. The meaning of each field within a sample is described by platform-specific metric definitions.

This series adds pmtctl, a command-line tool for querying PMT metrics on x86 Linux systems. It lives under tools/arch/x86/pmtctl/ alongside other platform-specific userspace tools.

The series introduces approximately 7k lines across the library, CLI frontend, code generation scripts, and documentation.

...

The implementation is split into a reusable library (libpmtctl_core) and a thin CLI frontend:

libpmtctl_core (lib/)

- Device enumeration: scans /sys/bus/auxiliary/drivers/pmt_telemetry and reads GUID and telem data path from sysfs attributes.

- Metric definitions: supports two loading modes:

built-in -- a C struct array compiled in at build time, generated from perf-style JSON by scripts/gen_builtin_defs.py.

runtime -- loaded at invocation via -J/--json-file (requires libjansson).

- Metric DB: block-based container with flat-index accessors.

- GUID intern table: canonical struct pmt_guid pointers shared between the built-in and JSON providers.

CLI frontend (src/)

- list: enumerate discovered PMT devices and/or metric definitions, with optional GUID intersection report (--guids) and device-only mode (--devices).

- stat: perf-stat-like metric sampling with configurable interval, count, event selection, and raw-register mode.

Metric JSON files are not included in the tree. Users obtain them from the Intel-PMT repository using Makefile targets that fetch XML metric definitions over the network and convert them into the JSON format expected by the tool.

Testing: functional testing requires a system with PMT-capable hardware and /sys/bus/auxiliary/drivers/pmt_telemetry populated. Reading telemetry data (stat) requires elevated privileges (CAP_SYS_ADMIN / sudo); listing metrics and devices (list) does not."

Those interested can find the Intel pmtctl patches on the [2]mailing list currently undergoing review.



[1] https://www.phoronix.com/search/Platform+Monitoring+Technology

[2] https://lore.kernel.org/platform-driver-x86/20260526014719.2248380-1-david.e.box@linux.intel.com/



Top Ten Ways to Pronounce Linux

1. Lih-nucks
2. Lie-nucks
3. Not Win-doze
4. World Domination
5. Lin-doze
6. God's OS
7. Better Than Microsoft
8. Crash-free
9. Heaven
10. Gates' Worst Nightmare