sysinfo - MagniComp(tm) SysInfo command displays system
information in a platform neutral manner
SYNOPSIS
sysinfo [ -configdir DirName ] [ -configfile FileName ] [
-class item1,item2,... ] [ -danger ] [ -format FormatType
] [ -msgclass msgclass1,msgclass2,... ] [ -msglevel
msglevel1,msglevel2,... ] [ -offset amount ] [ -repsep
string ] [ -show item1,item2,... ] [ +|-swfiles ] [ -type
type1,type2,... ] [ +|-unknown ] [ +|-unused ] [ +|-usec-
onfig ] [ +|-useprom ]
sysinfo -list [ class|format|msgclass|msglevel|show|type ]
sysinfo -version
DESCRIPTION
The MagniComp(tm) SysInfo program displays various types
of information about the local host's hardware and operat-
ing system (OS) software. It is intended to provide
information in both human readable and program parsable
formats. System Administrators can use MagniComp(tm) Sys-
Info to obtain hardware asset information and OS configu-
ration information. Programs which use MagniComp(tm) Sys-
Info can obtain this information in a platform independent
manner.
The amount of information displayed varies by operating
system. Here are some of the types of information that
may be provided:
- Host name
- Host name aliases
- Host network addresses
- Host ID
- System serial number
- Manufacturer of the system's hardware
- System model name
- CPU type
- Application architecture
- Kernel architecture
- Amount of main memory
- Operating system name
- Operating system version
- Kernel version
- Information about devices
- Kernel parameters
- System configuration parameters
- Installed software packages
By default, MagniComp(tm) SysInfo will display a "medium"
level of output suitable for a quick glance at system con-
figuration information. The -msglevel all option provides
classes using the ``-class Name'' option. Further selec-
tion can by made specifying the class of information and a
specific item using ``-class Name -show Item''
Upon startup, MagniComp(tm) SysInfo searches for a config-
uration file to parse. If the -configfile option is
given, the specified configuration file will be used.
Otherwise MagniComp(tm) SysInfo will search for a suitable
configuration file. Searching stops when the first con-
figuration file is found. The following search order is
used:
/etc/sysinfo.cf
ConfDir/${OSname}_${OSver}.cf
ConfDir/${OSname}_${OSmajver}.cf
ConfDir/${OSname}.cf
ConfDir/Default.cf
ConfDir is /opt/sysinfo/config by default, but can be
overridden with the -configdir option or by specifying
ConfDir Dir
in the /etc/sysinfo.cf file. See sysinfo.cf(5) for more
information.
If the file /etc/sysmodel exists, the first line of the
file is read and used as the system model name.
OPTIONS
-cfdir DirName
This option is obsoleted by the -configdir option.
-cffile FileName
This option is obsoleted by the -configfile option.
-configdir DirName
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 configura-
tion file to use. If the specified FileName cannot
be opened for any reason, an error message is dis-
played and the program will exit.
-class Name1,Name2,...
Limit information to a specific class or classes of
information. The default class is General.
-danger
Normally MagniComp(tm) SysInfo checks upon startup
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.
-format FormatType
Display output in FormatType format. Valid Format-
Type values are:
pretty Output is suitible for human viewing. This
is the default.
report Output is in a format suitable for parsing
by a program. Entries are printed one per
line with fields seperated by ``|'' (verti-
cal pipe) by default. The -repsep option
can be used to change this value. NOTE:
Output format is currently not finalized and
may change in a future release.
-msgclass msgclass1,msgclass2,...
Specify which class of messages should be output.
The default value for -msgclass is info,warn,cer-
ror. 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 occured while MagniComp(tm) SysInfo is
running which may affect what information is
found. Normally these are problems such as
MagniComp(tm) 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
particuliar model.
cerror Display critical errors which prevent Magni-
Comp(tm) SysInfo from continuing further.
debug Print debugging information. Lots of infor-
lems with MagniComp(tm) SysInfo.
-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 dis-
played. 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 MagniComp(tm) 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 Similiar to general and descriptions
-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.
-repsep string
Change the field seperator string used with -format
report to be string. The default is ``|'' (verti-
cal pipe).
-show item1,item2,...
Show information only about each comma separated
fied, then the General class is assumed.
+|-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.
-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.
+|-unknown
Enable (+unknown) or disable (-unknown) showing
devices that appear to be present on the system,
but are not "known" to MagniComp(tm) SysInfo. This
option is disabled by default.
+|-unused
Enable (+unused) or disable (-unused) showing par-
titions 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 MagniComp(tm) 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.
+|-useprom
Enable (+useprom) or disable (-useprom) using val-
ues obtained from the system PROM instead of
intepreting values obtained directly from the ker-
nel. Certain values are normally obtained by look-
ing up a variable in the kernel and checking the
result against a table of values compiled into Mag-
niComp(tm) SysInfo. By enabling this option, Mag-
niComp(tm) SysInfo will attempt to obtain certain
values from the system PROM. This support is cur-
rently limited to the System Model value. Support
is also limited to those machines which support
such a system PROM.
-version
Show version information for MagniComp(tm) SysInfo.
EXAMPLES
sysinfo -msglevel all
A very useful command to use when DEBUGGING MagniComp(tm)
SysInfo is:
sysinfo -msglevel all -msgclass all,debug
The following example outputs just the System Model:
sysinfo -msglevel terse -show model
This command will limit the output to just information
about Kernel variables:
sysinfo -class kernel
AUTHOR
Michael A. Cooper
MagniComp
www.MagniComp.com
HOME PAGE
http://www.magnicomp.com/sysinfo
FILES
/opt/sysinfo/config - Directory of config files
/etc/sysinfo.cf - Master configuration file
/etc/sysmodel - Explicitly set the CPU model name
SEE ALSO
mcsysinfo(3), sysinfo.cf(5), 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(tm) 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/open-
prom open. This may result in certain pieces of informa-
tion not always showing up consistantly. When in doubt,
due to a change made by Sun in libkvm. Sun patch
102555-01 is suppose to fix this problem. MagniComp(tm)
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.