# Performance Co Pilot (PCP) && Nix

**URL:** https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729
**Category:** Guides
**Created:** [February 28, 2026, 3:42am UTC](https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729 "2026-02-28T03:42:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![randomizedcoder](https://discourse.nixos.org/user_avatar/discourse.nixos.org/randomizedcoder/32/34767_2.png) [@randomizedcoder](https://discourse.nixos.org/u/randomizedcoder)
#### Post date: [February 28, 2026, 3:42am UTC](https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729/1 "2026-02-28T03:42:10Z")

</div>

G’day,

I’ve been working on the flake.nix for the Performance Co Pilot ( [GitHub - performancecopilot/pcp: Performance Co-Pilot](https://github.com/performancecopilot/pcp/) ). Setup some cute automated testing using microvms.

Performance Co Pilot && Nix

[https://youtu.be/u3iUcqkcpNY](https://youtu.be/u3iUcqkcpNY)

Hopefully this will get merged into pcp soon, via:

> <https://github.com/performancecopilot/pcp/pull/2501>
>
> @kmcdonell 
> 
> I've been working away on the nix. Here's the draft. I'm workin…g on a video to demonstrate all this.
> 
> I'm pretty happy with the microvms and the automated verification.
> 
> \`\`\`
> nix run .#pcp-lifecycle-test-all 
> ...
> \--- Phase 6: Wait for Exit (timeout: 60s) ---
> PASS: VM exited cleanly (4316ms)
> 
> Timing Summary
> ─────────────────────────────────────
> Phase Time (ms)
> ─────────────────────────────────────
> build 10337
> start 119
> serial 7
> virtio 7
> services 19841
> metrics 2056
> shutdown 408
> exit 4316
> ─────────────────────────────────────
> TOTAL 37178
> ─────────────────────────────────────
> 
> ========================================
> Result: ALL PHASES PASSED
> Total time: 37.1s
> ========================================
> 
> ========================================
> Test Suite Summary
> ========================================
> 
> Variant Result Duration
> ─────── ────── ────────
> base PASSED 6m9s
> eval PASSED 40.9s
> grafana PASSED 41.1s
> bpf PASSED 39.6s
> grafana-tap PASSED 39.2s
> 
> ────────────────────────────────────────
> Total: 5 passed, 0 failed, 0 skipped
> Total time: 8m50s
> ────────────────────────────────────────
> 
> \[das@l:~/Downloads/pcp\]$ 
> \`\`\`

Thanks,

Dave

---

<div class="post-metadata">

### Author: ![randomizedcoder](https://discourse.nixos.org/user_avatar/discourse.nixos.org/randomizedcoder/32/34767_2.png) [@randomizedcoder](https://discourse.nixos.org/u/randomizedcoder)
#### Post date: [March 1, 2026, 6:27pm UTC](https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729/2 "2026-03-01T18:27:43Z")

</div>

Merged!

> <https://github.com/performancecopilot/pcp/pull/2501>
>
> @kmcdonell 
> 
> I've been working away on the nix. Here's the draft. I'm workin…g on a video to demonstrate all this.
> 
> I'm pretty happy with the microvms and the automated verification.
> 
> \`\`\`
> nix run .#pcp-lifecycle-test-all 
> ...
> \--- Phase 6: Wait for Exit (timeout: 60s) ---
> PASS: VM exited cleanly (4316ms)
> 
> Timing Summary
> ─────────────────────────────────────
> Phase Time (ms)
> ─────────────────────────────────────
> build 10337
> start 119
> serial 7
> virtio 7
> services 19841
> metrics 2056
> shutdown 408
> exit 4316
> ─────────────────────────────────────
> TOTAL 37178
> ─────────────────────────────────────
> 
> ========================================
> Result: ALL PHASES PASSED
> Total time: 37.1s
> ========================================
> 
> ========================================
> Test Suite Summary
> ========================================
> 
> Variant Result Duration
> ─────── ────── ────────
> base PASSED 6m9s
> eval PASSED 40.9s
> grafana PASSED 41.1s
> bpf PASSED 39.6s
> grafana-tap PASSED 39.2s
> 
> ────────────────────────────────────────
> Total: 5 passed, 0 failed, 0 skipped
> Total time: 8m50s
> ────────────────────────────────────────
> 
> \[das@l:~/Downloads/pcp\]$ 
> \`\`\`

---

<div class="post-metadata">

### Author: ![randomizedcoder](https://discourse.nixos.org/user_avatar/discourse.nixos.org/randomizedcoder/32/34767_2.png) [@randomizedcoder](https://discourse.nixos.org/u/randomizedcoder)
#### Post date: [March 1, 2026, 11:35pm UTC](https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729/3 "2026-03-01T23:35:09Z")

</div>

Nixpkgs pull request for the same

> <https://github.com/NixOS/nixpkgs/pull/495646>
>
> pcp: init at 7.1.1-unstable-2026-03-01, nixos/pcp: init module, nixosTests.pcp: …init
> 
> Adds \[Performance Co-Pilot (PCP)\](https://pcp.io), a system performance monitoring toolkit from the Linux Foundation. PCP provides a framework for collecting, archiving, and analyzing system-level performance metrics.
> 
> To create this pull request, flake.nix and extensive ./nix/ has been added via https://github.com/performancecopilot/pcp/pull/2501
> YouTube video: https://youtu.be/u3iUcqkcpNY
> 
> This is the nixpkgs version, to allow people on NixOS to easily use Performance Co Pilot (pcp)
> 
> \*\*Package\*\* (\`pkgs/by-name/pc/pcp/package.nix\`):
> \- Builds from upstream main branch (pinned commit); upstream does not tag releases consistently
> \- Feature flags: \`withSystemd\`, \`withPfm\`, \`withBpf\` (default off to avoid LLVM closure), \`withSnmp\`
> \- Three outputs: \`out\`, \`man\`, \`doc\`
> \- Five patches for Nix/NixOS compatibility (GNUmakefile ownership flags, Perl install paths, Python ctypes library discovery, shell pwd portability, pmapi reconnect fix)
> \- Replaces a previously removed/archived \`pcp\` alias (different project)
> 
> \*\*NixOS module\*\* (\`nixos/modules/services/monitoring/pcp.nix\`):
> \- \`services.pcp.enable\` with presets: \`standalone\` (full suite), \`minimal\` (pmcd only), \`custom\`
> \- Four services: pmcd (collector daemon), pmlogger (archive logger), pmie (inference engine), pmproxy (REST API gateway)
> \- Daily maintenance timers for pmlogger and pmie
> \- Configurable PMDA registration, firewall rules, IP filtering, and systemd hardening
> \- BCC PMDA support with appropriate capability grants
> 
> \*\*NixOS test\*\* (\`nixos/tests/pcp.nix\`):
> \- Starts pmcd and pmproxy, verifies ports 44321/44322, queries kernel metrics via \`pminfo\`
> 
> \## Things done
> 
> \- Built on platform:
> - \[x\] x86\_64-linux
> - \[\] aarch64-linux
> - \[\] x86\_64-darwin
> - \[\] aarch64-darwin
> \- Tested, as applicable:
> - \[x\] \[NixOS tests\] in \[nixos/tests\].
> - \[x\] \[Package tests\] at \`passthru.tests\`.
> - \[\] Tests in \[lib/tests\] or \[pkgs/test\] for functions and "core" functionality.
> \- \[\] Ran \`nixpkgs-review\` on this PR. See \[nixpkgs-review usage\].
> \- \[x\] Tested basic functionality of all binary files, usually in \`./result/bin/\`.
> \- Nixpkgs Release Notes
> - \[\] Package update: when the change is major or breaking.
> \- NixOS Release Notes
> - \[x\] Module addition: when adding a new NixOS module.
> - \[\] Module update: when the change is significant.
> \- \[x\] Fits \[CONTRIBUTING.md\], \[pkgs/README.md\], \[maintainers/README.md\] and other READMEs.
> 
> \[NixOS tests\]: https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests
> \[Package tests\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests
> \[nixpkgs-review usage\]: https://github.com/Mic92/nixpkgs-review#usage
> 
> \[CONTRIBUTING.md\]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md
> \[lib/tests\]: https://github.com/NixOS/nixpkgs/blob/master/lib/tests
> \[maintainers/README.md\]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md
> \[nixos/tests\]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests
> \[pkgs/README.md\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md
> \[pkgs/test\]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/test

---

<div class="post-metadata">

### Author: ![batonac](https://discourse.nixos.org/user_avatar/discourse.nixos.org/batonac/32/11365_2.png) [@batonac](https://discourse.nixos.org/u/batonac)
#### Post date: [June 22, 2026, 12:32pm UTC](https://discourse.nixos.org/t/performance-co-pilot-pcp-nix/75729/4 "2026-06-22T12:32:45Z")

</div>

Wonderful development. Cockpit uses PCP for its core metrics analyzer. Looking forward to having this available!
