cookbook 'cpu', '= 0.2.0'
cpu (6) Versions 0.2.0 Follow8
Manage CPU Governor on linux
cookbook 'cpu', '= 0.2.0', :supermarket
knife supermarket install cpu
knife supermarket download cpu
DESCRIPTION
Chef cookbook to manage CPU related actions on linux.
REQUIREMENTS
Linux 2.6+
tested on Ubuntu.
Attributes
-
node['cpu']['governor']
- governator for to set for the node
Recipes
governor
Set the governator for the node from attributes
affinity
Install software to set cpu affinity of a process.
Resources and Providers
affinity
Set the affinity for a process.
Actions
-
set
- Set affinity
Attribute Parameters
-
cpu
: Cpu(s) affinity - required -
pid
: Pid or PidFile - name
Examples
cpu_affinity 1234 do
cpu 0
end
# Set affinity to processor 0,1,2 for process nginx
cpu-affinity "set affinity for nginx" do
pid "/var/run/nginx.pid"
cpu "0-2"
end
nice
Set the priority for a process.
Actions
-
set
- Set priority
Attribute Parameters
-
pid
: Pid or PidFile - name -
priority
: priority for process
Examples
cpu_nice 1234 do
priority 12
end
cpu_nice "set affinity for nginx" do
pid "/var/run/nginx.pid"
priority 19
end
USAGE
in a recipe:
node.set["node"]["cpu"]["governor"] = "performance"
include_recipe "cpu::governor"
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
License Metric
0.2.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/74ade164c6781122487480ad/cpu/providers/affinity.rb:21
FC017: LWRP does not notify when updated: /tmp/74ade164c6781122487480ad/cpu/providers/nice.rb:21
FC059: LWRP provider does not declare use_inline_resources: /tmp/74ade164c6781122487480ad/cpu/providers/affinity.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/74ade164c6781122487480ad/cpu/providers/nice.rb:1
FC064: Ensure issues_url is set in metadata: /tmp/74ade164c6781122487480ad/cpu/metadata.rb:1
FC065: Ensure source_url is set in metadata: /tmp/74ade164c6781122487480ad/cpu/metadata.rb:1
Run with Foodcritic Version 8.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.2.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/affinity.rb:21
FC017: LWRP does not notify when updated: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/nice.rb:21
FC059: LWRP provider does not declare use_inline_resources: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/affinity.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/nice.rb:1
FC064: Ensure issues_url is set in metadata: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/metadata.rb:1
FC065: Ensure source_url is set in metadata: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/metadata.rb:1
Run with Foodcritic Version 8.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/74ade164c6781122487480ad/cpu/providers/nice.rb:21
FC059: LWRP provider does not declare use_inline_resources: /tmp/74ade164c6781122487480ad/cpu/providers/affinity.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/74ade164c6781122487480ad/cpu/providers/nice.rb:1
FC064: Ensure issues_url is set in metadata: /tmp/74ade164c6781122487480ad/cpu/metadata.rb:1
FC065: Ensure source_url is set in metadata: /tmp/74ade164c6781122487480ad/cpu/metadata.rb:1
Run with Foodcritic Version 8.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/affinity.rb:21
FC017: LWRP does not notify when updated: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/nice.rb:21
FC059: LWRP provider does not declare use_inline_resources: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/affinity.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/providers/nice.rb:1
FC064: Ensure issues_url is set in metadata: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/metadata.rb:1
FC065: Ensure source_url is set in metadata: /tmp/ae1fc8e9e02977851b3bfaf8/cpu/metadata.rb:1
Run with Foodcritic Version 8.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any