Forge Home

facter2_numa

NUMA CPU and Memory layout structured facts for facter 2.x

8,325 downloads

7,968 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.2 (latest)
  • 0.0.1
released Nov 28th 2015
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'new23d-facter2_numa', '0.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add new23d-facter2_numa
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install new23d-facter2_numa --version 0.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: facter, numa

Documentation

new23d/facter2_numa — version 0.0.2 Nov 28th 2015

facter2-numa

NUMA CPU and Memory layout structured facts for facter 2.x.

To use structured facts in your Puppet manifests, you may need to set stringify_facts = false in the [main] section of your puppet.conf.

Sample output

$ facter numa
{"count"=>"2", "nodes"=>{"0"=>{"cpus"=>["0", "1", "2", "3"], "memory"=>"8192"}, "1"=>{"cpus"=>["4", "5", "6", "7"], "memory"=>"8192"}}}

$ facter --yaml numa
---
numa:
  count: "2"
  nodes:
    "0":
      memory: "8192"
      cpus:
      - "0"
      - "1"
      - "2"
      - "3"
    "1":
      memory: "8192"
      cpus:
      - "4"
      - "5"
      - "6"
      - "7"

$ facter --json numa
{
  "numa": {
    "nodes": {
      "0": {
        "cpus": [
          "0",
          "1",
          "2",
          "3"
        ],
        "memory": "8192"
      },
      "1": {
        "cpus": [
          "4",
          "5",
          "6",
          "7"
        ],
        "memory": "8192"
      }
    },
    "count": "2"
  }
}

Installation

Requirements

facter-2.x

numactl

Option A

Pick a package for your distribution from the releases tab. CentOS/Red Hat 6, 7; Ubuntu 14.04; Debian 8.

Option B

Drop the file numa.rb

on CentOS 6 in /usr/lib/ruby/site_ruby/1.8/facter

on CentOS 7 in /usr/share/ruby/vendor_ruby/facter

on Ubuntu 14.04 in /usr/lib/ruby/vendor_ruby/facter

on Debian 8 in /usr/lib/ruby/vendor_ruby/facter

Option C

Use the new23d-facter2_numa module from the Forge. It would only expose the structured numa fact for your manifests though.