{"id":13579143,"url":"https://github.com/intel/pcm","last_synced_at":"2026-04-10T10:08:12.222Z","repository":{"id":37837646,"uuid":"72425875","full_name":"intel/pcm","owner":"intel","description":"Intel® Performance Counter Monitor (Intel® PCM)","archived":false,"fork":false,"pushed_at":"2025-05-07T13:57:23.000Z","size":6372,"stargazers_count":2989,"open_issues_count":62,"forks_count":490,"subscribers_count":91,"default_branch":"master","last_synced_at":"2025-05-07T22:02:22.054Z","etag":null,"topics":["cpu","energy","freebsd","intel","linux","monitor-performance","monitoring","osx","pcm","performance-analysis","performance-counters","performance-dashboard","performance-metrics","performance-monitoring","performance-visualization","power","processor","processor-architecture","windows","xeon"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-31T10:24:58.000Z","updated_at":"2025-05-07T13:57:30.000Z","dependencies_parsed_at":"2022-08-08T22:01:41.130Z","dependency_job_id":"4ed080a5-4c5d-4f39-a808-04ef6f0cfeb7","html_url":"https://github.com/intel/pcm","commit_stats":{"total_commits":2056,"total_committers":97,"mean_commits":"21.195876288659793","dds":0.3638132295719845,"last_synced_commit":"2612158f452469c59fe72e79e4cdf9f71d46a4b5"},"previous_names":["opcm/pcm"],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fpcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fpcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fpcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fpcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intel","download_url":"https://codeload.github.com/intel/pcm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036806,"owners_count":22003651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu","energy","freebsd","intel","linux","monitor-performance","monitoring","osx","pcm","performance-analysis","performance-counters","performance-dashboard","performance-metrics","performance-monitoring","performance-visualization","power","processor","processor-architecture","windows","xeon"],"created_at":"2024-08-01T15:01:36.906Z","updated_at":"2026-04-10T10:08:12.216Z","avatar_url":"https://github.com/intel.png","language":"C++","readme":"--------------------------------------------------------------------------------\nIntel\u0026reg; Performance Counter Monitor (Intel\u0026reg; PCM)\n--------------------------------------------------------------------------------\n\n[![CodeQL](https://github.com/intel/pcm/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/intel/pcm/security/code-scanning/tools/CodeQL/status)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/intel/pcm/badge)](https://securityscorecards.dev/viewer/?uri=github.com/intel/pcm)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8652/badge)](https://www.bestpractices.dev/projects/8652)\n\n[PCM Tools](#pcm-tools) | [Building PCM](#building-pcm-tools) | [Downloading Pre-Compiled PCM](#downloading-pre-compiled-pcm-tools) | [FAQ](#frequently-asked-questions-faq) | [API Documentation](#pcm-api-documentation) | [Environment Variables](#pcm-environment-variables) | [Compilation Options](#custom-compilation-options)\n\nIntel\u0026reg; Performance Counter Monitor (Intel\u0026reg; PCM) is an application programming interface (API) and a set of tools based on the API to monitor performance and energy metrics of Intel\u0026reg; Core\u0026trade;, Xeon\u0026reg;, Atom\u0026trade; and Xeon Phi\u0026trade; processors. PCM works on Linux, Windows, Mac OS X, FreeBSD, DragonFlyBSD and ChromeOS operating systems.\n\n*Github repository statistics:* ![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fhetthbszh0.execute-api.us-east-2.amazonaws.com%2Fdefault%2Fpcm-clones) ![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2F5urjfrshcd.execute-api.us-east-2.amazonaws.com%2Fdefault%2Fpcm-yesterday-clones) ![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fcsqqh18g3l.execute-api.us-east-2.amazonaws.com%2Fdefault%2Fpcm-today-clones)\n\nWe welcome bug reports and enhancement requests, which can be submitted via the \"Issues\" section on GitHub. For those interested in contributing to the code, please refer to the guidelines outlined in the CONTRIBUTING.md file.\n\n--------------------------------------------------------------------------------\nCurrent Build Status\n--------------------------------------------------------------------------------\n\n- Linux: [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/intel/pcm/linux_make.yml?branch=master)](https://github.com/intel/pcm/actions/workflows/linux_make.yml?query=branch%3Amaster)\n- Windows: [![Build status](https://ci.appveyor.com/api/projects/status/github/intel/pcm?branch=master\u0026svg=true)](https://ci.appveyor.com/project/opcm/pcm)\n- FreeBSD: [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/intel/pcm/freebsd_build.yml?branch=master)](https://github.com/intel/pcm/actions/workflows/freebsd_build.yml?query=branch%3Amaster)\n- OS X: [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/intel/pcm/macosx_build.yml?branch=master)](https://github.com/intel/pcm/actions/workflows/macosx_build.yml?query=branch%3Amaster)\n- Docker container: [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/intel/pcm/docker.yml?branch=master)](doc/DOCKER_README.md)\n\n--------------------------------------------------------------------------------\nPCM Tools\n--------------------------------------------------------------------------------\n\nPCM provides a number of command-line utilities for real-time monitoring:\n\n- **pcm** : basic processor monitoring utility (instructions per cycle, core frequency (including Intel(r) Turbo Boost Technology), memory and Intel(r) Quick Path Interconnect bandwidth, local and remote memory bandwidth, cache misses, core and CPU package sleep C-state residency, core and CPU package thermal headroom, cache utilization, CPU and memory energy consumption)\n\n![pcm output](https://github.com/intel/pcm/assets/25432609/88485ff5-dc7c-4a1c-974f-8396f03829dc)\n\n- **pcm-sensor-server** : pcm collector exposing metrics over http in JSON or Prometheus (exporter text based) format ([how-to](doc/PCM-EXPORTER.md)). Also available as a [docker container](doc/DOCKER_README.md). More info about Global PCM events is [here](doc/PCM-SENSOR-SERVER-README.md).\n- **pcm-memory** : monitor memory bandwidth (per-channel and per-DRAM DIMM rank)\n![pcm-memory output](https://raw.githubusercontent.com/wiki/intel/pcm/pcm-memory.x.JPG)\n- **pcm-accel** : [monitor Intel® In-Memory Analytics Accelerator (Intel® IAA), Intel® Data Streaming Accelerator (Intel® DSA) and Intel® QuickAssist Technology (Intel® QAT)  accelerators](doc/PCM_ACCEL_README.md)\n![image](https://user-images.githubusercontent.com/25432609/218480696-42ade94f-e0c3-4000-9dd8-39a0e75a210e.png)\n\n- **pcm-latency** : monitor L1 cache miss and DDR/PMM memory latency\n- **pcm-pcie** : monitor PCIe bandwidth per-socket\n- **pcm-iio** : [monitor PCIe bandwidth per PCIe bus/device](doc/PCM_IIO_README.md)\n\n![pcm-iio output](https://raw.githubusercontent.com/wiki/intel/pcm/pcm-iio.png)\n- **pcm-numa** : monitor local and remote memory accesses\n- **pcm-power** : monitor sleep and energy states of processor, Intel(r) Quick Path Interconnect, DRAM memory, reasons of CPU frequency throttling and other energy-related metrics\n- **pcm-tsx**: monitor performance metrics for Intel(r) Transactional Synchronization Extensions\n- **pcm-core** and **pmu-query**: query and monitor arbitrary processor core events\n- **pcm-raw**: [program arbitrary **core** and **uncore** events by specifying raw register event ID encoding](doc/PCM_RAW_README.md)\n- **pcm-bw-histogram**: collect memory bandwidth utilization histogram\n\nGraphical front ends:\n- **pcm Grafana dashboard** :  front-end for Grafana (in [scripts/grafana](scripts/grafana) directory). Full Grafana Readme is [here](scripts/grafana/README.md)\n![pcm grafana output](https://raw.githubusercontent.com/wiki/intel/pcm/pcm-dashboard.png)\n- **pcm-sensor** :  front-end for KDE KSysGuard\n- **pcm-service** :  front-end for Windows perfmon\n\nThere are also utilities for reading/writing model specific registers (**pcm-msr**), PCI configuration registers (**pcm-pcicfg**), memory mapped registers (**pcm-mmio**) and TPMI registers (**pcm-tpmi**) supported on Linux, Windows, Mac OS X and FreeBSD.\n\nAnd finally a daemon that stores core, memory and QPI counters in shared memory that can be be accessed by non-root users.\n\n--------------------------------------------------------------------------------\nBuilding PCM Tools\n--------------------------------------------------------------------------------\n\nClone PCM repository with submodules:\n\n```\ngit clone --recursive https://github.com/intel/pcm\ncd pcm\n```\n\nor clone the repository first, and then update submodules with:\n\n```\ngit submodule update --init --recursive\n```\n\nInstall cmake (and libasan on Linux) then compile:\n\nChoose **one** of the following build methods:\n* Incremental Build (Fastest): if you have a previous build to reuse the existing `build` directory and preserve previous build artifacts, go straight to the `cd build` step.\n* Clean Build (From Scratch): Run `cmake -E rm -rf build \u0026\u0026 cmake -E make_directory build` for your first build, or for a full rebuild to ensure a \"clean state\" by deleting all previous build data.\n```\ncd build\ncmake ..\ncmake --build .\n```\nYou will get all the utilities (pcm, pcm-memory, etc) in `build/bin` directory.\n'--parallel' can be used for faster building:\n```\ncmake --build . --parallel\n```\nDebug is default on Windows. Specify config to build Release:\n```\ncmake --build . --config Release\n```\nOn Windows and MacOs additional drivers and steps are required. Please find instructions here: [WINDOWS_HOWTO.md](doc/WINDOWS_HOWTO.md) and [MAC_HOWTO.txt](doc/MAC_HOWTO.txt).\n\nFreeBSD/DragonFlyBSD-specific details can be found in [FREEBSD_HOWTO.txt](doc/FREEBSD_HOWTO.txt)\n\n![pcm-build-run-2](https://user-images.githubusercontent.com/25432609/205663554-c4fa1724-6286-495a-9dbd-0104de3f535f.gif)\n\n--------------------------------------------------------------------------------\nDownloading Pre-Compiled PCM Tools\n--------------------------------------------------------------------------------\n\n- Linux:\n  * Ubuntu/Debian: `sudo apt install pcm`\n  * openSUSE: `sudo zypper install pcm`\n  * RHEL8.5 or later: `sudo dnf install pcm` \n  * Fedora: `sudo yum install pcm`\n  * RPMs and DEBs with the *latest* PCM version for RHEL/SLE/Ubuntu/Debian/openSUSE/etc distributions (binary and source) are available [here](https://software.opensuse.org/download/package?package=pcm\u0026project=home%3Aopcm)\n- Windows: download PCM binaries as [appveyor build service](https://ci.appveyor.com/project/opcm/pcm/history) artifacts and required Visual C++ Redistributable from [www.microsoft.com](https://www.microsoft.com/en-us/download/details.aspx?id=48145). Additional steps and drivers are required, see [WINDOWS_HOWTO.md](doc/WINDOWS_HOWTO.md).\n- Docker: see [instructions on how to use pcm-sensor-server pre-compiled container from docker hub](doc/DOCKER_README.md).\n\n--------------------------------------------------------------------------------\nExecuting PCM tools under non-root user on Linux\n--------------------------------------------------------------------------------\n\nExecuting PCM tools under an unprivileged user on a Linux operating system is feasible. However, there are certain prerequisites that need to be met, such as having Linux perf_event support for your processor in the Linux kernel version you are currently running. To successfully run the PCM tools, you need to set the `/proc/sys/kernel/perf_event_paranoid` setting to -1 as root once:\n\n```\necho -1 \u003e /proc/sys/kernel/perf_event_paranoid\n```\n\nand configure two specific environment variables when running the tools under a non-root user:\n\n```\nexport PCM_NO_MSR=1\nexport PCM_KEEP_NMI_WATCHDOG=1\n```\n\nFor instance, you can execute the following commands to set the environment variables and run pcm:\n\n```\nexport PCM_NO_MSR=1\nexport PCM_KEEP_NMI_WATCHDOG=1\npcm\n```\n\nor (to run the pcm sensor server as non-root):\n\n```\nPCM_NO_MSR=1 PCM_KEEP_NMI_WATCHDOG=1 pcm-sensor-server\n```\n\nPlease keep in mind that when executing PCM tools under an unprivileged user on Linux, certain PCM metrics may be unavailable. This limitation specifically affects metrics that rely solely on direct MSR (Model-Specific Register) register access. Due to the restricted privileges of the user, accessing these registers is not permitted, resulting in the absence of corresponding metrics.\n\n--------------------------------------------------------------------------------\nFrequently Asked Questions (FAQ)\n--------------------------------------------------------------------------------\n\nPCM's frequently asked questions (FAQ) are located [here](doc/FAQ.md).\n\n--------------------------------------------------------------------------------\nPCM API documentation\n--------------------------------------------------------------------------------\n\nPCM API documentation is embedded in the source code and can be generated into html format from source using Doxygen (www.doxygen.org).\n\n--------------------------------------------------------------------------------\nPCM environment variables\n--------------------------------------------------------------------------------\n\nThe list of PCM environment variables is located [here](doc/ENVVAR_README.md)\n\n--------------------------------------------------------------------------------\nCustom compilation options\n--------------------------------------------------------------------------------\nThe list of custom compilation options is located [here](doc/CUSTOM-COMPILE-OPTIONS.md)\n\n--------------------------------------------------------------------------------\nPackaging\n--------------------------------------------------------------------------------\nPackaging with CPack is supported on Debian and Redhat/SUSE system families.\nTo create DEB of RPM package need to call cpack after building in build folder:\n```\ncd build\ncpack\n```\nThis creates package:\n- \"pcm-VERSION-Linux.deb\" on Debian family systems;\n- \"pcm-VERSION-Linux.rpm\" on Redhat/SUSE-family systems.\nPackages contain pcm-\\* binaries and required for usage opCode-\\* files.\n","funding_links":[],"categories":["C++","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","硬件_其他"],"sub_categories":["资源传输下载"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fpcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintel%2Fpcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fpcm/lists"}