UXGEN(1M) — Series 800 Only
NAME
uxgen − generate an HP-UX system
SYNOPSIS
uxgen [-s] infile
DESCRIPTION
Uxgen is used to build an HP-UX system. The user supplies a set of instructions in infile that selects optional parts of the kernel (such as I/O drivers, pseudo drivers, subsystems, file systems) and specifies values for system parameters such as the location of the swap area.
The files output by uxgen are placed in the directory ../infile. This directory is created if it does not exist. Five files (conf.c, config.h, devices, libs_file, Makefile) are created by uxgen. The file devices contains a list of I/O devices, pseudo drivers and major numbers assigned to them. This file is used by the commands insf(1M), mksf(1M) and lssf(1M) for making and listing special files. The file libs_file contains a macro recognized by make(1) specifying the libraries needed to produce a kernel with all the subsystems and file systems included in infile. In addition to infile, the file named Makefile must exist in the current directory. Makefile is supplied with the system and contains targets for compiling conf.c and linking the kernel (hp-ux) using the make(1) macro defined in libs_file. The concatenation of the files libs_file and Makefile creates the file Makefile in the ../infile directory.
After creating Makefile, uxgen changes the current directory to ../infile and executes the make command. However, if the -s option is specified, make is not executed. Make compiles conf.c and links the kernel (hp-ux) with the appropriate kernel libraries. The file hp-ux can then be booted. See the HP-UX System Administrator Manual for information on how to include or remove a subsystem or a file system, and how to boot the system.
Many header files are needed to compile conf.c. Also, archive library files containing the kernel objects are needed to link the kernel. These files are supplied with the system and are contained in the directories found under /etc/conf. The directories in /etc/conf can be moved to any location in the file system; however, all the directories must exist to build the kernel. By convention, infile is placed in the directory named gen (usually, /etc/conf/gen).
The procedure for building a kernel follows:
| Instruction | Command |
| 1. Switch current directory to gen. | cd /etc/conf/gen. |
| 2. Edit or create infile. | |
| 3. Execute uxgen, thus making the new kernel, named ../infile/hp-ux. | uxgen infile |
| 4. Save the old /hp-ux and /etc/devices files. | cp /hp-ux /SYSBCKUP cp /etc/devices /etc/DEVBCKUP |
| 5. Move the new hp-ux and devices file into place. | mv ../infile/hp-ux /hp-ux mv ../infile/devices /etc/devices |
| 6. Follow reboot instructions. | See shutdown(1M). |
It is beyond the scope of this manual page to give a complete description of the statements that can be used in infile. A "loose" syntax description for most statements is given below. See the HP-UX System Administrator Manual for more information.
The statements used in infile form a simple C-like language. Before being read, infile is passed through the C preprocessor. This allows features such as comments, macros, file inclusion and conditional statements. See cpp(1) for more information about the C preprocessor.
Generally, the first statement in infile is #include /etc/master. This causes the statements in /etc/master to be read prior to the remaining statements in infile. The /etc/master file contains "subsystem", "file system", "driver", "pseudo driver", "streams module" and "tunable definition" statements which describe kernel software subsystems, file systems, I/O drivers, pseudo drivers, streams modules, tunable parameters and major number assignments for software supplied by HP. Only users who write kernel software (such as subsystems, file systems, drivers, pseudo drivers) need to understand these statements. They are described in the HP-UX System Administrator Manual . All other statements are briefly described below:
args on module-ID lu integer section integer ;
Obsolete. The first disk section specified in the swap on statement is used for writing the argument list when calling exec(2).
console on module-ID
Specify the module name used for the system console.
dumps on module-ID lu integer section integer ;
Specify the module name, logical unit number and section number used for writing the operating system image after the operating system detects a fatal error (panic).
include identifier ; Include a pseudo driver, subsystem, file system or streams module in the kernel.
io {
identifier lu integer address integer ;
. . .
identifier address integer {
identifier lu integer address integer ;
}
. . .
}
Specify the number of I/O devices and how they are connected.
remove identifier ; Remove a pseudo driver, subsystem, streams module or file system that was previously included with an include statement.
root on module-ID lu integer section integer
[ mirrored on module-ID lu integer section integer ];
root on remote ;
Specify the module name, logical unit number and section number for the root of the file system ("/"). The optional portion specifies the root mirror. If a root mirror is specified, the module-ID must be "disc2" for both the mirror disk and the disk containing the root of the file system. Disk mirroring also requires that the section on the mirror disk and the root section be identical (see mirror(1M)). For a diskless system, the root of the file system can be specified as remote.
swap on module-ID lu integer section integer
[ mirrored on module-ID lu integer section integer ]
[ module-ID lu integer section integer ] ... ;
swap on remote ;
Specify the module name, logical unit number and section number used for swapping. Multiple swap areas can be defined. Only the first swap area listed may be mirrored. If a root mirror is specified, the module-ID must be "disc2" for both the mirror disk and the disk containing the primary swap space. Disk mirroring also requires that the section on the mirror disk and the primary swap section be identical (see mirror(1M)). For a diskless system, the swap area can be specified as remote.
tunable-ID <integer> ;
tunable-ID "<anychars>" ;
Assign a value to a tunable parameter. Tunable-ID can be any identifier listed below under TUNABLE PARAMETERS. All HP tunable parameters are defined and assigned a default value with a "tunable definition" statement in the /etc/master file.
TUNABLE PARAMETERS
acctresume The percentage of file system space that must be free to reactivate process accounting after it is suspended due to insufficient free space (see acctsuspend).
acctsuspend The percentage of file system space that must be free to allow process accounting (see acctresume).
bufpages The number of memory pages allocated to the file-system buffer cache. Each page is 2048 bytes long. If bufpages is zero, two pages are allocated for each buffer header specified by nbuf, provided nbuf is non-zero. If both nbuf and bufpages are zero, ten percent of available memory is allocated by the kernel.
check_alive_period
The period between checking for alive messages from a diskless cnode (specified in seconds).
dmmax
dmmin
dmshm
dmtext The values of these parameters are used as described below in SWAP SPACE PARAMETER INTERACTION.
dskless_cbufs The number of pages allocated to the cbuf (cluster buffer) pool. Each page is 2048 bytes long.
dskless_mbufs The number of pages allocated to the mbuf pool. Each page is 2048 bytes long.
dskless_node A flag that identifies a diskless client node or cluster server. A value of 1 identifies a client node. A value of 0 identifies the cluster server.
dst A flag that specifies whether daylight saving time should be used. A value of 0 means not to use daylight saving time. A value of 1 indicates that USA daylight saving time should be used.
iomemsize The amount of memory available to the I/O system via the kernel function io_get_mem(). The value is in bytes.
itebuflines Obsolete (see scroll_lines).
maxdsiz The maximum size (in pages) of a process’s data segment.
maxssiz The maximum size (in pages) of a process’s stack.
maxswapchunks The maximum number of dmmax * 1 kbyte blocks of swap space allocated.
maxtsiz The maximum size (in pages) of a process’s shared text segment.
maxuprc The maximum number of processes a user may have.
maxusers The maximum number of expected users. Assigning a value to this parameter causes the macro MAXUSERS to be defined (for example, "#define MAXUSERS 8"). MAXUSERS is used to determine other tunable parameters (for example, nproc "(20 + 8 * MAXUSERS)";).
minswapchunks The minimum number of dmmax * 1 kbyte blocks of swap space allocated.
msgmap The number of message map entries.
msgmax The maximum number of bytes in a message.
msgmnb The total number of bytes allowed for all messages queued on a message queue.
msgmni The number of message queue identifiers.
msgseg The number of units (each msgssz bytes long) available for messages.
msgssz The size (in bytes) of each unit of memory used for messages (see msgseg).
msgtql The number of message headers.
nbuf The number of file-system buffer cache buffer headers. If both nbuf and bufpages are set to 0, the kernel allocates ten percent of available memory to buffer space. If only nbuf is 0, it will be computed from bufpages, assuming 4096 bytes per buffer. If both variables are non-zero, the kernel attempts to adhere to both requests, but if necessary, nbuf is changed to correspond to bufpages.
ncallout The number of timeouts that can be pending simultaneously.
netisr_priority If a networking subsystem is configured, netisr_priority specifies the realtime priority by which the process /etc/netisr is scheduled, and by which all networking runs. Otherwise, netisr_priority is ignored.
netmeminit If a networking subsystem is configured, netmeminit specifies the number of bytes of memory to be preallocated at system initialization time. Otherwise, netmeminit is ignored.
netmemmax If a networking subsystem is configured, netmemmax specifies the maximum number of bytes of memory to be used for networking. Otherwise, netmemmax is ignored.
netmemthresh If a networking subsystem is configured, a non-negative netmemthresh specifies the number of bytes at which the networking subsystem begins to overreserve memory. If netmemthresh is −1, overreservation is turned off for the value of netmemmax supplied. Other negative values for netmemthresh are reserved and should not be used. If no networking subsystem is configured, netmemthresh is ignored.
nfile The maximum number of open files.
nflocks The maximum number of file locks.
ngcsp The number of general cluster server processes (for diskless server).
ninode The maximum number of open in-core inodes.
nproc The maximum number of processes that can exist simultaneously.
npty The number of ptys (pseudo-terminals).
nstlbe The number of Software TLB entries requested.
nswapfs The number of file systems available for swapping.
ntext The maximum number of active shared text descriptors.
num_cnodes The limiter for diskless system resource allocation. It is used as an indicator of the number of diskless cnodes that a server can reasonably expect to serve simultaneously. Assigning a value to this parameter causes the macro NUM_CNODES to be defined (for example, "#define NUM_CNODES 5"). NUM_CNODES is used to determine other tunable parameters (for example, ngcsp "8 x NUM_CNODES";).
retry_alive_period
The period to continue checking for alive messages from a diskless cnode (specified in seconds).
scroll_lines The number of lines of emulated terminal memory, both on-screen and off-screen, for each ITE (Internal Terminal Emulator) port.
selftest_period The period between execution of kernel selftest (specified in seconds).
semaem The maximum value by which a semaphore can be adjusted due to the death of a process.
semmap The number of semaphore map entries.
semmni The number of semaphore identifiers.
semmns The maximum number of semaphores.
semmnu The maximum number of processes that can have pending "semaphore undo" requests on a semaphore.
semume The maximum number of semaphores on which a process can have a pending "semaphore undo" request.
semvmx The maximum value of a semaphore.
server_node A flag used to size an array for the cluster server’s inbound requests. A value of 1 causes the serving_array[] and ninode to be sized for a server node. A value of 0 causes the serving_array[] and ninode to be sized for a diskless cnode.
serving_array_size
The size of the cluster’s serving array. The serving array is an array of kernel structures that holds information related to inbound requests.
shmmax The maximum number of bytes in a shared memory segment.
shmmni The maximum number of shared memory segments.
shmseg The maximum number of shared memory segments that can be attached simultaneously to a process.
timeslice The number of 10-millisecond intervals used for round-robin scheduling. A value of −1 disables round-robin scheduling.
timezone The minutes west of Greenwich.
unlockable_mem The number of bytes of memory that cannot be locked.
using_array_size The size of the diskless cnode’s using array. The using array is an array of kernel structures that holds information related to outbound requests.
SWAP SPACE PARAMETER INTERACTION
If you change maxdsiz, maxssiz, maxtsiz or shmmax, you must also change dmmin, dmmax, dmtext and dmshmem. All of these swap space system parameters interact, and a wrong value might make your virtual memory system unworkable.
Appendix D of the HP-UX System Administrator Manual contains a table which lists the values these parameters must have for given values of maxdsiz, maxssiz, maxtsiz or shmmax.
EXAMPLES
| include | mirror; |
| include | nfs; |
| include | nsdiag0; |
| console on | mux0; |
| root on | disc2 lu 0 section 0 |
| mirrored on | disc2 lu 1 section 0; |
| dumps on | disc0 lu 0 section 1; |
| swap on | disc0 lu 0 section 1 |
| disc0 lu 1 section 1; | |
| acctresume | 4; |
| acctsuspend | 2; |
| bufpages | 0; |
| check_alive_period | 4; |
| dmmax | 2048; |
| dmmin | 32; |
| dmshm | 2048; |
| dmtext | 2048; |
| dskless_cbufs | "(DSKLESS_MBUFS*2 + 1)"; |
| dskless_mbufs | "(((SERVING_NODE*NUM_CNODES)/4) + 1)"; |
| dskless_node | 1; |
| dst | 1; |
| iomemsize | "(4 * NUM_IOTREE_RECS * NBPG)"; |
| maxdsiz | 0x8000; |
| maxssiz | 0x1000; |
| maxswapchunks | 512; |
| maxtsiz | 0x8000; |
| maxuprc | 25; |
| maxusers | 32; |
| minswapchunks | 1; |
| msgmap | 100; |
| msgmax | 8192; |
| msgmnb | 16384; |
| msgmni | 50; |
| msgseg | 1024; |
| msgssz | 8; |
| msgtql | 40; |
| nbuf | 0; |
| ncallout | "(16+NPROC+USING_ARRAY_SIZE+SERVING_ARRAY_SIZE)"; |
| netisr_priority | 100; |
| netmeminit | 0; |
| netmemmax | "(512 * NETCLBYTES)"; |
| netmemthresh | 0; |
| nfile | "(16*(NPROC+16+MAXUSERS)/10+32+2*NETSLOP)"; |
| nflocks | 200; |
| ngcsp | "(8 * NUM_CNODES)"; |
| ninode | "(NPROC+16+MAXUSERS+32+2*NPTY+SERVER_NODE*18*NUM_CNODES)"; |
| nproc | "(20 + 8 * MAXUSERS)"; |
| npty | 60; |
| nstlbe | 0; |
| ntext | "(24 + MAXUSERS + NETSLOP)"; |
| num_cnodes | 0; |
| retry_alive_period | 21; |
| scroll_lines | 100; |
| selftest_period | 120; |
| semaem | 16384; |
| semmap | 10; |
| semmni | 10; |
| semmns | 60; |
| semmnu | 30; |
| semume | 10; |
| semvmx | 32767; |
| server_node | 0; |
| serving_array_size | "(MAXUSERS*(SERVER_NODE*NUM_CNODES + 2))"; |
| shmmax | 0x4000000; |
| shmmni | 100; |
| shmseg | 12; |
| timeslice | "(HZ/10)"; |
| timezone | 420; |
| unlockable_mem | 0; |
| using_array_size | "(NPROC)"; |
io {
cio_ca0 address 28 {
hpib0 address 0 {
disc0 lu 0 address 0;
disc0 lu 1 address 1;
disc0 lu 2 address 2;
}
mux0 lu 0 address 1;
hpib0 address 2 {
lpr0 lu 0 address 0;
tape0 lu 0 address 2;
instr0 lu 0 address 7;
}
hpfl0 address 3 {
disc2 lu 0 address 0;
disc2 lu 1 address 1;
}
}
}
AUTHOR
Uxgen was developed by HP.
FILES
/etc/devices
/etc/master
SEE ALSO
make(1), insf(1M), lssf(1M), mksf(1M), shutdown(1M), devices(4).
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989