DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

hwconfig(C)


hwconfig -- read hardware configuration information

Syntax

/etc/hwconfig [ -nlhcq ] [ -f file ] [ param ] [ param=val ] ...

Description

The hwconfig command returns the configuration information contained in the configuration string device /dev/string/cfg or in the file specified on the command line with the -f option. Using combinations of the remaining options, the user can view as much information as needed from the configuration string. The display format is as follows:
   device_name base+finish vec dma rest
where:

device_name
is the name of the device driver.

base+finish
are the starting and the finishing addresses of the driver working space.

vec
is the interrupt vector number in decimal.

dma
is the DMA channel number.

rest
is a possibly empty list of parameter=value pairs.

The default hwconfig display looks similar to this:

   name=fpu vec=13 dma=- type=80387
   name=serial base=0x3F8 offset=0x7 vec=4 dma=- unit=0 type=Standard nports=1
   name=floppy base=0x3F2 offset=0x5 vec=6 dma=2 unit=0 type=135ds18
   name=console vec=- dma=- unit=vga type=0 12 screens=68k
   name=adapter base=0x2000 offset=0xCDC vec=11 dma=- type=eiad ha=0 id=7 fts=std
   name=eisarom vec=- dma=- eisa (1.3.0)
   name=sme base=0x300 offset=0x1F vec=10 dma=- type=8216 addr=00 00 c0 a2 d5 6e
   name=tape vec=- dma=- type=S ha=0 id=2 lun=0 bus=0 ht=eiad
   name=disk vec=- dma=- type=S ha=0 id=0 lun=0 bus=0 ht=eiad
   name=Sdsk vec=- dma=- cyls=496 hds=64 secs=32 fts=sdb
The configuration string device /dev/string/cfg is written to by the boot program. Thus, the hwconfig report is up to date when the system is rebooted into either system maintenance or multiuser mode.

Options


-n
The device name is always printed out.

-l
The long format of the device configuration content, with a label for each entry, is used. This is the default.

-h
Use the short format, with headers instead of labels.

-c
Check for device conflicts, including I/O addresses, DMA channels, and interrupt vectors which are being used by more than one driver.

-q
Check quietly for device conflicts; display nothing. When both -c and -q are given, display conflicts only.

-f file
Use file as the input file instead of the default /dev/string/cfg.

param
Show all values of param throughout the configuration string device. param can be any valid system parameter. The current valid system parameters are: name, base, offset, vec, dma, unit, type, nports, hds, cyls, secs, and drvr.

param=val
Show only information from the line where param equals the value val.

The -n, -l and -h options are in increasing overriding power. That is, if -n and -l are both specified, -l is used. param on its own indicates a query for its corresponding value(s), whereas param=value indicates a matching <token,val> pair in the input file. -l is used by default if there are no queries and no explicit option.

Command-line queries, that is, those with parameters only, are always displayed in long format.

Exit values

hwconfig returns 0 for success, 1 for conflicts detected, 2 for invalid arguments.

Examples


hwconfig -f /usr/adm/hwconfig
The entire contents of the file /usr/adm/hwconfig are printed.

hwconfig base
All the values of the base parameter found in /dev/string/cfg are printed.

hwconfig -f conf base=300 vec=19
All entries in conf that match the base and vec values given are printed.

hwconfig name=floppy base
The name and value of base in /dev/string/cfg for the drivers with the name floppy are printed for all entries.

hwconfig -n base dma
The device name associated with the base and dma is displayed. For example,
name=scsi base=0x234 dma=4

hwconfig base dma vec=4
The base and dma values of all /dev/string/cfg entries with matching vec=4 are printed.

hwconfig -l base dma vec=4
Similar to hwconfig -l vec=4 except that base and dma values are printed first.

hwconfig -h
Everything is printed in the long format, with a header similar to the one shown at boot time. All queries are ignore, but matching is performed on token values. For example,
hwconfig -h vec=4 dma=1
prints in long format, with headers, all those entries with vec=4 and dma=1

hwconfig -ch
displays /dev/string/cfg in an easy-to-read tabular format and checks for device conflicts.

Limitations

Information about conflicts is purely advisory because hwconfig can only report about hardware devices which have been correctly recognized by a kernel driver.

/dev/string/cfg is normally readable by all users; however, the system administrator may change its permissions.

Files


/etc/hwconfig
program file

/usr/lib/hwconfig.awk
awk program which hwconfig uses

/dev/string/cfg
configuration string device

See also

boot(HW)

Standards conformance

hwconfig is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003