Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


cpu (6) Versions 2.1.2

Manage CPU Governor on linux

cookbook 'cpu', '~> 2.1.2'
cookbook 'cpu', '~> 2.1.2', :supermarket
knife supermarket install cpu
knife supermarket download cpu
Quality 100%

cpu Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

Manage CPU Governor on linux



  • Ubuntu
  • Debian
  • Centos


  • Chef 12.5+


No dependencies defined


  • node['cpu']['governor'] - Defaults to "ondemand".


  • cpu::affinity - deprecated
  • cpu::default - deprecated
  • cpu::governor - Sets the CPU governer based on the attribute above




  • set: Default action.


  • pid:
  • cpu:


cpu_affinity 1234 do
  cpu 0

Set affinity to processor 0,1,2 for process nginx

cpu_affinity 'set affinity for nginx' do
  pid '/var/run/'
  cpu '0-2'



  • set: Default action.


  • pid:
  • priority:


cpu_nice 1234 do
  priority 12
cpu_nice 'set affinity for nginx' do
  pid '/var/run/'
  priority 19

License and Maintainer

Original Maintainer:: Guilhem Lettron

License:: Apache v2.0


This project exists thanks to all the people who contribute.


Thank you to all our backers!


Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

CPU Changelog

This file is used to list changes made in each version of the cpu cookbook.

2.1.2 - 2021-08-31

  • Standardise files with files in sous-chefs/repo-management

v2.1.0 (2020-10-24)

  • resolved cookstyle error: metadata.rb:6:1 refactor: ChefRedundantCode/LongDescriptionMetadata
  • resolved cookstyle error: metadata.rb:18:1 refactor: ChefModernize/RespondToInMetadata
  • resolved cookstyle error: spec/unit/recipes/default_spec.rb:29:7 warning: ChefDeprecations/DeprecatedChefSpecPlatform
  • resolved cookstyle error: spec/unit/recipes/default_spec.rb:39:7 warning: ChefDeprecations/DeprecatedChefSpecPlatform
  • resolved cookstyle error: spec/unit/recipes/default_spec.rb:49:7 warning: ChefDeprecations/DeprecatedChefSpecPlatform
  • Adoption by Sous-Chefs

v2.0.0 (2017-04-07)

  • This cookbook now requires Chef 12.5 or later
  • Fixed failures on RHEL in the affinity recipe
  • Fixed helper methods that were leaking into the global Ruby namespace
  • Added support for RHEL derivatives to the metadata
  • Updated the affinity resource to install the necessary package. There is no longer a need to include the recipe first now.
  • Added deprecation warnings to the legacy recipes that are no longer required
  • Converted the LWRPs to custom resources. This adds why-run support for the resources
  • Added full integration testing on RHEL/Ubuntu in Travis CI
  • Simplified testing with Delivery local
  • Added a test recipe that tests the governor recipe and also the resources. Previously only the empty default recipe was being tested
  • Removed test gems from the Gemfile as testing should be done with ChefDK instead
  • Added a basic Chefspec test for the governor recipe
  • Updated the governor recipe to warn instead of failing on RHEL 7 and Fedora

v1.0.0 (2016-11-02)

  • Moved maintenance to the redguide group
  • Added use_inline_resources to the providers to properly notify on updates
  • Removed Chef 10 compatibility
  • Resolved all cookstyle warnings
  • Added new metadata for Supermarket
  • Added testing in Travis
  • Added local testing with rake and test kitchen
  • Added the Apache 2.0 license file
  • Add a Berksfile
  • Refactored the Readme
  • Added a chefignore file

Collaborator Number Metric

2.1.2 passed this metric

Contributing File Metric

2.1.2 passed this metric

Foodcritic Metric

2.1.2 passed this metric

No Binaries Metric

2.1.2 passed this metric

Publish Metric

2.1.2 passed this metric

Supported Platforms Metric

2.1.2 passed this metric

Testing File Metric

2.1.2 passed this metric

Version Tag Metric

2.1.2 passed this metric