.\" .TH mcsysinfocli 1 "20 April 2003" .ds ]W www.MagniComp.com .SH NAME sysinfo \- MagniComp(TM) SysInfo(TM) Command Line Interface (CLI) .SH SYNOPSIS sysinfo [ .B \-\-background|--bg .I color ] [ .B \-\-cache .B YES|NO ] [ .B \-\-cachedir .I DirName ] [ .B \-\-configdir .I DirName ] [ .B \-\-configfile .I FileName ] [ .B \-\-copyright ] [ .B \-c|\-\-class .I item1,item2,... ] [ \-\-danger ] [ .B \-\-display .I name ] [ .B \-d|\-\-debug ] [ .B \-\-democheck ] [ .B \-e|\-\-encode .I EncodeType ] [ ] [ .B \-\-geometry .I geometry ] [ .B \-\-gui .B YES|NO ] [ .B \-\-hints .B YES|NO ] [ .B \-h|\-\-host .I hostname|IP ] [ .B \-\-iconic ] [ .B \-i|\-\-infile .I file ] [ .B \-P|\-\-licports .I start-end,start-end,... ] [ .B \-\-members ] [ .B \-C|\-\-msgclass .I msgclass1,msgclass2,... ] [ .B \-L|\-\-msglevel .I msglevel1,msglevel2,... ] [ .B \-\-name .I name ] [ .B \-\-noserial ] [ \-W|\-\-nw ] [ .B \-\-offset .I amount .B \-\-refresh ] [ .B \-s|\-\-repsep .I string ] [ .B \-\-siepath .I path ] [ .B \-\-show .I item1,item2,... ] [ .B \-\-siedirect ] [ .B +|\-\-swfiles ] [ .B \-\-title .I string ] [ .B \-t|\-\-type .I type1,type2,... ] [ .B \-U|\-\-unknown ] [ .B \-\-unused ] [ .B \-\-useconfig ] [ .B \-\-useprom ] [ .B \-u|\-\-username .I username ] [ .B \-\-xrm .I X11resource ] .br .sp sysinfo .B \-l|\-\-list .B \-\-rtplatform .br .sp sysinfo .B \-\-version .SH DESCRIPTION .B MagniComp(TM)'s .B SysInfo(TM) 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 .B SysInfo(TM) Command Line Interface (CLI). See .B mcsysinfo(1) for an overview of .B SysInfo(TM) and references to more documentation. .PP .B SysInfo(TM) provides information about either the local system (by default) or about a remote system if the .B \-\-host .I system option is specified. If .B \-\-host is not specified, the local system is scanned by directly calling the .B "SysInfo Engine (SIE)" which is a program installed as part of the .B SysInfo(TM) distribution. If the .B \-\-host option is used, .B SysInfo(TM) will connect to the .B mcsysinfod(8) server agent on the specified .I Host to retrieve the requested information. The .B mcsysinfod(8) agent is not used (and therefor does not need to be enabled) to scan the local system. .PP By default .B SysInfo(TM) .B mcsysinfogui(1) for details on GUI usage. .PP When command line output is used, .B SysInfo(TM) will display by default a "medium" level of output suitable for a quick glance at system configuration information. The .B "\-\-msglevel all \-\-class all" options may be used to enable the maximum amount of system information. .PP The scope of the information presented can by limited to specific .B SysInfo(TM) data .I classes using the ``\fB\-\-class \fIName\fR'' option. Further selection can by made specifying the class of information and a specific item using ``\fB\-\-class \fIName\fR \fB\-\-show \fIItem\fR'' .PP 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 .B "\-\-msglevel terse" and the .B \-\-show .I variable option. i.e. .RS .sp .nf \fBset SystemModel=`sysinfo \-\-msglevel terse \-\-show model\fR` .fi .sp .RE A program parsable output format is also available for more detailed needs by specifying: .RS .sp .nf .B "\-\-repsep '|' \-\-format report" .fi .sp .RE See .B mcsysinforeport(1) for a description of the output from this option. A Perl API which provides an object tree of .B SysInfo(TM) The second search is for database configuration files which contain data used to interpret class data. .SS INITIALIZATION OF MCSYSINFORC .B SysInfo(TM) 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: .RS 1) Read RC file \fB/etc/mcsysinfo.rc\fR .br 2) Read RC file specified by \fB$SYSINFO_RC\fR if set or else \fB$HOME/.mcsysinforc\fR .br 3) Environment variables .br 4) Command line options .RE Thus, command line options override identical RC or environmental setting. .PP See .B mcsysinforc(5) for more details. .SS INITIALIZATION OF DATABASE CONFIGURATION .B SysInfo(TM) searches for a database configuration file to parse. If the \fB\-\-configfile\fR option is given, the specified configuration file will be used. Otherwise .B SysInfo(TM) will search for a suitable configuration file. Searching stops when the first configuration file is found. The following search order is used: .br .sp .nf .RS \fB/etc/sysinfo.cf \fIConfDir\fB/${OSname}_${OSver}.cf \fIConfDir\fB/${OSname}_${OSmajver}.cf \fIConfDir\fB/${OSname}.cf \fIRunDir\fB/../config/${OSname}_${OSver}.cf \fIRunDir\fB/../config/${OSname}_${OSmajver}.cf \fIRunDir\fB/../config/${OSname}.cf \fIConfDir\fB/Default.cf\fR .RE .sp .fi where \fIConfDir \fBDir\fR .RE .sp .fi in the .B /etc/sysinfo.cf file. See .I mcsysinfocf(5) for more information. .PP If the file .I /etc/sysmodel exists, the first line of the file is read and used as the system model name. .SH OPTIONS The following options are valid for all invocations except as noted: .IP "\fB\-\-cfdir \fIDirName\fR" This option is deprecated by the .B \-\-configdir option. .IP "\fB\-\-cffile \fIFileName\fR" This option is deprecated by the .B \-\-configfile option. .IP "\fB\-\-cache YES|NO\fR" Enable (YES) or disable (NO) caching of class and license data. The default is to cache data. .IP "\fB\-\-cachedir \fIDirName\fR" Use .I DirName as the top level cache directory. The default is .B /tmp. .IP "\fB\-\-configdir \fIDirName\fR" Specify the name of the directory to use to find .B sysinfo.cf format configuration files. .IP "\fB\-\-configfile \fIFileName\fR" Specify the name of a .B sysinfo.cf format configuration file to use. If the specified .I FileName cannot be opened for any reason, an error message is displayed and the program will exit. .IP "\fB\-\-copyright\fR" Print the software's copyright message and exit. .IP "\fB\-\-class \fIName1,Name2,...\fR" Limit information to a specific class or classes of information. The default class is .RS .IP "\fBhtml\fR" Encode as HTML. .IP "\fBtext\fR" Encode as ASCII text. This is the default. .RE .IP "\fB\-\-expiretime \fIseconds\fR" Expire cached data after .I seconds. .IP "\fB\-\-format \fIFormatType\fR" Specify the format layout and display of requested data. Valid .I FormatType values are: .RS .IP "\fBcolumns\fR" 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 .B COLUMNS. If not set, the output stream associated with standard output is checked for terminal width. .IP "\fBpretty\fR" .B (DEPRECATED) Same as .B tree .IP "\fBreport\fR" Output is in a format suitable for parsing by a program. Entries are printed one per line with fields separated by ``|'' (vertical pipe) by default. The .B \-\-repsep option can be used to change this value. .IP "\fBtree\fR" Output in hierarchical tree format suitable for human viewing. This is the default. .RE .IP "\fB\-\-gui YES|NO\fR" If .B "\-\-gui YES" is specified, the Graphical User Interface will be run if the user's environment is configured with .B $DISPLAY and the local system supports it. Setting this option to .B NO disabled the GUI and forces the Command Line Interface (CLI) Retrieve information from .I host which may be either a hostname or IP address. The .I host must be running the .B mcsysinfod(8) .B SysInfo server agent. If this option is not specified, SysInfo scans the local system directly without talking to any .B mcsysinfod(8). .IP "\fB\-i|\-\-infile \fIfile\fR" Use .I file as the source of data to display instead of probing system for data. The .I file should contain data in .B "sysinfo -format report" format (see .B mcsysinforeport(1) ) This option is only used when using the .B SysInfo(TM) GUI. .IP "\fB\-P|\-\-licports \fIstart-end,start-end,...\fR" Specify the range of ports to scan for license servers where .I start is the port number to start with and .I end is a port number to end at. i.e. .B 7100-7200,9000-9200 specifies to scan ports 7100 to 7200 and 9000 to 9200. Applies to class .B license only. Default is .B 7100-7999. .IP "\fB\-\-members\fR" List the keyword names and descriptions by class which are accepted by the .B \-\-show option. This option is similiar to .B \-\-list but it only displays info about .B \-\-show options. Output can be limited to specific classes via the .B \-\-class option. All of the below classes except for .B debug. .IP "\fBinfo\fR" Display normal informational messages. All the actual useful bits of information about your system are output as msgclass \fBinfo\fB. .IP "\fBwarn\fR" Display warning messages about any condition that occurred while .B SysInfo(TM) is running which may affect what information is found. Normally these are problems such as .B SysInfo(TM) not running with the right permissions or certain things are missing from the system which are not required, but may result in incomplete information. .IP "\fBgerror\fR" 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. .IP "\fBcerror\fR" Display critical errors which prevent .B SysInfo(TM) from continuing further. .IP "\fBdebug\fR" Print debugging information. Lots of information you normally don't want to see, but which is very valuable for debugging problems with .B SysInfo(TM). .RE .IP "\fB\-L|\-\-msglevel \fImsglevel1,msglevel2,...\fR" Set the level of messages that are shown. .I msglevels is a comma separated list of values used to determine what levels of message will be displayed. The list of possible .I msglevel values are: .RS .IP "\fBall\fR" All possible levels of information. This option provides the maximum amount of detailed information about a system. .IP "\fBterse\fR" Display output in terse format. The affect of this option is dependent on the .I Class of information being displayed. It usually results in the labels for each output value being suppressed. This is useful if you are running .B SysInfo(TM) from a script to obtain a few specific values (e.g. System Model, CPU Architecture, etc). Similar to .B general and .B descriptions .RE .IP "\fB\-\-noserial\fR" Disable checking for duplicate devices using serial numbers. Normally .B 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. .IP "\fB\-\-nw\fR" No windows. Force .B SysInfo(TM) to use it's command line interface (CLI) even if the environment is capable of running the .B SysInfo(TM) GUI. This option is deprecated by the .B \-\-gui option. .IP "\fB\-l|\-\-list [ class|format|msgclass|msglevel|show|type ]\fR" 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. .IP "\fB\-\-offset \fIamount\fR" Set the number of spaces to offset (indent) when printing device information. .IP "\fB\-o|\-\-output \fIfile\fR" Write content output to .I file. Errors and warnings are output to standard error. The default is to output content to standard output. .IP "\fB\-p|\-\-password \fIpwd\fR" Use .I pwd as the plain text password when user authentication is required by .B mcsysinfod(8). This option is only needed when used with .B \-\-host 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. .IP "\fB\-s|\-\-repsep \fIstring\fR" Change the field separator string used with .B "\-\-format report" to be .I string. The default is ``|'' (vertical pipe). .IP "\fB\-\-siepath \fIpath\fR" Use .I Path as the pathname to the SysInfo Engine (SIE). .IP "\fB\-\-siedirect\fR" Invoke the .B "SysInfo Engine (SIE)" directly with all other applicable command line arguments. .IP "\fB\-\-show \fIitem1,item2,...\fR" Show information only about each comma separated item. Run .B "sysinfo \-\-list show" for a list of valid item arguments. If the .B \-\-class option is not specified, then the .B General class is assumed. .IP "\fB+|-swfiles\fP" When .B \+swfiles is specified and .B 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 .B (\-\-swfiles) not to display file data. .IP "\fB\-t|\-\-type \fIitem1,item2,...\fR" Limit information to a specific type of item as specified by .I item1,item2,... Run .B "sysinfo \-\-list type" for a list of valid item arguments. .IP "\fB\-U|\-\-unknown\fP" Enable (\fB+unknown\fP) or disable (\fB\-\-unknown\fP) showing devices that appear to be present on the system, but are not "known" to .B SysInfo(TM). This option is disabled by default. .IP "\fB\-\-unused\fP" Enable (\fB+unused\fP) or disable (\fB\-\-unused\fP) showing partitions Use .I username as the username to authenticate with when authentication is required by .B mcsysinfod(8). This option is only needed when used with .B \-\-host and .B \-\-password options. .IP "\fB\-\-useprom\fP" Enable (\fB+useprom\fP) or disable (\fB\-\-useprom\fP) 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 .B SysInfo(TM). By enabling this option, .B SysInfo(TM) will attempt to obtain certain values from the system PROM. This support is currently limited to the .B "System Model" value. Support is also limited to those machines which support such a system PROM. .IP "\fB\-\-version\fP" Show version information for .B SysInfo(TM) and then exit. .SH "GUI OPTIONS" The following options apply only when the .B SysInfo(TM) GUI is invoked: .IP "\fB\-\-background|--bg \fIcolor\fR" Set the window background to .I color where .I color is a system defined name such as .B orange or a numeric representation as supported by the .B X(1) RGB specification. .IP "\fB\-\-display \fIname\fR" Name of display to output to. Default is current display. .IP "\fB\-\-font \fIname\fR" Set default font for text to be .I name. Default is .B 400x600+20+25 which creates a 400 x 600 window at location 20x25) where: .RS .IP "\fBH\fR" Height in pixels. .IP "\fBW\fR" Width in pixels. .IP "\fBX\fR" The X (horizontal) offset in pixels preceded by a .B + to indicate positive offset or a .B - to indicate negative offset. .IP "\fBY\fR" Same as with .B except this value indicates Y (vertical) offset. .RE .IP "\fB\-\-iconic\fR" Start the application iconified. .IP "\fB\-\-name \fIname\fR" Specify the name of the application used for option database lookup. The default is .B sysinfo. .IP "\fB\-\-title \fIstring\fR" Specify the window title to be .I string. .IP "\fB\-\-xrm \fIresource\fR" Specify the X11 resource pattern as .I resource. .SH ENVIRONMENT The following environment variables are used: .IP \fBSYSINFO_CACHE_DIR\fP The name of the directory to read/write cache files. The default is .B /tmp. .IP \fBSYSINFO_FLEXLM_FILE\fP If set, .B SysInfo(TM) will attempt to read the flexlm .B license.dat file specified by this variable instead of performing a system port scan. .IP \fBSYSINFO_RC\fP The file name of a .B mcsysinforc(5) file to read in place of .B $HOME/.mcsysinforc .IP \fBSYSINFO_USERNAME\fP The username to use when contacting a .SH EXAMPLES .PP The following command displays the maximum amount of information about a system: .RS .nf .B sysinfo --msglevel all --class all .fi .RE .PP This command shows the maximum amount of information about a system called .B maximus which has the .B mcsysinfod(8) agent enabled: .RS .nf .B sysinfo --msglevel all --class all --host maximus .fi .RE .PP The following command formats data as a hierarchical tree, encodes the output as HTML, and places it in a file called .B result.html\fR: .RS .nf .B sysinfo --format tree --encode html --output result.html .fi .RE .PP This command does the same as the previous example, but provides much more detailed information: .RS .nf .B sysinfo --format tree --encode html --output result.html --msglevel all .fi .RE .PP The following command formats data in columns and rows and encodes the output as text (the default): .RS .nf .B sysinfo --format columns .fi .RE .PP The following command formats all classes and levels of .RS .nf .B sysinfo --debug .fi .RE .PP The following example outputs just the System Model: .RS .nf .B sysinfo --msglevel terse --show model .fi .RE .PP This command will limit the output to just information about .B Kernel variables: .RS .nf .B sysinfo --class kernel .fi .RE .PP The following command provides the maximum amount of data in a software parsable format: .RS .nf .B sysinfo --msglevel all --format report -repsep '|' .fi .RE .SH CACHING .B SysInfo(TM) caches each class of requested data in seperate files under \fB/tmp/mcsysinfoui.cache.\fIUID\fR as the data is read. The cached data is used on future requests. The cache data expires 5 minutes after the last update. The .B \-\-refresh option can be used to refresh the data immediately. .SH AUTHOR MagniComp .br http://www.MagniComp.com .SH "URL" .B http://www.magnicomp.com/sysinfo .SH FILES /opt/sysinfo/config \-\- Directory of config files .br $HOME/.mcsysinforc \-\- User runtime configuration file .br /etc/sysinfo.cf \-\- Master configuration file mcsysinfod(8), gethostid(2), gethostname(2), gethostbyname(3) .SH DIAGNOSTICS .IP "\fI%x: Unknown CPU type.\fP" The CPU model for the current host could not be determined. .IP "(unknown)" Information could not be determined for this item. .SH BUGS .PP Not all operating systems support interfaces to various pieces of information that .B MagniComp(TM) .B SysInfo(TM) supports. .PP 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. .PP .B SunOS allows only one process at a time to have .B /dev/openprom open. This may result in certain pieces of information not always showing up consistently. When in doubt, enable debugging (\fB\-\-msgclass debug\fP). .PP Under .B "SunOS 5.4" the .B "ROM Version" field is blank. This is due to a change made by Sun in .I libkvm. Sun patch .B 102555-01 is suppose to fix this problem. .B MagniComp(TM) .B Sysinfo(tm) uses a new OBP interface in .B "SunOS 5.5" that by-passes this problem. .PP Under .B "SunOS 4.x" the .B "Serial Number" field there is no way to tell the difference between an MC68020 (like the 3/60) and MC68030 (like the 3/80) based machine.