Home » 2016 » May » 24 » FACTER command in Linux : showing system facts

7:25 PM
FACTER command in Linux : showing system facts

Facter - Collect and display facts/information about the system like uptime, OS info, memory usage, PATH, processor, n/w etc.

       facter [-d|--debug] [-h|--help] [-p|--puppet] [-v|--version] [-y|--yaml] [-j|--json] [fact] [fact] [...]

       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.

puppet:  Load the Puppet libraries, thus allowing Facter to load Puppet specific (custom) facts

       version: Print the version and exit.

       help:    Print this help message.

       debug:   Enable debugging.

       trace:   Enable backtraces.

       timing:  Enable timing.

       facter kernel

shankys:~> facter kernel

   If no facts are specifically asked for, then all facts of the system will be printed.

shankys:~> facter|head -n 20
architecture => x86_64
domain =>portal.com
facterversion => 1.6.18
fqdn => shankys.portal.com
hardwareisa => x86_64
hardwaremodel => x86_64
hostname => shankys

id => shankar
interfaces => eth0,lo
ipaddress =>
ipaddress_eth0 =>
ipaddress_lo =>
is_virtual => true
kernel => Linux
kernelmajversion => 3.0
kernelrelease => 3.0.101-0.47.71-xen
kernelversion => 3.0.101
macaddress => 00:16:3E:2E:8E:72
macaddress_eth0 => 00:16:3E:2E:8E:72
memoryfree => 10.44 GB

We can specify a fact also and facter will return the info for that fact. For example if we want to know the uptime of the system,

shankys:~> facter uptime
20 days

You can use grep on top of facter to fetch any system information. Its really helpful to get any information about a system. Example:


shankys:~> facter|grep memory
memoryfree => 10.34 GB
memorysize => 16.01 GB
memorytotal => 16.01 GB


Category: Open System-Linux | Views: 1108 | Added by: shanky | Tags: facter, system information, system facts, facter command in Linux | Rating: 5.0/1

Related blogs

You may also like to see:

[2014-11-25][Open System-Linux]
DMESG command in Linux : to display or control kernel ring buffer
[2014-12-28][Open System-Linux]
Shift command with examples
[2015-07-18][Open System-Linux]
Creating and Managing Logical Volume Manager in Linux
[2014-03-03][Open System-Linux]
Working with VI Editor: Basic and Advanced
[2014-12-16][Open System-Linux]
CUT command in Linux : cut the file vertically

Total comments: 0