hwconfig(C) 19 June 1992 hwconfig(C) Name hwconfig - read the configuration information Syntax /etc/hwconfig [ -nlhcq ] [ -f filename ] [ param ] [ param=val ] ... Description The hwconfig command returns the configuration information contained in the file /usr/adm/hwconfig or in the file specified on the command line with the -f filename option. Using combinations of the remaining options, the user can view as much information as needed from the config- uration file. The display format is as follows: magic_char device_name base+finish vec dma rest where: magicchar is the character ``%'' devicename 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: fpu - 13 - type=80387 floppy 0x3F2-0x3F7 6 2 unit=0 type=96ds15 serial 0x2F8-0x2FF 3 - unit=1 type=Standard nports=1 parallel 0x378-0x37A 7 - unit=0 console - - - unit=ega type=0 disk 0x1F0-0x1F7 14 - type=W0 unit=0 cyls=791 hds=16 secs=48 Options -n The device name is always printed out. -l The long format of the device configuration content is used. -h Use the long format, with headers. -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. -ffile Use file as the input file instead of the default /usr/adm/hwconfig. param Show all values of param throughout the configuration file. 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 will be used. param on its own indi- cates a query for its corresponding value(s), whereas param=value indi- cates 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 short format. Examples hwconfig The entire contents of the file /usr/adm/hwconfig are printed. hwconfig base All the values of the base parameter found in /usr/adm/hwconfig 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 /usr/adm/hwconfig 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 /usr/adm/hwconfig entries with matching vec=4 are printed. hwconfig -l base dma vec=4 is like hwconfig -l vec=4 except that base and dma values will be printed first. hwconfig -h Everything is printed in the long format, with a header similar to the one shown at boot time. It will ignore all queries, but perform matching on the token values. For example, hwconfig -h vec=4 dma=1 will print in long format, with headers, all those entries with vec=4 and dma=1 hwconfig -ch displays /usr/adm/hwconfig in an easy-to-read tabular format and checks for device conflicts. Files /etc/hwconfig program file /usr/lib/hwconfig.awk awk program which hwconfig uses /usr/adm/hwconfig default source file Diagnostics hwconfig returns 0 for success, 1 for conflicts detected, 2 for invalid arguments. Notes Information about conflicts is purely advisory because hwconfig can only report about hardware devices which have been correctly recognized by a kernel driver. /etc/hwconfig is only runnable by root. /usr/adm/hwconfig is not normally readable by users, but can be made so by the system administrator. /usr/adm/hwconfig is written by the error logger daemon. The logger dae- mon does not run while in system maintenance mode. This means that the hwconfig report is not up to date until the system is brought into multi-user mode. Value added hwconfig is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.