Name

sysinfo — MagniCompSysInfo™ Command Line Interface (CLI)

Synopsis

mcsysinfo [ --avoidblink ] [ --background | --bg color ] [ --cache yes | no ] [ --cachedir dir ] [ --configdir dir ] [ --configfile FileName ] [--copyright ] [ -c | --class item1,item2,... ] [--danger ] [ --display name ] [ -d | --debug ] [--democheck ] [ -e | --encode EncodeType ] [ --cacheexpire seconds ] [ --font name ] [ --foreground | --fg color ] [ -f | --format FormatType ] [ --reportencvers 1,2,3,... ] [ --reportfilter expressions ] [ --geometry geometry ] [ --gui yes | no ] [ --hints yes | no ] [ -h | --host hostname | IP ] [--iconic ] [ -i | --infile file ] [ -P | --licports start-end,start-end,... ] [ --logfile file ] [--members ] [ -C | --msgclass msgclass1,msgclass2,... ] [ -L | --msglevel msglevel1,msglevel2,... ] [ --name name ] [--nodemo ] [--noserial ] [ -W | --nw ] [ --offset amount ] [ -o | --output file ] [ -p | --password pwd ] [ --prefix dir ] [ --port port# ] [--refresh ] [ -s | --repsep string ] [ --sdl yes | no ] [ --siepath path ] [ --sighandler yes | no ] [ --show item1,item2,... ] [--siedirect ] [ --sps yes | no ] [ --spsignore name1,name2,... ] [ --spsmodules name1,name2,... ] [ +swfiles | --swfiles ] [ --swentrytype [pkg,product,category] ] [ --title string ] [ -t | --type type1,type2,... ] [ -U | --unknown ] [--unused ] [--useconfig ] [--useprom ] [ -u | --username username ] [ --widechar ] [ --xmlversion 1 | 2 ] [ --xrm X11resource ]

mcsysinfo -H | --help

mcsysinfo -l | --list class | format | msgclass | msglevel | show | type

mcsysinfo --license

mcsysinfo --licenselist

mcsysinfo --licensevalid file

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

mcsysinfo --spslist

mcsysinfo --driverlist

mcsysinfo --rtplatform

mcsysinfo --version

DESCRIPTION

MagniComp's SysInfo provides Unix/Linux System Administrators with extremely detailed, platform independent hardware, software, and OS configuration data for most Unix/Linux platforms. This document describes the SysInfo Command Line Interface (CLI). See mcsysinfo(1) for an overview of SysInfo and references to more documentation.

SysInfo provides information about either the local system (by default) or about a remote system if the --host system option is specified. If --host is not specified, the local system is scanned by directly calling the SysInfo Engine (SIE) which is a program installed as part of the SysInfo distribution. If the --host option is used, SysInfo will connect to the mcsysinfod(8) server agent on the specified Host to retrieve the requested information. The mcsysinfod(8) agent is not used (and therefor does not need to be enabled) to scan the local system.

By default SysInfo will start it's Graphical User Interface (GUI) if the $DISPLAY environment variable is set. If $DISPLAY is not set or the --nw option is specified, SysInfo will output to the command line. See mcsysinfogui(1) for details on GUI usage.

When command line output is used, SysInfo will by default display a high level summary of system data suitable for a "quick glance" at system configuration information. The --msglevel all --class all options may be used to enable the maximum amount of system information.

SysInfo classifies data into distinct data groups, each of which is known as a class. The scope of the information presented can by limited to specific SysInfo data classes using the

	--class Name

The default command line output format is suitable for most humans. If you want to quickly retrieve a few bits of information, try using the

	--msglevel terse --show variable
	set SystemModel=`sysinfo --msglevel terse --show model`

A program parsable XML output format is available by running:

	mcsysinfo --encode xml

A program parsable field deliminated output format is available by running:

	mcsysinfo --encode report

See mcsysinforeport(5) for a description of the output from this option.

A Perl API which provides an object tree of SysInfo data is also available (see mcsysinfoperl(3)). Please also see mcsysinfoc(3) for a description of the C API.

INITIALIZATION

Upon startup, SysInfo performs two searches. The first search is for a SysInfo RC file which supports a subset of Command Line options affecting runtime. The second search is for database configuration files which contain data used to interpret class data.

INITIALIZATION OF MCSYSINFORC

SysInfo supports an conventional runtime configuration (RC) file which allows a subset of command line options to be read from a file. Runtime configuration is performed in the following order:

  1. Read system RC file /etc/mcsysinfo/mcsysinfo.cfg

  2. Read installation RC file /opt/sysinfo/config/mcsysinfo.cfg

  3. Read user RC file specified by $SYSINFO_RC if set or else $HOME/.mcsysinfo/mcsysinfo.cfg

  4. Environment variables

  5. Command line options

See mcsysinfocfg(5) for more details.

INITIALIZATION OF DATABASE CONFIGURATION

SysInfo looks under the prefixlib/sid directory for suitable SysInfo Database (SID) files to load. Searching stops when the first SID file is found. The following search order is used:

  1. prefix/lib/sid/${OSname}_${OSver}.sid

  2. prefix/lib/sid/${OSname}_${OSmajver}.sid

  3. prefix/lib/sid/${OSname}.sid

  4. prefix/lib/sid/Default.sid

where prefix is /opt/sysinfo by default, but can be overridden with the --prefix option. See mcsysinfosid(5) for more information.

OPTIONS

The following options are valid for all invocations except as noted:

--avoidblink

Avoid hardware probes of monitors known to cause the monitor to blink.

--cfdir dir

This option is deprecated by the --configdir option.

--cffile FileName

This option is deprecated by the --configfile option.

--cache yes|no

Enable (yes) or disable (no) caching of class and license data. The default is to cache data.

--cachedir dir

Use dir as the top level cache directory. The default is /tmp.

--cacheexpire seconds

Expire cached data after seconds.

--configdir dir

Specify the name of the directory to use to find sysinfo.cf format configuration files.

--configfile FileName

Specify the name of a sysinfo.cf format configuration file to use. If the specified FileName cannot be opened for any reason, an error message is displayed and the program will exit.

--copyright

Print the software's copyright message and exit.

--class Class1,Class2,...

Limit information to a specific class (or comma seperated list of classes) of information. The default is to show General and Hardware classes. For a list of valid class names, run

	sysinfo --list class
--driverlist

Discover and list information about SysInfo drivers, then exit.

--danger

Normally SysInfo checks upon startup to make sure it's running on the same platform (OS Name, OS Version, CPU Type, and CPU Architecture (on some platforms)) as it was built on. This option overrides/disables this check. Using this option usually means that the information provided may be false or incomplete.

--encode EncodeType

Encode output in the specified manner where EncodeType is one of the following:

html

Encode as HTML.

text

Encode as ASCII text. This is the default.

report

Encode as SysInfo Report format field deliminated output. Output is in a format suitable for parsing by a program. Entries are printed one per line with fields separated by the | (vertical pipe) string by default. The --repsep option can be used to change this value.

xml

Encode in XML parsable output.

--format FormatType

Specify the format layout and display of requested data. Valid FormatType values are:

columns

Data is formated in columns. The output is suited for viewing in terminal windows set to a minimum width of 80 characters. Output will be adjusted if the terminal width is greater than 80 characters. Terminal width is determined by first looking for the environment variable COLUMNS. If not set, the output stream associated with standard output is checked for terminal width.

pretty

(DEPRECATED) Same as tree

report

(DEPRECATED)The use of --format report has been deprecated by --encode report.

tree

Output in hierarchical tree format suitable for human viewing. This is the default.

--reportencvers 1,2,3,...

Specify the list of format report encoding versions to print when using the --encode report option. The default is to output all encoding formats which provides maximum backwards compatibility at the expense of some duplicate data appearing in multiple locations.

--reportfilter expressions

Specify one or more filters which affect output when using the --encode report option. See REPORT FILTER for details on this option.

--gui yes|no

If --gui yes is specified, the Graphical User Interface will be run if the user's environment is configured with $DISPLAY and the local system supports it. Setting this option to no disables the GUI and forces the Command Line Interface (CLI) to be used.

--hints yes|no

If --hints yes is specified (the default) then hints about how to use the CLI will be displayed to standard error (stderr). Such hints will be prefixed with HINT. If --hints no is specified, no hints will be displayed.

-H|--help

Print help (usage) information and then exit.

-h|--host host

Retrieve information from host which may be either a hostname or IP address. The host must be running the mcsysinfod(8) SysInfo server agent. If this option is not specified, SysInfo scans the local system directly without talking to mcsysinfod(8).

-i|--infile file

Use file as the source of data to display instead of probing system for data. The file should contain data in mcsysinforeport(5) format. This option is only used when using the SysInfo GUI.

-P|--licports start-end,start-end,...

Specify the range of ports to scan for license servers where start is the port number to start with and end is a port number to end at. i.e. 7100-7200,9000-9200 specifies to scan ports 7100 to 7200 and 9000 to 9200. Applies to class license only. Default is 7100-7999.

--license

Print information about SysInfo product license(s) applicable to the local system and then exit.

--licenselist

Print information about SysInfo product licenses regardless of whether they are for the local system or not and then exit.

--licensevalid file

If file contains a valid product license print a message stating such and exit status 0. If it does not contain a valid license, print a message stating such and exit status 1.

--logfile file

Log all messages (informational, warnings, errors, debugging, etc) to file. If file exists, it is appended to. The default is to display these messages to standard output and/or standard error.

--members

List the keyword names and descriptions by class which are accepted by the --show option. This option is similiar to --list but it only displays info about --show options. Output can be limited to specific classes via the --class option. The --msglevel terse option will limit output to just the keywords and their description.

-C|--msgclass msgclass1,msgclass2,...

Specify which class of messages should be output. The default value for --msgclass is info,warn,cerror. The list of possible msgclass values are:

all

All of the below classes except for debug.

info

Display normal informational messages. All the actual useful bits of information about your system are output as msgclass info.

warn

Display warning messages about any condition that occurred while SysInfo is running which may affect what information is found. Normally these are problems such as SysInfo not running with the right permissions or certain things are missing from the system which are not required, but may result in incomplete information.

gerror

Display general error messages. These are non-fatal errors which are usually quite normal. For instance, a certain type of query (such as a ioctl() call) of a device fails because it's not supported on that particular model.

cerror

Display critical errors which prevent SysInfo from continuing further.

debug

Print debugging information. Lots of information you normally don't want to see, but which is very valuable for debugging problems with SysInfo.

-L|--msglevel msglevel1,msglevel2,...

Set the level of messages that are shown. msglevels is a comma separated list of values used to determine what levels of message will be displayed. The list of possible msglevel values are:

all

All possible levels of information. This option provides the maximum amount of detailed information about a system.

terse

Display output in terse format. The affect of this option is dependent on the Class of information being displayed. It usually results in the labels for each output value being suppressed. This is useful if you are running SysInfo from a script to obtain a few specific values (e.g. System Model, CPU Architecture, etc).

brief

More than terse but less than all.

general

General level of information useful for a quick look at overall system configuration. This is the default.

descriptions

Like general but with more descriptive information.

config

Similar to general and descriptions

--nodemo

Do not use any type of demo license. Normally SysInfo will automatically generate a demo license for each type of license it uses. When this option is specified, then no demo licenses will be automatically generated. You might consider also specifying --cache no in conjunction with this option to avoid looking in the license cache.

--noserial

Disable checking for duplicate devices using serial numbers. Normally SysInfo will check each device's serial number (if known) against the serial number of each previously detected device of the same class and type. If the serial numbers match, the new device is ignored. This check prevents devices which are dual-ported, such as storage arrays, from being shown more than once.

--nw

No windows. Force SysInfo to use it's command line interface (CLI) even if the environment is capable of running the SysInfo GUI. This option is deprecated by the --gui option.

-l|--list [ class|format|msgclass|msglevel|show|type ]

List the possible values that may be used with an option. With no arguments are specified, a list is valid arguments is displayed. When an argument is supplied, the information specific to that argument is displayed.

--offset amount

Set the number of spaces to offset (indent) when printing device information.

-o|--output file

Write content output to file. Errors and warnings are output to standard error. The default is to output content to standard output.

-p|--password pwd

Use pwd as the plain text password when user authentication is required by mcsysinfod(8). This option is only needed when used with --host and --username options.

--prefix dir

Use dir as the top level directory where SysInfo is installed. The default value is /opt/sysinfo.

--port port#

Use port# as the port that mcsysinfod(8) is listening on. This option is only applicable with the --host option.

--refresh

Refresh cached data. Data is read directly from the requested sources instead of from the cache. As the data is read, the cache is updated.

-s|--repsep string

Change the field separator string used with --encode report to be string. The literal string %p may be used to specify the | (vertical pipe) character. The default is SPACE|SPACE (SPACE + vertical pipe + SPACE).

--sdl yes|no

If --sdl yes is specified (the default) then run all Software Discovery Language (SDL) scripts to discovery Software class data. SDL discovery invokes very product specific methods for determining the presense of software not registered with the operating system software registry/database. See the User Guide for more details on SDL. If --sps no is specified, no SDL discovery will be performed.

--siepath path

Use Path as the pathname to the SysInfo Engine (SIE).

--sighandler yes|no

Use the builtin signal handler to catch and report signals such as kill/quit and faults.

--siedirect

Invoke the SysInfo Engine (SIE) directly with all other applicable command line arguments.

--siteinfo-var var

Set SiteInfo variable var. Must be used in conjunction with --siteinfo-value. See mcsysinfositeinfo(5) for more details.

--siteinfo-desc desc

Set description of SiteInfo variable specified with --siteinfo-var to be desc.

--siteinfo-value value

Set value of SiteInfo variable specified by --siteinfo-var to be value.

--siteinfo-scope scope

Set the scope of what SiteInfo file to update to be scope. Valid values are:

userRead/write $HOME/.mcsysinfo/mcsysinfo.cfg
systemRead/write /etc/mcsysinfo/mcsysinfo.cfg
systemRead/write /opt/sysinfo/config/mcsysinfo.cfg
--show item1,item2,...

Show information only about each comma separated item. Run sysinfo --list show for a list of valid item arguments. If the --class option is not specified, then the General class is assumed.

--sps yes|no

If --sps yes is specified (the default) then perform Software Product Specific (SPS) discovery while obtaining Software class data. SPS discovery invokes very product specific methods for determining the presense of software not registered with the operating system software registry/database. A list of supported SPS modules can be obtained by running mcsysinfo --spslist. If --sps no is specified, no SPS discovery will be performed and only the native operating system provided software registry/database will be scanned.

--spsignore name1,name2,...

Ignore specific Software Product Specific (SPS) modules when performing SPS discovery as part of Software class data scans. A list of supported SPS module names can be obtained by running mcsysinfo --spslist.

--spslist

List all supported Software Product Specific (SPS) modules. This option only lists SPS modules and is not a list all the software products that are supported. Most software products are obtained from the native operating system software registry/database.

--spsmodules name1,name2,...

List of specific Software Product Specific (SPS) modules to call when performing SPS discovery as part of Software class data scans. A list of supported SPS module names can be obtained by running mcsysinfo --spslist. By default, all SPS modules are used.

+|-swfiles

When \+swfiles is specified and software class information is being displayed, a list of files and file data is displayed for all files belonging to each package. The default is (--swfiles) not to display file data.

--swentrytype pkg,product,category

Limit software entries which are reported to one or more of these types.

-t|--type item1,item2,...

Limit information to a specific type of item as specified by item1,item2,... Run sysinfo --list type for a list of valid item arguments.

-U|--unknown

Enable (+unknown) or disable (--unknown) showing devices that appear to be present on the system, but are not "known" to SysInfo. This option is disabled by default.

--unused

Enable (+unused) or disable (--unused) showing partitions that do not appear to be in use. The default is --unused.

--useconfig

Enable (+useconfig) or disable (--useconfig) use of configuration files. This option is useful if you want to run SysInfo without having the configuration files installed. Note that only certain types of information - such as some of the General values - will be available without use of configuration files. The default is +useconfig.

-u|--username username

Use username as the username to authenticate with when authentication is required by mcsysinfod(8). This option is only needed when used with --host and --password options.

--useprom

Enable (+useprom) or disable (--useprom) using values obtained from the system PROM instead of interpreting values obtained directly from the kernel. Certain values are normally obtained by looking up a variable in the kernel and checking the result against a table of values compiled into SysInfo. By enabling this option, SysInfo will attempt to obtain certain values from the system PROM. This support is currently limited to the System Model value. Support is also limited to those machines which support such a system PROM.

--version

Show version information for SysInfo and then exit.

--widechar

Output wide, I18N compliant character encodings. This option should only be used in conjunction with reading --encode report data.

GUI OPTIONS

The following options apply only when the SysInfo GUI is invoked:

--background|--bg color

Set the window background to color where color is a system defined name such as orange or a numeric representation as supported by the X(1) RGB specification.

--display name

Name of display to output to. Default is current display.

--font name

Set default font for text to be name. Default is arial.

--foreground|--fg color

Similar to --background but sets the window foreground color instead of the background color.

--geometry geometry

Specifies an X(1) geometry defining the size and/or location of the window. The geometry is of form Hx[XY] (i.e. 400x600+20+25 which creates a 400 x 600 window at location 20x25) where:

H

Height in pixels.

W

Width in pixels.

X

The X (horizontal) offset in pixels preceded by a + to indicate positive offset or a - to indicate negative offset.

Y

Same as with except this value indicates Y (vertical) offset.

--iconic

Start the application iconified.

--name name

Specify the name of the application used for option database lookup. The default is sysinfo.

--title string

Specify the window title to be string.

--xmlversion 1 | 2

Specify the version (format) of XML output by giving the version number.

--xrm resource

Specify the X11 resource pattern as resource.

ENVIRONMENT

The following environment variables are used:

SYSINFO_CACHE_DIR

The name of the directory to read/write cache files. The default is /tmp.

SYSINFO_FLEXLM_FILE

If set, SysInfo will attempt to read the flexlm license.dat file specified by this variable instead of performing a system port scan.

SYSINFO_RC

The file name of a mcsysinfocfg(5) file to read in place of $HOME/.mcsysinfo/mcsysinfo.cfg

SYSINFO_USERNAME

The username to use when contacting a SysInfo server. The ---username option overrides this value if present.

SYSINFO_PASSWORD

The password to use when contacting a SysInfo server. The ---password option overrides this value if present.

SYSINFO_PORT

The port number that the mcsysinfod(8) server is listening on for connections.

REPORT FILTER

When the --encode report output is enabled a filter can be specified to modify the output using the --reportfilter expressions option. The expressions argument consists of one or more expressions. Each expression is specified inside of square brackets ([]) and each expression is separated by a comma (,). If only one expression is given, then square brackets are optional.

The possible expression syntax:

--reportfilter expression
--reportfilter [expression]
--reportfilter [expression],[expression],...

Each expression consists of a named Operation followed by the criteria required to match to activate the Operation. The syntax of each expression is:

Operation{MatchType=arg0,arg1,...}

The following Operation values are supported:

ignore

Any data which matches the given criteria will not be output.

The following MatchType values are supported:

Class

The given arguments must be a valid SysInfo data Class name. e.g. "General" or "Device".

InfoType

Report Information Type which is typically the second field reported. Common examples are "data" and "desc".

Report Filter Examples

This example will prevent all InfoType values of "data" from being reported for all classes:

--reportfilter 'ignore{infotype=data}'

This example will prevent all InfoType values of "data" and "desc" from being reported for all classes:

--reportfilter 'ignore{infotype=data,desc}'

This example has the same effect as the previous example:

--reportfilter '[ignore{infotype=data}],[ignore{infotype=desc}]'

This example will prevent all InfoType values of "data" and "desc" from being reported only for class "device":

--reportfilter 'ignore{infotype=data,desc&class=device}'

EXAMPLES

The following command displays the maximum amount of information about a system:

sysinfo --msglevel all --class all

This command shows the maximum amount of information about a system called maximus which has the mcsysinfod(8) agent enabled:

sysinfo --msglevel all --class all --host maximus

The following command formats data as a hierarchical tree, encodes the output as HTML, and places it in a file called result.html:

sysinfo --format tree --encode html --output result.html

This command does the same as the previous example, but provides much more detailed information:

sysinfo --format tree --encode html --output result.html --msglevel all

The following command formats data in columns and rows and encodes the output as text (the default):

sysinfo --format columns

The following command formats all classes and levels of data in columns and rows, encodes the output as HTML, and writes the results to a file called result.html:

sysinfo --class all --msglevel all --format columns --encode html --output result.html

This command is very useful when debugging SysInfo itself:

sysinfo --debug

The following example outputs just the System Model:

sysinfo --msglevel terse --show model

This command will limit the output to just information about hardware variables:

sysinfo --class hardware

The following command provides the maximum amount of data in a format usable by an XML parser:

sysinfo --class all --encode xml

The following command provides the maximum amount of data in a software parsable format:

sysinfo --class all --encode report -repsep '|'

This command sets the SiteInfo variable Location and it's associated data in the /etc/mcsysinfo/siteinfo file:

sysinfo --siteinfo-var Location --siteinfo-desc 'System Location' --siteinfo-value 'SJC1, room 101' --siteinfo-scope system

CACHING

SysInfo caches each class of requested data in seperate files under /tmp/mcsysinfoui.cache.UID as the data is read. The cached data is used on future requests. The cache data expires 5 minutes after the last update. The --refresh option can be used to refresh the data immediately.

AUTHOR

MagniComp http://www.MagniComp.com

URL

http://www.magnicomp.com/sysinfo

ENVIRONMENT

MCSYSINFO_HOMETop level directory specifying where SysInfo is installed.

FILES

/opt/sysinfo/configDirectory of config files
$HOME/.mcsysinfo/mcsysinfo.cfgUser runtime configuration file
/etc/mcsysinfo/mcsysinfo.cfgSystem runtime configuration file
/etc/sysinfo.cfMaster configuration file
/etc/sysmodelExplicitly set the CPU model name
/tmp/mcsysinfoui.cache.UIDData cache directory

SEE ALSO

mcsysinfo(1), mcsysinfogui(1), mcsysinforeport(1), mcsysinfoc(3), mcsysinfoperl(3), mcsysinfocfg(5), mcsysinfosid(5), mcsysinfositeinfo(5), mcsysinfod(8), gethostid(2), gethostname(2), gethostbyname(3)

DIAGNOSTICS

%x: Unknown CPU type.

The CPU model for the current host could not be determined.

(unknown)

Information could not be determined for this item.

BUGS

Not all operating systems support interfaces to various pieces of information that MagniComp SysInfo supports.

Some devices, mostly devices that use removable media such as tape drives and floppy disks, are only indicated (shown) as present if media is loaded in the device and it's on-line. This occurs because the OS does not provide a software interface to query the device when media is not loaded.

SunOS allows only one process at a time to have /dev/openprom open. This may result in certain pieces of information not always showing up consistently. When in doubt, enable debugging (--msgclass debug).

Under SunOS 5.4 the ROM Version field is blank. This is due to a change made by Sun in libkvm. Sun patch 102555-01 is suppose to fix this problem. MagniComp Sysinfo uses a new OBP interface in SunOS 5.5 that by-passes this problem.

Under SunOS 4.x the Serial Number field is left blank since the kernel usually returns incorrect information.

Under SunOS 5.x the Serial Number field will show the serial number as obtained from the system's IDPROM. This serial number has no correspondence with the system serial number that appears on the back of your machine.

Under SunOS there is no way to tell the difference between an MC68020 (like the 3/60) and MC68030 (like the 3/80) based machine.