Chapter 4. SiteInfo Data Class

Table of Contents

Introduction
More Information

Introduction

The SiteInfo data class provides arbitrary information that is user (site) defined. Users can set any data which can be represented in string form and have it reported when SysInfo™ is run with the --class siteinfo option. The common types of user defined data are site/company issued asset tracking tags, physical location of system, and department name system belongs too.

Each SiteInfo data consists of a keyword, a multiword description, and a value. Any data which can be described in string form may be used in any of these siteinfo entries.

Setting SiteInfo Data

SiteInfo data may be set by manual creation of one or more siteinfo files or via the mcsysinfocli(1) command line.

Setting SiteInfo Data - File Method

You manual create, edit, and modify the siteinfo files directly using an editor or your own tools. SysInfo™ searches for and reports data for each of the following siteinfo files:

  • $HOME/.mcsysinfo/siteinfo

  • /etc/mcsysinfo/siteinfo

  • $SysInfoDir/config/siteinfo

where $SysInfoDir is the top level directory where SysInfo is installed (/opt/sysinfo is the default). The format of each siteinfo is defined in the mcsysinfositeinfo(5) reference manual.

For example, if you wanted to define a company issued asset tag value, you could run this command:

mkdir /etc/mcsysinfo
echo "AssetTag|Acme Asset Tag|A12345" > /etc/mcsysinfo/siteinfo

Setting SiteInfo Data - Using the CLI

To set SiteInfo data using the SysInfo™ command line, use the following syntax for each SiteInfo data you wish to defined:

mcsysinfo \
      --siteinfo-var var \
      --siteinfo-desc description \
      --siteinfo-value value \
      --siteinfo-scope   [ user  |   system  |   site ]

The --siteinfo-scope argument specifies what siteinfo file the data is added to.

Here's an example of how to define a company issued asset tag value in the system's siteinfo file:

mcsysinfo --siteinfo-var AssetTag --siteinfo-desc 'Acme Asset Tag #' \
    --siteinfo-value A123456 --siteinfo-scope system