1FACTER(8)                                                            FACTER(8)
2
3
4

NAME

6       facter - Gather system information
7

SYNOPSIS

9       Collect and display facts about the system.
10

USAGE

12       facter [--color] [--config] [--custom-dir DIR] [-d|--debug] [--external-dir DIR] [--help]
13         [-j|--json] [--list-block-groups] [--list-cache-groups] [-l|--log-level LEVEL (=warn)]
14         [--no-block] [--no-cache] [--no-color] [--no-custom-facts] [--no-external-facts]
15         [--trace] [--verbose] [-v|--version] [-y|--yaml] [--strict] [fact] [fact] [...]
16

DESCRIPTION

18       Collect  and display facts about the current system. The library behind
19       Facter is easy to extend, making Facter an easy way to collect informa‐
20       tion about a system.
21
22       If no queries are given, then all facts will be returned.
23
24       Many  of  the command line options can also be set via the HOCON config
25       file. This file can also be used to block or cache certain fact groups.
26

OPTIONS

28             --color                      Enable color output.
29             --config                     A custom location for the config file.
30             --custom-dir arg             A directory to use for custom facts.
31       -d, [ --debug ]                    Enable debug output.
32             --external-dir arg           A directory to use for external facts.
33             --help                       Print help and usage information.
34       -j, [ --json ]                     Output facts in JSON format.
35             --list-block-groups          List the names of all blockable fact groups.
36             --list-cache-groups          List the names of all cacheable fact groups.
37             --show-legacy                Show legacy facts when querying all facts.
38       -l, [ --log-level ] arg (=warn)    Set logging level.
39                                          Supported levels are: none, trace, debug,
40                                          info, warn, error, and fatal.
41             --no-block                   Disable fact blocking.
42             --no-cache                   Disable fact caching.
43             --no-color                   Disable color output.
44             --no-custom-fact             Disable custom facts.
45             --no-external-facts          Disable external facts.
46             --no-ruby                    Disable loading Ruby, facts requiring Ruby, and custom facts.
47             --trace                      Enable backtraces for custom facts.
48             --verbose                    Enable verbose (info) output.
49       -v, [ --version ]                  Print the version and exit.
50       -y, [ --yaml ]                     Output facts in YAML format.
51

FILES

53       /etc/puppetlabs/facter/facter.conf
54              A HOCON config file that can be used to specify directories for custom and external facts, set various command line options, and specify facts to block. See example below for details, or visit the GitHub README.
55

EXAMPLE

57       Display all facts:
58
59
60
61           $ facter
62           disks => {
63             sda => {
64               model => "Virtual disk",
65               size => "8.00 GiB",
66               size_bytes => 8589934592,
67               vendor => "ExampleVendor"
68             }
69           }
70           dmi => {
71             bios => {
72               release_date => "06/23/2013",
73               vendor => "Example Vendor",
74               version => "6.00"
75             }
76           }
77           [...]
78
79
80
81       Display a single structured fact:
82
83
84
85           $ facter processors
86           {
87             count => 2,
88             isa => "x86_64",
89             models => [
90               "Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz",
91               "Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz"
92             ],
93             physicalcount => 2
94           }
95
96
97
98       Display a single fact nested within a structured fact:
99
100
101           $ facter processors.isa
102           x86_64
103
104
105
106       Display a single legacy fact. Note that non-structured  facts  existing
107       in  previous  versions  of Facter are still available, but are not dis‐
108       played by default due to redundancy with newer structured facts:
109
110
111           $ facter processorcount
112           2
113
114
115
116       Format facts as JSON:
117
118
119
120           $ facter --json os.name os.release.major processors.isa
121           {
122             "os.name": "Ubuntu",
123             "os.release.major": "14.04",
124             "processors.isa": "x86_64"
125           }
126
127
128
129       An example config file.
130
131
132
133           # always loaded (CLI and as Ruby module)
134           global : {
135               external-dir : "~/external/facts",
136               custom-dir   :  [
137                  "~/custom/facts",
138                  "~/custom/facts/more-facts"
139               ],
140               no-external-facts : false,
141               no-custom-facts   : false,
142               no-ruby           : false
143           }
144           # loaded when running from the command line
145           cli : {
146               debug     : false,
147               trace     : true,
148               verbose   : false,
149               log-level : "info"
150           }
151           # always loaded, fact-sepcific configuration
152           facts : {
153               # for valid blocklist entries, use --list-block-groups
154               blocklist : [ "file system", "EC2" ],
155               # for valid time-to-live entries, use --list-cache-groups
156               ttls : [ { "timezone" : 30 days } ]
157           }
158
159
160

AUTHOR

162       Luke Kanies
163
165       Copyright (c) 2011-2015 Puppet Labs, Inc Licensed under the Apache  2.0
166       license
167
168
169
170
171                                  April 2015                         FACTER(8)
Impressum