facter man page

facter — Gather system information

Synopsis

Collect and display facts about the system.

Usage

facter [-h|--help] [-t|--timing] [-d|--debug] [-p|--puppet] [-v|--version]
  [-y|--yaml] [-j|--json] [--plaintext] [--external-dir DIR] [--no-external-dir]
  [fact] [fact] [...]

Description

Collect and display facts about the current system. The library behind Facter is easy to expand, making Facter an easy way to collect information about a system from within the shell or within Ruby.

If no facts are specifically asked for, then all facts will be returned.

Example

Display all facts:

$ facter
architecture => amd64
blockdevices => sda,sr0
domain => example.com
fqdn => puppet.example.com
hardwaremodel => x86_64
[...]

Display a single fact:

$ facter kernel
Linux

Format facts as JSON:

$ facter --json architecture kernel hardwaremodel
{
  "architecture": "amd64",
  "kernel": "Linux",
  "hardwaremodel": "x86_64"
}

Author

Luke Kanies

Options

-y, --yaml                       Emit facts in YAML format.
-j, --json                       Emit facts in JSON format.
    --plaintext                  Emit facts in plaintext format.
    --trace                      Enable backtraces.
    --external-dir DIR           The directory to use for external facts.
    --no-external-dir            Turn off external facts.
-d, --debug                      Enable debugging.
-t, --timing                     Enable timing.
-p, --puppet                     Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.
-v, --version                    Print the version and exit.
-h, --help                       Print this help message.

Info

February 2014