Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hwstat(1M) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mem(7)

nlist(3C)

/usr/sbin/enconfig(1m)

/usr/ucb/pstat(1m)

hwstat(1M)

NAME

/usr/sbin/hwstat - hardware configuration report generator

SYNOPSIS

hwstat [-hlr | -i] [-c name] [-n name] [-b] [-t flags] [-u]

DESCRIPTION

hwstat provides an interface to the kernel data structures within /dev/kmem that are required by the system-level test (CXAT and CXIO) and fault monitoring (CXSM) diagnostic software.  It may also be useful to a system administrator or customer application software.  hwstat reads from /dev/kmem:

•System hardware configuration (processors, I/O devices, memory, etc)

•Ethernet and FDDI Local Area Network (LAN) statistics

•Kernel internal resource availability

hwstat provides three (3) options for selecting the desired output.  The -h, -l, and -r options provide different system resource status.  They may be used separately or together.  hwstat performs the selected option(s) and then exits.  If invoked with none of these three (3) options, hwstat defaults to the action taken by the -h option. 

OPTIONS

-hprints a summary of the system hardware configuration for the current boot.  hwstat scans the kernel core image and extracts configuration information for the current system boot.  The information includes the boot time, the boot device, CPUs, memory, and I/O devices. 

-lhwstat prints a summary of Ethernet and FDDI LAN statistics.  The data is collected from the status structure within the individual LAN controller structures.  For each supported LAN interface, hwstat prints the number of good transmits and receives, the number of hard and soft errors that have occurred on transmits and receives, and the number of collisions detected.  Note: enconfig(1m) should be used to obtain a more detailed report for each LAN interface. 

-rhwstat prints the number of used slots in several system tables.  This option is useful for checking to see how full system tables have become if the system is under heavy load.  Usage of files, inodes, regions, processes, swap pages and physical [resident] memory pages is given.  For the inode table, hwstat prints the number of inode entries which would be used if the Directory Name Lookup Cache were flushed.  The -r option is very similar to the pstat(1m) -T option. 

-n name
hwstat uses the kernel specified by name to get the symbol name list.  The default is /unix. 

-c name
hwstat uses the core image specified by name.  The default is /dev/kmem. 

-iputs hwstat in an interactive command mode.  During initialization, the reading of the /unix name list may take several seconds; using hwstat in this mode is an advantage when a quicker return from periodic queries is desired.  After initializing, hwstat prompts for command input using the "greater than" character (’>’).  The single character commands available in this mode are as follows:

hProduces the same information as the -h option. 

lProduces the same information as the -l option. 

rProduces the same information as the -r option. 

tReturn the hexadecimal value of current debug/trace mask (see the description of the -t option, below, for more information). 

qQuit - exit hwstat. 

-btells hwstat to output the information in a binary format.  This option is used by the system test and fault monitoring software to obtain system configuration and resource availability data directly.  (Note: hwstat will not send binary output if stdout is a tty device because the output is unsuitable for viewing directly).  All debug trace information is sent to stderr, as is the prompt character in interactive command mode.  The formats of the data for each of the three options is defined by the structures in /usr/include/hwstat.h. The data is output, in the order shown:

-h option or h command

time_t boottimetime (GMT in secs from 00:00, 1/1/70) of boot. 

bootdev_type bootdevboot device data structure. 

int ncpusnumber of processors on the system. 

int cpuid_maska mask of all physical CPU IDs on the system where a bit is set in the mask for each processor (1 << CPU ID). 

int nmemthe number of memorys configured. 

mem_type [nmem]
nmem mem_type structures, sorted in ascending order where sort key = m_type<<16 | m_num

int ndevthe number of devices configured at boot. 

dev_type [ndev]ndev dev_type structures, sorted in ascending order where sort key = d_type<<16 | d_num. 

-l option or l command
A lanstat_type structure is output. 

-r option or r command
An avail_resource_type structure is output. 

-t flags
is used to select varieties of trace output by changing flags.  The default value for trace flags is "-t SUM,LAN,RESRC" in non-binary output mode (-b option not specified).  In binary output mode (-b option specified), the default value for the trace flag is 0 (i.e. no trace output).  The table below, produced by the "hwstat -t help" command, summarizes the trace option flags:


Use -t option with a hexadecimal bit mask or a
comma-separated list of trace option symbols:
Symbol          Hex Bit Mask    Description
======          ============    ===========================
BOOT            0x00000001      Boot time and boot device
CPU             0x00000002      CPU configuration
DEV             0x00000004      Device configuration
MEM             0x00000008      Memory configuration
SUM             0x0000000f      Configuration summary
LCFG            0x00000040      LAN configuration (internal debug)
LAN             0x00000080      LAN configuration/statistics
RESRC           0x00000100      System (kernel) resource availability
NLIST           0x10000000      Dump nlist(3) entries (internal debug)
LISTS           0x40000000      Internal list maintenance debug

-uprints a usage message:

usage: hwstat [option(s)]
options:

-hhardware configuration (boot,cpu,dev,mem)

-lethernet LAN statistics

-ravailable system resources. 

-c corecore file used instead of /dev/kmem

-n namesystem namelist taken from name instead of /unix

-iinteractive command mode

-bbinary data output (format in hwstat.h). 

-t flagsdebug trace (for help: hwstat -t help)

-uusage/help - print this message

CAVEATS

New or non-standard VME controllers may be reported as ’unknown devices.’

FILES

/unix
/dev/kmem
/usr/include/hwstat.h

SEE ALSO

mem(7)
nlist(3C)
/usr/sbin/enconfig(1m)
/usr/ucb/pstat(1m)

DIAGNOSTICS

Exit status is 0 if no errors occur.  On error, hwstat prints to stderr and exits with one of the following non-zero status:

Exit statusDescription

      1illegal usage

      2can’t get name list (e.g. from /unix)

      3can’t open corefile (e.g. /dev/kmem, /dev/mem)

      4name not found in name list

      5out of memory

     16failed core read of device configuration data

     17failed core read of memory configuration data

     19failed core read of a long word

     20failed core read of LAN ifnet data structure

     21failed core read of LAN ARPCOM structure

     22failed core read of LAN status structure

     32unrecognized command in interactive command mode

     33LAN statistics not in core file

     34socket(2) system call failed

     35LAN status ioctl(SIOCGSTAT) failed

CX/UX Administrator’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026