AIX Commands 3
AIX Commands 3
3
SC23-4890-03
AIX 5L Version 5.3
SC23-4890-03
Note
Before using this information and the product it supports, read the information in “Notices,” on page 779.
Contents v
lscons Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
lscore Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
lscosi Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
lsdev Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
lsdisp Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
lsfilt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
lsfont Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
lsfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
lsgroup Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
lsitab Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
lskbd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
lsldap Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
lslicense Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
lslpcmd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
lslpp Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
lslv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
lsmaster Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
lsmcode Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
lsmksysb Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
lsnamsv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
lsnfsexp Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
lsnfsmnt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
lsnim Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
lsnlspath Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
lsparent Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
lspath Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
lsprtsv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
lsps Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
lspv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
lsque Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
lsquedev Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
lsresource Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
lsresponse Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
lsrole Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
lsrpdomain Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
lsrpnode Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
lsrset Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
lsrsrc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
lsrsrcdef Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
lssavevg Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
lssec Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
lssensor Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
lsslot Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
lssrc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
lsts Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
lstun Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
lsuser Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
lsvfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
lsvg Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
lsvirprt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
lsvmode Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
lsvpd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
lsvsd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
lswlmconf Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
lvmo Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
lvmstat Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Contents vii
mkinstallp Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
mkkeyserv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
mkkrb5clnt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
mkkrb5srv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
mklost+found Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
mklpcmd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
mklv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
mklvcopy Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
mkmaster Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
mknamsv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
mknetid Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
mknfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
mknfsexp Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
mknfsmnt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
mknfsproxy Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
mknod Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
mknotify Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
mkpasswd Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
mkpath Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
mkprojldap Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
mkproto Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
mkprtldap Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
mkprtsv Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
mkps Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
mkqos Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
mkque Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
mkquedev Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
mkramdisk Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
mkresponse Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
mkrole Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
mkrpdomain Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
mkrset Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
mkrsrc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
mkseckrb5 Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
mksecldap Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650
mksecpki Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
mksensor Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
mkserver Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
mkslave Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
mkssys Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
mkstr Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
mksysb Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
mkszfile Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
mktcpip Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
mkts Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
mktun Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
mkuser Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
[Link] Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
mkvg Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
mkvgdata Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
mkvirprt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
mm Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
mmt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
mmtu Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
mobip6ctrl Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
mobip6reqd Daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Contents ix
x Commands Reference, Volume 3
About This Book
This book provides end users with complete detailed information about commands for the AIX® operating
system. The commands are listed alphabetically and by category, and complete descriptions are given for
commands and their available flags. If applicable, each command listing contains examples. This volume
contains AIX commands that begin with the letters i through m. This publication is also available on the
documentation CD that is shipped with the operating system.
Some commands can be entered simply by typing one word. It is also possible to combine commands so
that the output from one command becomes the input for another command. This is known as pipelining.
Flags further define the actions of commands. A flag is a modifier used with the command name on the
command line, usually preceded by a dash.
Commands can also be grouped together and stored in a file. These are known as shell procedures or
shell scripts. Instead of executing the commands individually, you execute the file that contains the
commands.
Some commands can be constructed using Web-based System Manager applications or the System
Management Interface Tool (SMIT).
Highlighting
The following highlighting conventions are used in this book:
Bold Identifies commands, subroutines, keywords, files, structures, directories, and other items whose
names are predefined by the system. Also identifies graphical objects such as buttons, labels, and
icons that the user selects.
Italics Identifies parameters whose actual names or values are to be supplied by the user.
Monospace Identifies examples of specific data values, examples of text similar to what you might see
displayed, examples of portions of program code similar to what you might write as a programmer,
messages from the system, or information you should actually type.
Format
Each command may include any of the following sections:
To list the fileset that owns all file names that contain installp, enter:
lslpp -w "*installp*"
Once the process is running in the background, you can continue to work and enter other commands on
your system.
Entering Commands
You typically enter commands following the shell prompt on the command line. The shell prompt can vary.
In the following examples, $ is the prompt.
To display a list of the contents of your current directory, you would type ls and press the Enter key:
$ ls
When you enter a command and it is running, the operating system does not display the shell prompt.
When the command completes its action, the system displays the prompt again. This indicates that you
can enter another command.
The flag alters the way a command works. Many commands have several flags. For example, if you type
the -l (long) flag following the ls command, the system provides additional information about the contents
of the current directory. The following example shows how to use the -l flag with the ls command:
$ ls -l
A parameter consists of a string of characters that follows a command or a flag. It specifies data, such as
the name of a file or directory, or values. In the following example, the directory named /usr/bin is a
parameter:
$ ls -l /usr/bin
When certain commands are entered, the shell prompt changes. Because some commands are actually
programs (such as the telnet command), the prompt changes when you are operating within the
command. Any command that you issue within a program is known as a subcommand. When you exit the
program, the prompt returns to your shell prompt.
The operating system can operate with different shells (for example, Bourne, C, or Korn) and the
commands that you enter are interpreted by the shell. Therefore, you must know what shell you are using
so that you can enter the commands in the correct format.
Stopping Commands
If you enter a command and then decide to stop that command from running, you can halt the command
from processing any further. To stop a command from processing, press the Interrupt key sequence
(usually Ctrl-C or Alt-Pause). When the process is stopped, your shell prompt returns and you can then
enter another command.
Related Information
The following books contain information about or related to commands:
v AIX 5L Version 5.3 Commands Reference, Volume 1
v AIX 5L Version 5.3 Commands Reference, Volume 2
v AIX 5L Version 5.3 Commands Reference, Volume 3
v AIX 5L Version 5.3 Commands Reference, Volume 4
v AIX 5L Version 5.3 Commands Reference, Volume 5
v AIX 5L Version 5.3 Commands Reference, Volume 6
v AIX 5L Version 5.3 Files Reference
v Printers and printing
v Installation and migration
v AIX 5L Version 5.3 AIX Installation in a Partitioned Environment
v AIX 5L Version 5.3 Network Information Services (NIS and NIS+) Guide
v Performance management
v AIX 5L Version 5.3 Performance Tools Guide and Reference
v Security
v Networks and communication management
v Operating system and device management
v AIX 5L Version 5.3 Technical Reference: Base Operating System and Extensions Volume 1
v AIX 5L Version 5.3 Technical Reference: Base Operating System and Extensions Volume 2
v AIX 5L Version 5.3 Technical Reference: Communications Volume 1
v AIX 5L Version 5.3 Technical Reference: Communications Volume 2
v AIX 5L Version 5.3 Technical Reference: Kernel and Subsystems Volume 1
v AIX 5L Version 5.3 Technical Reference: Kernel and Subsystems Volume 2
v AIX 5L Version 5.3 Web-based System Manager Administration Guide
v Performance Toolbox Version 2 and 3 for AIX: Guide and Reference
Purpose
Postprocesses the troff command output for the IBM® 3812 Model 2 Pageprinter.
Syntax
ibm3812 [ -altpaper] [ -landscape] [ -quietly] [ -FDirectory] [ -i] [File...]
Description
The ibm3812 command is a postprocessor that can be used on intermediate output produced by the troff
command.
If given one or more file names as options, the ibm3812 command processes those files. If no file names
are specified, this command acts as a filter interpreting standard input.
The ibm3812 command’s font files allow the postprocessor to send characters of more than one byte to
the printer. These can be characters that require multiple bytes to represent them, such as code page and
point; or, they can be characters that are composed of two or more concatenated glyphs.
For example, the character code for the \(ib (improper subset) special character is:
"\001\125\xe2\xff\xe8\xe3%\x00\x16\001\074\xe3\xff\xea"
The printer is in Page Map Primitive (PMP) mode when these bytes are sent, so you must use the 001
directive to introduce a character. For single-byte codes, this Generic Font Patterns command is
automatically handled by the postprocessor. The % (percent sign) characters escape the bytes containing
0, which would otherwise terminate the code sequence. To obtain a literal % character, escape it with
another % character so that a percent sign is displayed as %%. A single-byte % code is assumed to be a
literal percent sign, so that the single-byte % character needs no special handling in the font file.
Notes:
1. The ibm3812 command depends on the files with names ending in .out in the
/usr/lib/font/devibm3812 directory. It does not produce usable output unless these files have
been properly set up.
2. The postprocessor requires additional font information to be stored in the /usr/lib/font/
devibm3812/fonts file. If new fonts are added to this file, make sure that the DESC file is also
updated to reflect the additional fonts and special characters.
The format of the file must be preserved. The file contains the following four fields:
v The one- or two-letter name of the font
v The full name of the font on the printer-font diskette
v The one- or two-letter name of the substitute font
v An array of five available sizes.
Flags
-altpaper Specifies that the file should be printed from the alternate paper drawer. By default, the
ibm3812 command prints from the primary paper drawer.
Example
Following is an example of the troff command used with the ibm3812 command:
troff file|ibm3812|qprt-dp
Files
/usr/lib/font/devibm3812/*.out Contains font files for the ibm3812 command.
/usr/lib/font/devibm3812/fonts Contains information about the available fonts for the
ibm3812 command.
Related Information
The ibm3816 command, troff command.
The troff font file format specifies description files for the troff command.
ibm3816 Command
Purpose
Postprocesses the troff command output for the IBM 3816 Pageprinter.
Syntax
ibm3816 [ -altpaper] [ -landscape] [ -quietly] [ -FDirectory] [ -i] [File...]
Description
The ibm3816 command is a postprocessor that can be used on intermediate output produced by the troff
command.
If given one or more file names as options, the ibm3816 command processes those files. If no file names
are specified, this command acts as a filter interpreting standard input.
The ibm3816 command’s font files allow the postprocessor to send characters of more than one byte to
the printer. These can be characters that require multiple bytes to represent them, such as code page and
point; or, they can be characters that are composed of two or more concatenated glyphs.
For example, the character code for the \(ib (improper subset) special character is:
"\001\125\xe2\xff\xe8\xe3%\x00\x16\001\074\xe3\xff\xea"
The printer is in Page Map Primitive (PMP) mode when these bytes are sent, so you must use the 001
directive to introduce a character. For single-byte codes, this Generic Font Patterns command is
automatically handled by the postprocessor. The % (percent sign) characters escape the bytes containing
0, which would otherwise terminate the code sequence. To obtain a literal % character, escape it with
Notes:
1. The ibm3816 command depends on the files with names ending in .out in the
/usr/lib/font/devibm3816 directory. It does not produce usable output unless these files have
been properly set up.
2. The postprocessor requires additional font information to be stored in the /usr/lib/font/
devibm3816/fonts file. If new fonts are added to this file, make sure that the DESC file is also
updated to reflect the additional fonts and special characters.
The format of the file must be preserved. The file contains the following four fields:
v The one- or two-letter name of the font
v The full name of the font on the printer-font diskette
v The one- or two-letter name of the substitute font
v An array of five available sizes.
Flags
-altpaper Specifies that the file should be printed from the alternate paper drawer. By default, the
ibm3816 command prints from the primary paper drawer.
-landscape Specifies that the file should be printed in landscape orientation, so that the wider part of the
paper is horizontally oriented. This flag rotates the page to the right by 90 degrees. By default,
the ibm3816 command prints in portrait orientation.
-quietly Suppresses all non-fatal error messages.
-FDirectory Specifies the directory holding the font files. The default file is devibm3816. The command
looks for font files in the /usr/lib/font directory by default.
-i Suppresses initialization of the printer that runs the [Link] macro, after the job has printed.
Example
Following is an example of the troff command used with the ibm3816 command:
troff file|ibm3816|qprt-dp
Files
/usr/lib/font/devibm3816/*.out Contains font files for the ibm3816 command.
/usr/lib/font/devibm3816/fonts Contains information about the available fonts for the
ibm3816 command.
Related Information
The ibm3812 command, troff command.
The troff font file format specifies description files for the troff command.
ibm5585H-T Command
Purpose
Processes troff command output for the IBM 5585H-T printer.
Description
The ibm5585H-T command processes the output of the troff command for output to the IBM 5585H-T
printer for traditional Chinese language. This command is provided exclusively for traditional Chinese
language support.
The ibm5585H-T command processes one or more files specified by the File parameter. If no file is
specified, the ibm5585H-T command reads from standard input.
The ibm5585H-T command uses font files in the /usr/lib/font/devibm5585H-T directory that have
command names ending with .out. The ibm5585H-T command does not produce correct output unless
these files are provided.
Flag
-FDirectory Specifies a directory name as the place to find font files. By default, the ibm5585H-T command
looks for font files in the /usr/lib/font/devibm5585H-T directory.
Example
To process the reports file for the IBM 5585H-T printer, enter:
troff reports |ibm5585H-T | qprt -dp
The ibm5585H-T command first processes the output of the troff command, then sends the file to a print
queue.
File
/usr/lib/font/devibm5585H-T/*.out Contains font files.
Related Information
The troff command.
ibm5587G Command
Purpose
Postprocesses troff command output for the IBM 5587-G01, 5584-H02, 5585-H01, 5587-H01, and
5589-H01 printers with the (32x32/24x24) cartridge installed. This command is used exclusively for
Japanese Language Support.
Syntax
ibm5587G [ -FDirectory] [ -quietly] [File ...]
Description
The ibm5587G command processes the output of the troff command for output to the 5587-G01,
5584-H02, 5585-H01, 5587-H01, and 5589-H01 printers.
Note: The ibm5587G command assumes that the (32x32/24x24) cartridge is installed in the printer.
Incorrect output from the printer may result if the wrong cartridge is installed in the printer.
The ibm5587G command depends on the files with names ending in .out in the /usr/lib/font/
devibm5587G directory. It does not produce reasonable output unless these files have been properly set
up.
Flags
-FDirectory Specifies a directory name as the place to find the font files. By default, the ibm5587G
command looks for font files in the /usr/lib/font/devibm5587G directory.
-quietly Suppresses all nonfatal error messages.
Files
/usr/lib/font/devibm5587G/*.out Contains font files.
Related Information
The troff command formats text for printing on typesetting devices.
The troff font file format specifies description files for the troff command.
ibstat Command
Purpose
Displays operational information about one or more InfiniBand network devices.
Syntax
ibstat [ -d, -h, -i, -n, -p, -v ] DeviceName
Description
This command displays InfiniBand operational information pertaining to a specified Host Channel Adapter
Device (HCAD). If an HCAD device name is not entered, status for all available HCADs are displayed.
Select a flag to narrow down your search results. You can display specific categories of information,
including Node, Port, Interface, and Debug information. You can also choose to display all of the
information categories.
Flags
-d Displays current debug setting.
-h Displays ibstat command usage.
-i Displays network interface information.
-n Displays IB node information.
-p Displays IB port information.
-v Displays all IB device information.
Parameters
DeviceName Specifies the name of the HCAD device (for example,
iba0)
Exit Status
When you specify an invalid DeviceName, the ibstat command produces error messages stating that it
could not connect to the device. For example:
IBSTAT: No device iba2 configured.
or:
IBSTAT: Device iba3 is not available.
Examples
1. To request node and port information, enter:
ibstat -n -p
-------------------------------------------------------------------------------
IB NODE INFORMATION (iba0)
-------------------------------------------------------------------------------
Number of Ports: 2
Globally Unique ID (GUID): [Link].[Link]
Maximum Number of Queue Pairs: 1023
Maximum Outstanding Work Requests: 32768
Maximum Scatter Gather per WQE: 252
Maximum Number of Completion Queues: 1023
Maximum Multicast Groups: 256
Maximum Memory Regions: 3836
Maximum Memory Windows: 3836
-------------------------------------------------------------------------------
IB PORT 1 INFORMATION (iba0)
-------------------------------------------------------------------------------
Global ID Prefix: fe.[Link].00.00.00
Local ID (LID): 0012
Port State: Active
Maximum Transmission Unit Capacity: 2048
-------------------------------------------------------------------------------
IB PORT 2 INFORMATION (iba0)
-------------------------------------------------------------------------------
Global ID Prefix: fe.[Link].00.00.00
Local ID (LID): 0011
Port State: Active
Maximum Transmission Unit Capacity: 2048
Current Number of Partition Keys: 1
Partition Key List:
P_Key[0]: ffff
Current Number of GUID’s: 1
Globally Unique ID List:
GUID[0]: [Link].[Link]
Location
/usr/sbin/ibstat
Related Information
Internet Protocol over InfiniBand.
iconv Command
Purpose
Converts the encoding of characters from one code page encoding scheme to another.
Syntax
iconv [-cs] -f FromCode -t ToCode [ FileName... ]
iconv -l
Description
The iconv command converts the encoding of characters read from either standard input or the specified
file from one coded character set to another and then writes the results to standard output. The input and
output coded character sets are identified by the FromCode and ToCode parameters. The input data
should consist of characters in the code set specified by the FromCode parameter. If the FileName
parameter is not specified on the command line, the iconv command reads from standard input.
You can use a Web-based System Manager System application (wsm system fast path) to run this
command. You could also use the System Management Interface Tool (SMIT) smit iconv fast path to run
this command. The iconv command uses the LOCPATH environment variable to search for code-set
converters of the form iconv/FromCodeSet_ToCodeSet. The default value of LOCPATH is /usr/lib/nls/loc.
The list of supported code set converters is provided in ″List of Converters″ in AIX 5L Version 5.3 General
Programming Concepts: Writing and Debugging Programs.
Exit Status
This command returns the following exit values:
Examples
1. To convert the contents of the mail.x400 file from code set IBM-850 and store the results in the
[Link] file, enter:
iconv -f IBM-850 -t ISO8859-1 mail.x400 > [Link]
2. To convert the contents of the [Link] file from the 7-bit interchange (ISO2022) encoding to the
Japanese EUC code set (IBM-eucJP), enter:
iconv -f fold7 -t IBM-eucJP [Link] > [Link]
3. To convert the contents of a local file to the mail-interchange format and send mail, enter:
iconv -f IBM-943 -t fold7 [Link] | mail fxrojas
Related Information
The genxlt command describes how to define a conversion table.
The iconv subroutine, iconv_close subroutine, and iconv_open subroutines provide a method to use the
conversion service from within a program.
Converters Overview in AIX 5L Version 5.3 Network Information Services (NIS and NIS+) Guide.
For information on installing the Web-based System Manager, see Chapter 2: Installation and System
Requirements in AIX 5L Version 5.3 Web-based System Manager Administration Guide.
Converters Overview for Programming in AIX 5L Version 5.3 Network Information Services (NIS and NIS+)
Guide.
Purpose
Displays the system identifications of a specified user.
Syntax
id [user]
id -G [-n ] [User]
id -g [-n l | [ -n r ] [User]
id -u [-n l | [ -n r ] [User]
Description
The id command writes to standard output a message containing the system identifications (ID) for a
specified user. The system IDs are numbers which identify users and user groups to the system. The id
command writes the following information, when applicable:
v User name and real user ID
v Name of the user’s group and real group ID
v Name of user’s supplementary groups and supplementary group IDs
Supplementary group information is written only for systems supporting multiple-user groups and only if
the specified user belongs to a supplementary group.
The id command also writes effective user and group IDs, but only for the user that invoked the id
command. (If the User parameter is specified with the id command, the effective IDs are assumed to be
identical to real IDs.) If the effective and real IDs for the invoking user are different, the id command writes
the following effective ID information, when applicable:
v Effective user name and effective user ID
v Name of effective user’s group and effective group ID
The id command, when specified with the -l option, displays login UID. Login ID indicates the system
credentials at the time of logging in to the session. Login UID indicates the user ID (numeric value) of the
user, who actually logged in. The login UID is equal to the UID for a user who has logged in to the system
and whose credentials remain unchanged. For example, when the user runs the su command, the UID for
the user changes and the login UID remains the same.
The id command will fail if the specified user does not exist or if the command cannot read the user or
group information.
Flags
The contents and format of the message written by the id command can be altered with the following
flags:
-G Specifies that the id command write the effective, real, and supplementary group IDs only. If there are
multiple entries for the effective, real, or supplementary IDs, they are separated by a space and placed on
the same line.
-g Specifies that the id command write only the effective group ID.
-u Specifies that the id command write only the effective user ID.
-r Specifies that the id command write the real ID instead of the effective ID. This flag can be invoked with
either the -g flag to write the real group ID, or the -u flag to write the real user ID.
Security
Access Control: This program should be installed as a normal user program in the Trusted Computing
Base.
Exit Status
This command returns the following exit values:
0 Successful completion.
>0 An error occurred.
Examples
1. To display all system identifications for the current user, enter:
id
In this example, the user has user name sah with an ID number of 1544; a primary group name of
build with an ID number of 300; an effective user name of root with an ID number of 0; an effective
group name of printq with an ID number of 9; and two supplementary group names of system and
audit, with ID numbers 0 and 10, respectively.
2. To display all group ID numbers for the current user, enter:
id -G
The -G flag writes only the group IDs for a user. In this example, user sah is a member of the system
(0), audit (10), build (300), and printq (9) groups.
3. To display all group names for the current user, enter:
id -Gn
Files
/usr/bin/id Contains the id command.
Related Information
The getty command, login command, setgroups command, su command, tsm command.
ifconfig Command
Purpose
Configures or displays network interface parameters for a network using TCP/IP.
Syntax
ifconfig Interface [ AddressFamily [ Address [ DestinationAddress ] ] [ Parameters... ] ]
ifconfig -a [ -l ] [ -d ] [ -u ] [ ProtocolFamily ]
Description
You can use the ifconfig command to assign an address to a network interface and to configure or
display the current network interface configuration information. The ifconfig command must be used at
system startup to define the network address of each interface present on a machine. After system startup,
it can also be used to redefine an interfaces address and its other operating parameters. The network
interface configuration is held on the running system and must be reset at each system restart. The
ifconfig command interprets the IFF_MULTICAST flag and prints its value if it is set.
An interface can receive transmissions in differing protocols, each of which may require separate naming
schemes. It is necessary to specify the AddressFamily parameter, which may change the interpretation of
the remaining parameters. The address families currently supported are inet and inet6.
For the DARPA-Internet family, inet, the address is either a host name present in the host name database,
that is, the /etc/hosts file, or a DARPA-Internet address expressed in the Internet standard dotted decimal
notation.
The ifconfig function displays the current configuration for a network interface when no optional
parameters are supplied.
If a protocol family is specified, ifconfig will report only the details specific to that protocol family.
Gratuitous ARP is supported for Ethernet, token-ring, and FDDI interfaces. This means when an IP
address is assigned, the host sends an ARP request for its own address (the new address) to inform other
machines of its address so that they can update their ARP entry immediately. It also lets hosts detect
duplicate IP address. If you get a response to the ARP request, an error is logged in /var/adm/ras/errlog
which can be viewed using errpt command (or using SMIT interface) for the error ID
AIXIF_ARP_DUP_ADDR.
Flags
-a Optionally, the -a flag may be used instead of an interface name. This flag instructs
ifconfig to display information about all interfaces in the system.
-d The -d flag displays interfaces that are down.
-l This flag may be used to list all available interfaces on the system, with no other
additional information. Use of this flag is mutually exclusive with all other flags and
commands, except for -d and -u.
-u The -u flag displays interfaces that are up.
ProtocolFamily This flag specifies protocols such as tcp, udp, tcp6, udp6, icmp, and icmp6.
Parameters
Address Specifies the network address for the network interface. For the inet family, the
Address parameter is either a host name or an Internet address in the standard
dotted decimal notation.
AddressFamily Specifies which network address family to change. The inet and inet6 address
families are currently supported. This parameter defaults to the inet address
family.
DestinationAddress Specifies the address of the correspondent on the remote end of a point-to-point
link.
Include a numeral after the abbreviation to identify the specific interface (for
example, tr0).
If Interface is not yet loaded, ifconfig Interface loads that interface and netstat
-in lists it. In processing a status query for Interface, that interface is loaded (if
not already loaded) to complete the query processing.
Parameter Allows the following parameter values:
alias Establishes an additional network address for the interface. When
changing network numbers, this parameter is useful for accepting
packets addressed to the old interface.
allcast Sets the Token-Ring interface to broadcast to all rings on the network.
-allcast
Confines the Token-Ring interface to broadcast only to the local ring.
arp Enables the ifconfig command to use the Address Resolution Protocol
in mapping between network-level addresses and link-level addresses.
The arp value is the default.
-arp Disables the use of the Address Resolution Protocol.
authority
Reserved for future use.
bridge Reserved for future use.
checksum_offload
Enables the flag to indicate that transmit TCP checksum should be
offloaded to the adapter. The command will also reset the per-interface
counter that determines whether TCP should dynamically enable or
disable offloading of checksum computation.
-checksum_offload
Disables transmit TCP checksum offloading.
-dad (inet6 only) Does not perform duplicate IPv6 address detection.
-debug Disables driver-dependent debug code.
device dev_name
This parameter applies to ATM Network interface only. It specifies the
device name this interface is associated with. Unlike Token Ring or
Ethernet, in case of ATM, there is not a one-to-one correspondence
between interface and device. In the case of ATM, there can be more
than one interface for every device.
detach Removes an interface from the network interface list. If the last interface
is detached, the network interface driver code is unloaded. In order for
the interface route of an attached interface to be changed, that interface
must be detached and added again with ifconfig.
down Marks an interface as inactive (down), which keeps the system from
trying to transmit messages through that interface. If possible, the
ifconfig command also resets the interface to disable reception of
messages. Routes that use the interface, however, are not automatically
disabled.
eui64 (inet6 only) The real IPv6 address is computed by replacing the last 64
bytes of the given address with the Interface Identifier.
first Puts an IPv6 address at the first place on an interface in order to select
it as the source for unbound sockets. The syntax for using this
parameter is,
ifconfig interface inet6 first address
firstalias
(inet6 only) Same as alias, but sets the address in front of the interface
address list in order to select it as the source for unbound sockets.
group ID
Adds a group ID to the group ID list for the interface. This list is used in
determining the route to use when forwarding packets that arrived on the
interface.
-group ID
Removes a group ID from the group ID list for the interface. This list is
used in determining the route to use when forwarding packets that
arrived on the interface.
hwloop
Enables hardware loopback. The hardware loopback specifies that
locally addressed packets handled by an interface should be sent out
using the associated adapter.
-hwloop
Disables hardware loop-back. The hardware loop-back specifies that
locally addressed packets handled by an interface should be sent out
using the associated adapter.
ipdst Specifies an Internet host willing to receive IP packets encapsulating ns
packets bound for a remote network. An apparent point-to-point link is
constructed, and the specified address is taken as the ns address and
network of the destination.
tcp_low_rto
Enables the use of lower retransmission timeouts (RTO) for TCP
connections on a low latency, fast network, such as Gigabit Ethernet and
10 Gigabit Ethernet). If the networks experience packet drops, the
respective TCP connections use the rto value for RTO. The rto values
range from 0-3000 ms. This runtime option must be set in the if_isno
flags field. The use_isno option must also be set for this flag to be
effective.
-tcp_nocksum
Enables verification of the checksum of TCP data for local traffic to the
subnet attached to the interface. This is the default.
thread (inet only) Configures dedicated kernel threads for an interface. This
parameter can only be used on SMP machines that have multiple
CPU’s. This parameter causes input packets to be queued to a kernel
thread after processing by the device driver and input demuxer. The
input packet is processed in IP and TCP or UDP by the thread instead of
directly on the interrupt level. Setting this parameter can improve
throughput when high speed adapters bottleneck on a single CPU during
interrupt processing by allowing the input packets to be processed on
other CPU’s running the kernel threads (improved pipelining). For some
work loads, this parameter increases the per packet overhead, due to
thread scheduling overhead, resulting in higher CPU utilization an
possibly lower throughput. This parameter only applies to AIX 4.3.3 or
later.
-thread (inet only) Disables kernel thread support that has been configured with
the thread parameter. This parameter only applies to AIX 4.3.3 or later.
up Marks an interface as active (up). This parameter is used automatically
when setting the first address for an interface. It can also be used to
enable an interface after an ifconfig down command.
vipa_iflist
Adds the interfaces to the list of interfaces that should use this vipa as
the source address in the outgoing packets.
-vipa_iflist
Removes the interfaces from the list of interfaces that are configured to
use this vipa as the source address in the outgoing packets.
rto Specifies the retransmission timeout in milliseconds. The range for this value is
0-3000.
In AIX 4.3.3 and later versions, the following network options, commonly known as ISNO (Interface
Specific Network Options), can be configured on a per interface basis:
rfc1323 [0 | 1]
Enables or disables TCP enhancements as specified by RFC 1323, TCP Extensions for High
Performance. A value of 1 specifies that all TCP connections using this interface will attempt to
negotiate the RFC enhancements. A value of 0 disables rfc1323 for all connections using this
interface. The SOCKETS application can override this ISNO and global behavior on individual TCP
connections with the setsockopt subroutine.
-rfc1323
Removes the use of ISNO for rfc1323 for this network. A SOCKETS application can override the
global behavior on individual TCP connections using the setsockopt subroutine.
tcp_mssdflt Number
Sets the default maximum segment size used in communicating with remote networks. If
communicating over this interface, a socket uses Number as the value of the default maximum
segment size.
Note: ISNO parameters set by ifconfig are lost at the next reboot. Use the chdev command to
change the ODM database for each interface if you wish to make the ISNOs permanent. Use lsdev
-E -l [interface] to see the interface attributes and chdev -l -a [attribute=value] to change the
desired attribute. For example:
lsattr -E -l en0
chdev -l en0 -a tcp_sendspace=65536
Examples
1. To query the status of a serial line IP interface, enter the command in the following format:
ifconfig sl1
In this example, the interface to be queried is sl1. The result of the command looks similar to the
following:
sl1: flags=51<UP,POINTOPOINT,RUNNING>
inet [Link] --> [Link] netmask ffffff00
2. To configure the local loop-back interface, enter the command in the following format:
ifconfig lo0 inet [Link] up
3. To mark the local Token-Ring interface as down, enter the command in the following format:
ifconfig tr0 inet down
Note: Only a user with root user authority can modify the configuration of a network interface.
4. To turn rfc1323 off for all connections over en5 (assuming that the global value is 1), enter:
ifconfig en0 rfc1323 0
5. To configure a list of interfaces to use a vipa, enter:
ifconfig vi0 vipa_iflist en0,en1,tr0
6. To remove interface(s) that are configured to use vipa, enter:
ifconfig vi0 -vipa_iflist en1,tr0
7. To find out which interfaces are configured to use a vipa, say vi0, enter:
ifconfig vi0
If the link status on adapter ent0 changes to down, the adapter notifies the interface layer, which
causes the interface to also be marked as down.
9. To configure a GRE pseudo-interface as an endpoint of a GRE tunnel, enter:
ifconfig gre0 [Link] [Link]
This creates a GRE tunnel with [Link] and [Link] as the endpoints. The previous end of
the tunnel is identified by gre0.
10. To configure NAT on a GRE tunnel, enter:
ifconfig gre0 nat toaddr [Link] fromport 80 toport 8080
In this example, the original destination port of the GRE packet is 80 and the command changes the
destination port to 8080 and the destination address to [Link].
Files
/etc/host Contains the host-name database.
/etc/networks Contains network names.
Related Information
The netstat command.
TCP/IP network interfaces, TCP/IP protocols, TCP/IP routing, Subnet addresses in Networks and
communication management.
ike Command
Purpose
Starts, stops, and monitors IP Security dynamic tunnels which use the Internet Key Exchange Protocol
(ISAKMP/Oakley).
Syntax
ike cmd=Subcommand [ parameter ... ]
Description
The ike is used to start, stop, and monitor IP Security dynamic tunnels using the Internet Key Exchange
(IKE) protocol. IP Security tunnels protect IP traffic by authenticating and/or encrypting IP data. The ike
command performs several functions. It can activate, remove, or list IKE and IP Security tunnels. For an
overview of IP Security and IKE tunnels, see Internet Protocol security in the Security.
Note: You must have root access to use the ike command.
The IKE negotiation occurs in two phases. The first phase authenticates the two parties and sets up a Key
Management (also known as phase 1) Security Association for protecting the data that is passed during
the negotiation. In this phase the key management policy is used to secure the negotiation messages. The
second phase negotiates Data Management (also known as the phase 2) Security Association, which
The ike command is used to activate tunnels with identification and policy information which has already
been entered using the ikedb command or the Web-based System Manager Graphical User Interface
(GUI) under Virtual Private Networks (IP Security) in the Network application. The parameters to be used
during the negotiation are entered by the user and stored in a database. The ike command allows the
activation, removal and listing of tunnels that have been started using the security parameters stored in the
database.
In most uses of the ike command, activation and deletion occurs for both phases, however the command
allows these operations to be done separately.
Subcommands
activate
Purpose Start the negotiation of an IKE tunnel. If phase is not specified, both a phase 1 and phase 2 tunnel
are started. If IP addresses are supplied, the tunnel is setup using those IP addresses. If the IDs
used during the negotiation are not IP addresses, the local and remote host IDs must be entered
using the Virtual Private Networks Web-based System Manager Graphical User Interface (GUI)
panels. A unique tunnel number is created. The tunnel can then be referenced by the tunnel number
in the ike command to indicate the particular tunnel to be started.
Syntax ike cmd=activate [ phase=1|2 ] [numlist=tunnel_num_list] [ namelist=tunnel_name_list ] [
remid=remote_id ] [ipaddr=src_addr,dst_addr] [autostart]
Description The activate subcommand works using a two phase paradigm. A phase 1 tunnel must be
established before a phase 2 tunnel can be started. If a phase 1 tunnel is specified, then only the
phase 1 tunnel negotiation takes place. If a phase 2 tunnel is specified, the system checks for the
existence of the corresponding phase 1 tunnel before creating the phase 2 tunnel. If the phase 1
negotiation has not been started, it is started automatically.
Upon successful completion of a phase 2 tunnel, the tunnel definition and corresponding filter rules
are inserted into the IP Security kernel, and the new tunnel is activated. Traffic described by the
tunnel definition passing between the designated endpoints is protected by the encryption and
authentication algorithms indicated by the associated IKE security policy.
Multiple phase 2 tunnels can be started under the same phase 1 tunnel. A situation where this may
be desired is if different types of traffic between two endpoints need different levels of security
protection. The Security Association used for the phase 1 tunnel can be shared by multiple phase 2
tunnels. The phase 2 tunnels would specify the type of traffic (by protocol and port, or subnet mask,
for instance) and could have different security policies protecting them.
The ike command returns if either a negotiation has been initiated, an error returns, or the tunnel
already exists. Since the remote host must be contacted during the negotiation and the amount of
time needed to complete the negotiation is uncertain, the list subcommand should be used to
determine if the negotiation was successful.
Errors that are detected during the negotiation process can be captured by using syslog.
Note: Because each phase 2 tunnel must have an associated phase 1 tunnel, a phase 1 tunnel
is automatically activated before the phase 2 tunnel is activated.
list
Purpose Monitors the status of IP Security tunnels by phase. It is also used to view tunnel entries defined in
the IKE database.
Syntax ike cmd=list [phase=1|1+|2] [numlist= tunnel_num_list] [db | role=i|r] [verbose]
When used in conjunction with db, tunnels from the IKE Security Policy database are
shown.
Note: Active tunnel numbers and tunnel numbers from the IKE Tunnel Definitions database
do not necessarily match up. This is because a single tunnel entry in the database can
correspond to multiple active tunnels.
db Shows the entries in the database. If this flag is omitted, only active tunnels are displayed.
This cannot be used in conjunction with role. Supply the list of tunnel numbers which you
would like to view.
role Allows the display of tunnels by the point of initiation. If i is specified, then the tunnels that
were initiated by the local host are displayed. If r is specified, then the tunnels where the
local host acted as a responder are displayed. If this flag is omitted, both initiator and
responder tunnels are shown. This flag cannot be used in conjunction with db.
verbose
Shows extended information about the specified tunnels. If this flag is not specified, then
only a concise entry for each tunnel is shown.
Examples Note: Tunnel numbers from the database and tunnel numbers from the tunnel manager do not
necessarily reflect the same tunnel.
1. To perform a concise (short form) listing of phase 1 tunnels with entries in the tunnel manger,
enter:
ike cmd=list phase=1 numlist=1,2,3
These tunnels are either being negotiated, in the active state , or have expired. Only tunnels 1,
2, and 3 are listed. Tunnels can be either initiator or responder role.
2. To perform a concise (short form) listing of of the specified phase 2 tunnels in the database with
each preceded by the associated phase 1 tunnel, enter:
ike cmd=list phase=2 numlist=1-3 db
These are tunnels defined in the database which may or may not be currently active in the tunnel
manager. All tunnels in the database are used in the initiator role only.
3. To perform a verbose (long form) listing of a phase 1 tunnel followed by all of its associated
phase 2 tunnels from the tunnel manager, enter:
ike cmd=list phase=1+ role=r verbose
Only tunnels which were activated in the responder role are listed. All available tunnel numbers
are listed since no numlist was specified.
remove
log
Purpose Read the ISAKMP daemon log level from /etc/[Link] and start logging at that level.
Syntax ike cmd=log
Note: If the log level or the output file name in /etc/[Link] are changed, the refresh -s
syslogd command must also be run.
Description The log subcommand causes the ISAKMP daemon to read the log level from /etc/[Link],
and a filename from /etc/[Link]. The logging level specified is set and the log output, along
with other syslog output, is placed in the file specified.
Note: There are four valid logging levels for the ISAKMP daemon. They are none, errors,
events, and information. none means no logging, errors means logging of only ISAKMP
daemon errors will occur, events means errors and other ISAKMP daemon events will be
logged, and information is the highest level of logging which is all inclusive.
Files
/usr/sbin/ike Location of the ike admin commands.
/etc/[Link] Configuration file for the iksakmpd daemon.
/etc/[Link] Provides configuration information for the syslogd daemon.
Related Information
The syslog subroutine.
ikedb Command
Purpose
Retrieves, updates, deletes, imports, and exports information in the IKE database.
Syntax
ikedb -p[F s] [ -e entity-file ] [ XML-file ]
ikedb -x
ikedb -o
Description
The ikedb command allows the user to write to (put) or read from (get) the IKE database. The input and
output format is an Extensible Markup Language (XML) file. The format of an XML file is specified by its
Document Type Definition (DTD). The ikedb command allows the user to see the DTD that is used to
validate the XML file when doing a put. While entity declarations can be added to the DTD using the -e
flag, this is the only modification to the DTD that can be made.
Any external DOCTYPE declaration in the input XML file will be ignored and any internal DOCTYPE
declaration might result in an error. The rules followed to parse the XML file using the DTD are specified in
the XML standard. /usr/samples/ipsec has a sample of what a typical XML file that defines common
tunnel scenarios looks like.
Flags
-p Performs a put, which writes to the database, based on the given XML-file.
-F Forces a put, even if a specified tunnel, protection, proposal, group, or pre-shared key would
overwrite one that already exists in the database. The default is for such put attempts to fail.
-s Swaps the local and remote IDs of all tunnels. This facilitates importing a tunnel generated by a
peer machine. This flag only affects tunnels. This option is illegal if the remote ID of any tunnel is a
group.
-e entity-file
Specifies the name of the file containing the <!ENTITY ...> lines as defined by entity-file. These
lines are added to the internal DTD and allow the user to include XML files in other XML files.
XML-file
Specifies the XML-file to be used and must be the last argument to be displayed in the command
line. The XML-file determines whether the write is to a tunnel, protection, proposal, group,
pre-shared key, or all of these. If no XML-file is specified, input is read from stdin. A - (hyphen) can
also be used to specify stdin.
Files
/usr/samples/ipsec Examples of an XML file that sets up various tunnel configurations.
Examples
1. To put definitions to the IKE database from an XML file that has been generated on a peer machine
and overwrite any existing objects in the database with the same name, type:
ikedb -pFs peer_tunnel_conf.xml
peer_tunnel_conf.xml is the XML file generated on a peer machine.
imake Command
Purpose
C preprocessor interface to the make command.
Syntax
imake [ -DDefine ] [ -IDirectory ] [ -TTemplate ] [ -f FileName ] [ -C FileName ] [ -s FileName ] [ -e ] [ -v ]
Description
The imake command generates Makefiles from a template, a set of cpp macro functions, and a
per-directory input file called Imakefile. This command keeps machine dependencies (such as compiler
options, alternate command names, and special make command rules) separate from the descriptions of
the items to build.
imake invokes cpp with any -I or -D flags passed on the command line and passes to it the following three
lines:
#define IMAKE_TEMPLATE "[Link]"
#define INCLUDE_MAKEFILE "Imakefile"
#include IMAKE_TEMPLATE
The Imakefile file uses the macro functions to indicate what targets to build and the imake command
generates the appropriate rules.
Imake configuration files contain two types of variables, imake variables and make variables. The imake
variables are interpreted by cpp when the imake command is run. By convention, they are not
case-sensitive. The make variables are written into the Makefile for later interpretation by the make
command. By convention, make variables are uppercase.
The rules file (usually named [Link] in the configuration directory) contains a variety of cpp macro
functions that are configured according to the current platform. The imake command replaces any
occurrences of the string ``@@’’ with a newline ( carriage return ) to support macros that generate more
than one line of make rules. For example, the macro:
#define program_target(program, objlist) @@\
program: objlist @@\
$(CC) -o $@ objlist $(LDFLAGS)
On systems whose cpp reduces multiple tabs and spaces to a single space, the imake command attempts
to put back any necessary tabs (the make command distinguishes between tabs and spaces). For this
reason, precede all colons (:) in command lines by a backslash (\).
To build AIXwindows programs outside the source tree, a special symbol, UseInstalled, is defined and the
TOPDIR and CURDIR variables are omitted. If the configuration files are properly installed, you can use
the xmkmf command.
Note: The indented format indicates files that include other files.
[Link] generic variables
[Link] site-specific, BeforeVendorCF defined
*.cf machine-specific
*[Link] shared library
[Link] site-specific, AfterVendorCF defined
[Link] rules
[Link] X-specific variables
*[Link] shared library variables
Imakefile
[Link] library rules
[Link] server rules
[Link] multi-thread rules
Note: The [Link] file is included twice, both before and after the *.cf file. Although most site
customizations are specified after the *.cf file, some, such as the choice of compiler, need to be
specified before, because other variable settings may depend on them.
The first time the [Link] file is included, the BeforeVendorCF variable is defined, and the second
time, the AfterVendorCF variable is defined. All code in the [Link] file should be placed inside a
#ifdef macro for one of these symbols.
Flags
-DDefine Passed directly to cpp to set directory-specific variables. For example, X-windows uses this flag
to set the TOPDIR variable to the name of the directory containing the top of the core
distribution, and the CURDIR variable to the name of the current directory, relative to the top.
-e Indicates that the imake command should execute the generated Makefile. The default is to
leave this to the user.
-f FileName Specifies the name of the per-directory input file. The default is the Imakefile file.
-IDirectory (Uppercase i) Passed directly to cpp to indicate the directory in which the imake template and
configuration files are located.
-C FileName Specifies the name of the .c file that is constructed in the current directory. The default is
Imakefile.c.
-s FileName Specifies the name of the make description file to be generated, without invoking the make
command. If the FileName variable is a - (dash), the output is written to stdout. The default is
to generate, but not execute, a Makefile.
Environment Variables
Note: The following environment variables may be set, but their use is not recommended because
they introduce dependencies that are not readily apparent when the imake command is run.
IMAKEINCLUDE If defined, specifies an include argument for the C preprocessor. For example:
-I/usr/include/local
IMAKECPP If defined, specifies a valid path to a preprocessor program. For example:
/usr/local/cpp
Example
imake -I/usr/lib/X11/config -DTOPDIR=/usr/lpp/X11/Xamples
Files
/usr/tmp/[Link] Specifies the temporary input file for the cpp preprocessor.
/usr/tmp/[Link] Specifies the temporary input file for make.
/lib/cpp The default C preprocessor.
Related Information
The make command, xmkmf command.
imapd Daemon
Purpose
Starts the Internet Message Access Protocol (IMAP) server process.
Syntax
imapd [-c]
Description
The imapd command is an IMAP4 server. It supports the IMAP4 remote mail access protocol. Also, it
accepts commands on its standard input and responds on its standard output. You normally invoke the
imapd command with the inetd daemon with those descriptors attached to a remote client connection.
The imapd command works with the existing mail infrastructure consisting of sendmail and bellmail.
Flags
-c Suppresses the reverse host name lookup.
Security
The imapd daemon is a PAM-enabled application with a service name of imap. System-wide configuration
to use PAM for authentication is set by modifying the value of the auth_type attribute, in the usw stanza
of /etc/security/[Link], to PAM_AUTH as the root user.
The authentication mechanisms used when PAM is enabled depend on the configuration for the imap
service in /etc/[Link]. The imapd daemon requires /etc/[Link] entries for the auth and session
module types. Listed below is a recommended configuration in /etc/[Link] for the imap service:
#
# AIX imap configuration
#
imap auth required /usr/lib/security/pam_aix
Files
/usr/sbin/imapd Contains the imapd command.
/etc/services Specifies the file with port assignments for required services. The following entry must
be in this file:
imap2 143/tcp # Internet Mail Access Protocol
Related Information
The pop3d daemon.
imapds Daemon
Purpose
Starts the Internet Message Access Protocol (IMAP) server process over TSL/SSL.
Syntax
imapds [-c]
Description
The imapds command is an IMAP4 server. It supports the IMAP4 remote mail access protocol. Also, it
accepts commands on its standard input and responds on its standard output. You normally invoke the
imapds command with the inetd daemon with those descriptors attached to a remote client connection.
The imapds command works with the existing mail infrastructure consisting of sendmail and bellmail.
Flags
-c Suppresses the reverse host name lookup.
Exit Status
All error and status information is written to a logfile if syslogd is configured for logging.
The authentication mechanisms used when PAM is enabled depend on the configuration for the imap
service in /etc/[Link]. The imapds daemon requires /etc/[Link] entries for the auth and session
module types. Listed below is a recommended configuration in /etc/[Link] for the imap service:
#
# AIX imap configuration
#
imap auth required /usr/lib/security/pam_aix
Files
/usr/sbin/imapds Contains the imapds command.
/etc/services Specifies the file with port assignments for required services. The following entry must
be in this file:
imaps 993/tcp # imap4 protocol over TLS/SSL
Related Information
The pop3ds daemon.
impfilt Command
Purpose
Imports filter rules from an export file.
Syntax
impfilt [ -v 4|6] -f directory [ -l filt_id_list]
Description
Use the impfilt command to import filter rules from text export file(s) that are generated by the expfilt
command. IPsec filter rules for this command can be configured using the genfilt command, IPsec smit
(IP version 4 or IP version 6), or Web-based System Manager in the Virtual Private Network submenu.
Flags
-v IP version of the rules to be imported. The value of 4 specifies IP version 4 and the value of 6 specifies
IP version 6. When this flag is not used, both IP version 4 and IP version 6 are imported.
-f Specifies the directory where the imported text files are to be read.
-l Lists the IDs of the filter rules to be imported. The filter rule IDs can be separated by ″,″. If this flag is not
used, all filter rules for the applicable IP version(s) in the text export files will be imported.
Related Information
The expfilt command.
Purpose
Imports a new volume group definition from a set of physical volumes.
Syntax
importvg [ -V MajorNumber ] [ -y VolumeGroup ] [ -f ] [ -c ] [ -x ] | [ -L VolumeGroup ] [ -n ] [ -F ] [ -R ] [ -I
] PhysicalVolume
Description
Attention: When you issue the importvg command to a previously defined volume group, the
QUORUM and AUTO ON values will be reset to volume group default values. You should verify the
parameters of the newly imported volume group with the lsvg command and change any values with
the chvg command.
The importvg command makes the previously exported volume group known to the system. The
PhysicalVolume parameter specifies only one physical volume to identify the volume group; any remaining
physical volumes (those belonging to the same volume group) are found by the importvg command and
included in the import. An imported volume group is automatically varied unless the volume group is
Concurrent Capable. You must use the varyonvg command to activate Concurrent Capable volume
groups before you access them.
When a volume group with file systems is imported, the /etc/filesystems file is updated with values for the
new logical volumes and mount points. After importing the volume group and activating it with the
varyonvg command, you must run the fsck command before the file systems can be mounted. However,
the mount point information would be missing from the LVCB (logical volume control block) if it is longer
than 128 characters. In this case, the importvg command will not be able to update the /etc/filesystems
file with the stanza for the newly imported logical volume. You should manually edit the /etc/filesystems
file to add a new stanza for this logical volume.
The importvg command changes the name of a logical volume if the name already exists in the system. It
prints a message and the new name to standard error, and updates the /etc/filesystems file to include the
new logical volume name.
Notes:
1. To use this command, you must either have root user authority or be a member of the system
group.
2. AIX Version 4 changed the behavior of importvg so that as part of the importvg process, the
volume group is automatically varied on by the system after it is imported. However, if the volume
group is Concurrent Capable then the importvg command prompts you to varyonvg the
imported volume group manually.
3. A volume group with a mirrored striped logical volume cannot be back ported into a version older
than AIX 4.3.3.
You can use the Volumes application in Web-based System Manager (wsm) to change volume
characteristics. You could also use the System Management Interface Tool (SMIT) smit importvg fast
path to run this command.
Flags
-c This flag is ignored. On AIX 5.2 and higher only Enhanced Concurrent Capable volume
groups will be created.
-f Forces the volume group to be varied online.
Restrictions:
1. The volume group must not be in an active state on the system executing the -L
flag.
2. The volume group’s disks must be unlocked on all systems that have the volume
group varied on and operational. Volume groups and their disks may be unlocked,
remain active and used via the varyonvg -b -u command.
3. The physical volume name provided must be of a good and known state, the disk
named may not be in the missing or removed state.
4. If an active node has both added AND deleted logical volumes on the volume
group, the -L flag may produce inconsistent results. The -L flag should be used
after each addition or deletion, rather than being deferred until after a sequence of
changes.
5. If a logical volume name clash is detected, the command will fail. Unlike the basic
importvg actions, clashing logical volume names will not be renamed.
-F Provides a fast version of importvg that checks the Volume Group Descriptor Areas of
only the disks that are members of the same volume group. As a result, if a user
exercises this flag, they must ensure that all physical volumes in the volume group are
in a good and known state. If this flag is used on a volume group where a disk may be
in missing or removed state, the command may fail or the results may be inconsistent.
-I Causes the importvg command to fail if imfs fails.
-n Causes the volume not to be varied at the completion of the volume group import into
the system.
-R Restores the ownership, group ID, and permissions of the logical volume special device
files. These values will be restored only if they were set using U, G and P flags of mklv
and chlv commands. This flag is applicable only for scalable and big vg format volume
groups.
-V MajorNumber Specifies the major number of the imported volume group.
-x This flag is ignored. On AIX 5.2 and higher only Enhanced Concurrent Capable volume
groups will be created.
Attention: This entry must be added after the entry used to initiate srcmstr.
-y VolumeGroup Specifies the name to use for the new volume group. If this flag is not used, the system
automatically generates a new name.
The volume group name can only contain the following characters: ″A″ through ″Z,″ ″a″
through ″z,″ ″0″ through ″9,″ or ″_″ (the underscore), ″-″ (the minus sign), or ″.″ (the
period). All other characters are considered invalid.
Examples
1. To import the volume group bkvg from physical volume hdisk07, enter:
Related Information
The exportvg command, varyonvg command.
The Logical volume storage in Operating system and device management explains the Logical Volume
Manager, physical volumes, logical volumes, volume groups, organization, ensuring data integrity, and
allocation characteristics.
For information on installing the Web-based System Manager, see Chapter 2: Installation and System
Requirements in AIX 5L Version 5.3 Web-based System Manager Administration Guide.
The System management interface tool in Operating system and device management explains the
structure, main menus, and tasks that are done with SMIT.
imptun Command
Purpose
Adds the exported tunnel definitions and optional user-defined filter rules associated with the tunnels to the
local host.
Syntax
imptun -f directory [ -t tunnel_id_list ] [ -v 4 | 6 ] [ -n ] [ -r ] [ -g ] [ -l manual ]
Description
Use the imptun command to add exported tunnel definitions and optional user-defined filter rules
associated with the exported tunnels (files generated by the tunnel owner by using the exptun command)
to the local host. This command can also import tunnel definitions from the exported files generated by the
IBM firewall (SNG) product export command.
A new tunnel ID is generated by the local host when a tunnel is imported to the local tunnel table. The
auto-generated filter rules associated with the tunnel also is generated automatically. Importing the
exported user-defined filter rules is optional.
If the exported files are transmitted by diskette, it is assumed they will be loaded to a local file directory
using a command such as tar, depending on the tunnel owner’s instructions.
Flags
-f Specifies the directory from where the exported files will be read.
-g The suppress system auto-generated filter rule flag. If the -g flag is not used, the imptun command
generates two filter rules for each imported tunnel automatically. The auto-generated filter rules allow all
traffic between the two end points of the tunnel to go through the tunnel. If the -g flag is specified, the
command only imports the tunnel ibm definitions, and the user must add user-defined filter rules to use
the tunnel.
-l Specifies the type of the tunnel(s) you want to import. If manual is specified, only manual tunnel(s) are
imported. -n and -l flags are mutually exclusive.
-n Specifies that the export files were generated by the IBM firewall (version 2.2) tunnel export command.
This flag cannot be specified with the -v flag. The -n flag is also mutually exclusive with the -r flag.
Related Information
The gentun command, chtun command, rmtun command, exptun command, mktun command, and
lstun command.
inc Command
Purpose
Files new mail in a folder.
Syntax
inc [ + Folder ] [ -noaudit | -audit File ] [ -changecur | -nochangecur ] [ -form FormFile | -format String
] [ -help] [ -file File ] [ -truncate | -notruncate ] [ -nosilent | -silent ] [ -width Number ]
Description
The inc command files incoming mail in a specified folder and outputs a list of the messages filed. A folder
is a system directory. By default, the inc command removes the new messages from your mail drop and
places them in the specified folder. To file new mail without deleting the mail drop, use the -notruncate
flag.
If the specified folder does not exist, the inc command prompts you for permission to create it. The system
creates the folder as a subdirectory of the user’s Message Handler (MH) directory. The default folder is
inbox.
Note: If you do not have a Path: entry specified in your .mh_profile file, the inc command creates
the folder as a subdirectory of the current directory.
Filed messages are assigned consecutive message numbers starting with the next highest number in the
folder. Each new message receives the protection code specified in the Msg-Protect: entry in your
.mh_profile file. If the Msg-Protect: entry does not exist, a protection code of 644 is assigned. If the
Unseen-Sequence: entry exists, new messages are added to each sequence specified by the entry.
Flags
-audit File Copies the current date to the specified file and appends the output of the inc command
to the file.
-changecur Sets the first new message as the current message for the specified folder. This flag is
the default.
-file File Files messages from the specified file instead of the user’s maildrop.
+Folder Specifies the folder in which to place new messages. By default, the system creates a
subdirectory called inbox in the user’s MH directory.
-form FormFile Identifies a file that contains an alternate output format for the inc command.
-format String Specifies a string that defines an alternate output format for the inc command.
Note: For MH, the name of this flag must be fully spelled out.
-noaudit Suppresses recording of information about any new messages filed. This is the default.
-nochangecur Prevents alteration of the current message for the specified folder.
-nosilent Prompts the user for any necessary information. This flag is the default.
-notruncate Prevents clearing of the mailbox or file from which the inc command is taking new
messages. If the -file flag is specified, the -notruncate flag is the default.
-silent Prevents prompting by the inc command for information. This flag is useful when running
the inc command in the background.
-truncate Clears the mailbox or file from which the inc command is taking new messages. If the
-file flag is not specified, the -truncate flag is the default.
-width Number Sets the number of columns in the command output. The default is the width of the
display.
Profile Entries
The following entries are entered in the UserMhDirectory/.mh_profile file:
Examples
1. To incorporate new mail into the default mail folder, inbox, enter:
inc
If the inbox folder exists, the system displays a message similar to the following:
Incorporating new mail into inbox...
65+ 04/08 [email protected] Meeting <<The meeting will
66 04/08 [email protected] Schedule <<Schedule change
In this example, two messages are filed in the inbox folder. The subject of the first message is
Meeting, and the first line starts with the words The meeting will. The subject of the second message
is Schedule, and the first line starts with the words Schedule change.
2. To incorporate new mail into a new folder called testcases, enter:
inc +testcases
Related Information
The mhmail command, post command, scan command.
indent Command
Purpose
Reformats a C language program.
Syntax
indent InputFile [ OutputFile ] [ -nbad | -bad ] [ -nbap | -bap ] [ -nbbb | -bbb ] [ -nbc | -bc ] [ -br | -bl] [
-cn] [ -cdn ] [ -ncdb | -cdb ] [ -nce | -ce ] [ -cin ] [ -clin ] [ -dn ] [ -din ] [ -ndj | -dj ] [ -nei | -ei ] [ -fa ] [
-nfa ] [ -nfc1 | -fc1 ] [ -in ] [ -nip | -ip ] [ -ln ] [ -lcn ] [ -nlp | -lp ] [ -npro ] [ -npcs | -pcs ] [ -nps | -ps ] [
-npsl | -psl ] [ -nsc | -sc ] [ -nsob | -sob ] [ -nslb | -slb ] [ -st ] [ -troff ] [ -nv | -v ] [ -TType ] ...
Description
The indent command reformats a C program as specified by flags entered with the command.
If you only specify the InputFile parameter, the reformatted file is written back into the InputFile parameter
and a backup copy of the InputFile parameter is written in the current directory with a .BAK filename
suffix.
If you specify the OutputFile parameter, the indent command checks to make sure its name is different
from the InputFile parameter.
To set up your own profile of defaults for the indent command, create a file called .[Link] in your
login directory or the current directory. In this file, include as many flags as desired, separated by spaces,
tabs, or new lines.
Flags in the .[Link] file in the current directory override those in your login directory (with the
exception of -TType flags, which accumulate). If the indent command is run and a profile file exists, the
profile file is read to set up the defaults of the program. Flags on the command line, however, override
profile flags.
Comment Handling
The indent command assumes that any comment with a - (dash) or * (asterisk) immediately after the start
of a comment marker (/*- or /**) is a comment surrounded by asterisks. Each line of the comment is left
unchanged, except for its indentation. This indentation can be adjusted to account for the change in
indentation of the first line of the comment.
All other comments are treated as text. The indent command fits as many words (separated by blanks,
tabs, or new-lines) on a line as possible. Blank lines break paragraphs.
If a comment is on a line with code, it is started in the comment column set by the -cn flag. Otherwise, the
comment is started at n indentation levels less than where code is currently being placed, where n is
specified by the -dn flag. If the code on a line extends past the comment column, the comment starts
further to the right. The right margin can be extended automatically in extreme cases.
C Syntax Handling
The parser built into the indent command attempts to cope with incomplete and misformed syntax. In
particular, the use of macros like:
#define forever for(;;)
is handled properly. For best results, use the indent command on source that is syntactically correct.
Flags
Note: Flags can appear before or after file names.
This flag is active unless turned off with the -bl flag.
-cn Sets the initial tab position for comments on code to the n variable. The default value is 33.
-cdn Sets the initial tab position for comments on declarations to the n variable. By default, this flag uses the
value defined with the -c flag.
-cdb Enables placing comment delimiters on blank lines; active unless turned off with the -ncdb flag. The -cdb
flag affects only block comments, not comments to the right of code. Resulting comments look like the
following:
/*
* this is a comment
*/
-ncdb Disables placing comment delimiters on blank lines. The -ncdb flag affects only block comments, not
comments to the right of code. Resulting comments look like the following:
/* this is a comment */
-ce Enables forcing else statements to follow the immediately preceding } (left bracket); active unless turned
off with the -nce flag.
-nce Disables forcing else statements to follow the immediately preceding } (left bracket).
Attention: The possibility of changing the meaning of the code exists if the code was meant for the
ANSI compiler. For example, A=-B becomes A-=B.
Note: Use no spaces between operators. If the user means subtraction, then the flipping is
necessary; on the other hand, if the user means A equals the negative of B, the flipping alters the
meaning.
-nfa Suppresses flipping the operators. Use this flag if the code is written for an ANSI compiler.
-fc1 Enables formatting comments that start in column 1; active unless turned off with the -nfc1 flag.
-nfc1 Disables formatting comments that start in column 1.
-in Sets the indentation level size. By default, the level size is 8 positions.
-ip Enables indenting parameter declarations; active unless turned off with the -nip flag.
-nip Disables indenting parameter declarations.
-ln Sets the maximum column position of comments that are to the right of the code. If the comment does
not fit on a line, a maximum of 25 characters are printed.
-lcn Sets the maximum line length for block comments to the n variable. By default, this flag uses the length
specified with the -l flag.
-lp Aligns code surrounded by parentheses in continuation lines; active unless turned off with the -nlp flag. If
a line has a left parenthesis with no matching right parenthesis on that line, continuation lines start at the
position following the left parenthesis.
Examples
1. To format the test.c file using the default settings of the indent command and place the output into
the newtest.c file, enter:
indent test.c newtest.c
2. To format the test.c file so that a blank line is forced after every block of declarations and procedure
body, use all other default settings, and store the output in the newtest.c file, enter:
indent test.c newtest.c -bad -bap
3. To format the test.c file using the default settings of the indent command and to define uint as a
type keyword recognizable to the indent command, enter:
indent test.c newtest.c -Tuint
Files
./.[Link] Contains the profile file.
$HOME/.[Link] Contains the profile file.
/usr/ccs/bin/indent Contains the indent command.
Related Information
The cb command.
indxbib Command
Purpose
Builds an inverted index for a bibliography.
Description
The indxbib command makes an inverted index to the named database (or files) for use by the lookbib
and refer commands. These files contain bibliographic references (or other kinds of information) separated
by blank lines.
Note: The indxbib command expects the database to exist in the current working directory.
A bibliographic reference is a set of lines, constituting fields of bibliographic information. Each field starts
on a line beginning with a % (percent sign), followed by a key letter, then a space character, and finally the
contents of the field, which can continue until the next line starting with a % (percent sign). All key letters
are ASCII characters.
The indxbib command is a shell script that calls the /usr/lib/refer/mkey and /usr/lib/refer/inv files. The
first program, mkey, performs the following operations:
1. Truncates words (delimited by blanks or tabs) to six characters.
2. Maps uppercase to lowercase characters.
3. Discards words shorter than three characters.
4. Discards the most commonly used words according to an existing ign file. An English language file,
/usr/lib/eign, has been provided with a list of common English words. It is suggested, but not
necessary, that users create their own files, named ign, consisting of language-specific common
words. This file, if created, should exist in the /usr/lib/nls/msg/$LANG directory.
5. Discards numbers (dates) less than 1900 or greater than 2099.
Note: All dates should be indexed because many disciplines refer to literature written in the 1800s or
earlier.
The second program, inv, creates in the working directory an entry file (.ia), a posting file (.ib), and a tag
file (.ic).
Files
/usr/lib/eign Contains the default list of common words the indxbib command discards while
processing.
[Link] Contains the entry file.
[Link] Contains the posting file.
[Link] Contains the tag file.
Environment Variables
NLSPATH Refers to a list of directory names where the message catalog files can be found.
Related Information
The addbib command, lookbib command, refer command, roffbib command, sortbib command.
Purpose
Provides Internet service management for a network.
Syntax
Note: Use SRC commands to control the inetd daemon from the command line. Use the [Link] file
to start the daemon with each system restart.
Description
The /usr/sbin/inetd daemon provides Internet service management for a network. This daemon reduces
system load by invoking other daemons only when they are needed and by providing several simple
Internet services internally without invoking other daemons.
The inetd daemon starts by default each time you start your system. When the daemon starts, it reads its
configuration information from the file specified in the ConfigurationFile parameter. If the parameter is not
specified, the inetd daemon reads its configuration information from the /etc/[Link] file.
Once started, the inetd daemon listens for connections on certain Internet sockets in the /etc/[Link].
The /etc/[Link] file describes to the inetd daemon how Internet service requests on Internet sockets
should be handled. When the inetd daemon receives a request on one of these sockets, it determines
which service corresponds to that socket and then either handles the service request itself or invokes the
appropriate server.
The ftpd, rlogind, rexecd, rshd, talkd, telnetd, and uucpd daemons are started by default. The tftpd,
fingerd, and comsat daemons are not started by default unless they are uncommented in the
/etc/[Link] file.
If you change the /etc/[Link], using SMIT, then the inetd daemon will be refreshed automatically and
will read the new /etc/[Link] file. If you change the file using your favorite editor, run the refresh -s
inetd or kill -1 InetdPID command to inform the inetd daemon of the changes to its configuration file.
stream
dgram
sunrpc_udp
sunrpc_tcp
Protocol Specifies the Internet Protocol used for the Internet service. Valid values are:
tcp
tcp6
udp
udp6
Wait/Nowait Specifies whether the inetd daemon should wait for the service to complete before continuing
to listen for this type of service request.
Wait/Nowait Specifies whether the inetd daemon should wait for the service to complete before continuing
to listen for this type of service request. SRC works like wait, but instead of forking and
waiting for the child to die, it does a startsrc on the subsystem and store information about
the starting of the service. When the service is removed from the [Link] file and inetd is
restarted, the service has a stopsrc issued to the service to stop it.
User Specifies the user name that inetd should use to start the subserver.
Path Specifies the fully qualified path name that inetd should execute to provide the service. For
services that inetd provides internally, this entry should be internal.
Command Specifies the name of the service to start and its parameters. This field is empty for internal
services.
The inetd daemon can be run with or without the SRC. In addition, the inetd daemon can be controlled by
issuing signals using the kill command.
Flags
-d Sends debugging messages to the syslogd daemon.
-t SecondsToWait Specifies the number of seconds to wait in the select() system call before looping.
The SecondsToWait can be a number from 1 to 999999. Without this flag the inetd
daemon will block until one of the active services is requested by a network
connection. This flag should only be used when a machine is servicing many wait
services like tftp and is not being used for other services. Since timing out the
select() system call will cause the inetd daemon to use more CPU cycles, this flag is
not recomended for most situations.
Service Requests
The Internet service requests that are supported internally by the inetd daemon are generally used for
debugging. They include the following internal services:
The [Link] file format, protocols file format, services file format.
infocmp Command
Purpose
Manages terminfo descriptions.
Syntax
infocmp [ -d] [ -c] [ -n] [ -I] [ -L] [ -C] [ -r] [ -u] [ -s { d| i| l| c}] [ -v] [ -V] [ -1] [ -w Width] [ -A Directory] [ -B
Directory] [TermName...]
Description
The infocmp command manages terminfo descriptions. You can use this command to:
v Compare a binary terminfo entry with other terminfo entries.
v Print a terminfo description from the binary file.
v Rewrite a terminfo description to take advantage of the use attribute.
The infocmp command prints the Boolean attributes first, the numeric attributes second, and the string
attributes last.
Comparing Entries
Use the -d, -c, and -n flags to compare entries. The -d flag returns the differences between entries. The -c
flag produces a list of the capabilities that are set and in common between two entries. The -n flag returns
a list of the capabilities that neither entry has.
To compare terminfo entries, you specify two or more TermName parameters. The infocmp command
compares the terminfo description of the first TermName parameter with each of the descriptions for the
subsequent TermNames specified. If a capability is defined for only one of the terminal descriptions, the
value returned will depend on the type of capability. For Boolean capabilities the infocmp command
returns an F, the command returns a -1 for integer capabilities, and null for string capabilities.
The I (uppercase i) flag produces a listing with the terminfo names. The -L flag produces a listing using
the long C variable names listed in /usr/include/term.h.
The -C flag uses termcap names instead of terminfo capability names when producing the source listing.
The infocmp commands translates and outputs only those terminfo capabilities that have a
corresponding termcap code name. To remove this restriction, specifying the -r flag. This flag causes the
command to output terminfo capabilities that cannot be translated into termcap format.
Note: The -C and -r flags cannot always convert a terminfo string into its equivalent termcap form.
Similarly, a conversion from the termcap file format back into the terminfo file format does not
necessarily reproduce the original source.
When you specify the -u flag and a list of terminal names, the infocmp command does the following:
v Compares subsequent terminal descriptions against the first.
v Creates a description of the first terminal you specified relative to the description of the other terminals.
The new description for the first terminal will have the following:
v Capabilities that exist in the subsequent terminals but do not exist for the first terminal will appear with
an @ in the resulting description.
You can change a description and specify a capability after the use attribute. If this capability is also found
in the terminal referenced by the use attribute, the second capability takes precedence over the one
referenced by the use attribute.
Changing Databases
By default, terminal descriptions appear in the system terminfo database directory, /usr/share/lib/
terminfo. You can specify a different database location with the TERMINFO environment variable. The
infocmp command first checks to see if this variable exists. If the variable does not exist, the command
uses the system terminfo database.
You can use the -A and -B flag with the infocmp command to override the system database. The -A flag
identifies the terminfo database for the first TermName parameter. The -B flag identifies the database to
use for any subsequent terminals you name. Together, these flags make it possible to compare
descriptions for two terminals with the same name located in two different databases.
Flags
-A Directory Identifies the terminfo database for the first TermName parameter.
-B Directory Identifies the terminfo database for every TermName parameter except the first.
-C Uses the termcap code names to produce the source listing. Will not list terminfo
capabilities that cannot be translated to termcap format.
If you do not specify an option with the -s flag, the command sorts each capability
alphabetically by the terminfo name within each type. If you specify the -C or the -L
flags with the -s flag, the capabilities are sorted by the termcap name or the long C
variable name, respectively.
-u Compares two or more terminal descriptions and produces new descriptions using the
use attribute.
-v Prints out tracing information on standard error.
-V Prints out the version of the program in use on standard error and exits.
-w Width Changes the output to the specified number of characters per line. The output
includes as many fields as possible that can fit within the specified number of
characters.
Examples
1. To list the common capabilities between the aixterm and lft terminals, enter:
infocmp -c aixterm lft
2. To list all of the capabilities that are possible but do not currently exist for the current terminal, enter:
infocmp -n
3. To produce a source listing for the lft terminal in terminfo format, enter:
infocmp -I lft
4. To produce a source listing for the terminal description my_term that is located in /tmp using as much
of the lft description as possible, enter:
infocmp -A /tmp -u my_term lft
File
/usr/share/lib/terminfo Contains the compiled terminal description database.
infocenter Command
Purpose
Starts the Information Center in a browser window.
Syntax
infocenter
Description
The infocenter command starts the Information Center in a browser window. The Information Center is
the primary location for finding information about your system. With the Information Center you can
navigate and search the documentation. The Information Center can also be started by clicking the
Information Center icon on the Help panel available from the CDE toolbar.
Note: The Information Center is available only by means of an HTML browser. If the default URL is an
external address, then access to the Internet is required. The infocenter command (and the
Information Center icon) activates the browser and directs the browser to the Web address of the
Information Center.
The actual Information Center brought up by the command depends on how it was configured. If no
Information Center files have been installed or no configuration has been done, the Information Center that
appears in the browser window is the default specified in the /usr/lpp/bosinst/[Link] file. If
the Information Center has been installed on a system within an intranet, using Configuration Assistant,
SMIT, or Web-based System Manager, then the server specified during the configuration process is used
as the documentation server.
The Web address of the Information Center is in the /usr/lpp/bosinst/[Link] file. If the
Information Center Web address is provided in this file, it will be in the following format:
export INFORMATION_CENTER_URL=information center url
If a line similar to this does not exist in the /usr/lpp/bosinst/[Link] file, or if the file does not
exist and the Information Center has not been configured to use a documentation server, the user will
receive a message indicating that the Information Center cannot start because an Information Center URL
was not found.
Files
/usr/sbin/infocenter Starts the Information Center in a browser window.
/usr/lpp/bosinst/[Link] Contains vendor profile information including the Web address used
by the infocenter command.
install Command
Purpose
Installs a command.
Description
The install command installs a specified file in a specific place within a file system. It is most often used in
makefiles. When replacing files, the install command copies (or moves) each file into the appropriate
directory, thereby retaining the original owner and permissions based on the behavior of the cp and mv
commands. An attempt is made to change the destination to owner bin and group bin. The -O Owner and
-G Group flags can be used to specify a different owner or group. The install command writes a message
telling you exactly which files it is replacing or creating and where they are going.
You must be a super-user if you want to specify the ownership of the installed file with the -O or -G flags.
If you do not specify the Directory parameter, the install command searches a set of default directories
(/usr/bin, /etc, and /usr/lib, in that order) for a file with the same name as the File parameter. The first
time it finds one, it overwrites it with File and issues a message indicating that it has done so. If a match is
not found, the install command issues a message telling you there was no match and exits with no further
action. If the File parameter does not exist in the current directory, the install command displays an error
message and exits with a nonzero value.
If any directories are specified on the command line, the install command searches them before it
searches the default directories.
Flags
-c DirectoryA Installs a new command file in the DirectoryA variable only if that file does not already exist
there. If it finds a copy of File there, it issues a message and exits without overwriting the
file. This flag can be used alone or with the -s, -M, -O, -G, or -S flag.
-f DirectoryB Forces installation of File in DirectoryB whether or not File already exists. If the file being
installed does not already exist, the command sets the permission code and owner of the
new file to 755 and bin, respectively. This flag can be used alone or with the -o,-s, -M, -O,
-G, or -S flag.
-G Group Specifies a different group for the destination file. The default group is bin.
-i Ignores the default directory list and searches only those directories specified on the
command line. This flag cannot be used with the -c, -f, or -m flags.
-m Moves the File parameter to the directory instead of being copied. Cannot be used with the
-c, -f, -i, or -n flag.
-M Mode Specifies the mode of the destination file.
-n DirectoryC Installs the File parameter in the DirectoryC variable if it is not in any of the searched
directories, and sets the permissions and owner of the file to 755 and bin, respectively.
This flag cannot be used with the -c, -f, or -m flag.
-o Saves the old copy of the File parameter by copying it into a file called OLDFile in the
same directory. This flag cannot be used with the -c flag.
-O Owner Specifies a different owner of the destination file. The default owner is bin.
-s Suppresses the display of all but error messages.
-S Causes the binary to be stripped after installation.
Examples
1. To replace a command that already exists in one of the default directories, enter:
install fixit
This replaces the fixit file if it is found in the /etc or /usr/games directory or in one of the default
directories. Otherwise the fixit file is not installed. If the file is replaced, the old version is preserved by
renaming it OLDfixit in the directory in which it was found.
3. To replace a command that already exists in a specified directory, enter:
This replaces the fixit file if it is found in the /home/jim/bin, /home/joan/bin, or /usr/games directory.
Otherwise, the file is not installed.
4. To replace a command found in a default directory or install it in a specified directory if it is not found,
enter:
This replaces the fixit file if it is found in one of the default directories. If the file is not found, it is
installed as /usr/bin/fixit.
5. To install a new command, enter:
This creates a new command by installing a copy of the fixit file as /usr/bin/fixit, but only if this file
does not already exist.
6. To install a command in a specified directory whether or not it already exists, enter:
This forces the fixit file to be installed as /usr/bin/fixit whether or not it already exists. The old
version, if any, is preserved by moving it to /usr/bin/OLDfixit (a result of the -o flag). The messages
that tell where the new command is installed are suppressed (a result of the -s flag).
Compatibility
For compatibility with Berkeley Software Distribution (BSD), two install commands exist. See the
installbsd command.
Files
/usr/bin/install Contains the install command.
Related Information
The chgrp command, chmod command, chown command, cp command, installbsd command, make
command, mv command, strip command.
Purpose
Updates installed software to the latest level on media and verifies the current recommended maintenance
or technology level.
Syntax
install_all_updates -d Device [ -p ] [ -i ] [ -c ] [ -r ] [ -n ] [ -s ] [ -x ] [ -v ] [ -N ] [ -S ] [ -Y ] [ -V ] [ -D ]
Description
install_all_updates examines currently installed software and attempts to update it to the latest level that
is available on the media. install_all_updates will not install any file sets that are present on the media,
but not installed on the system except in the following situations:
v the new file sets are installed as requites of other file sets.
v the /var/adm/ras/[Link] file sets ALL_DEVICES_KERNELS to yes.
For installp images, all installp requisites are enforced.
Notes:
1. Currently, install_all_updates processes installp images and rpm images. Because the rpm utility
does not support automatic installation of requisites, some rpm software may not be installable with
install_all_updates.
2. install_all_updates verifies the current recommended maintenance or technology level by using the
″oslevel″ utility and checking with the latest recommended maintenance or technology level known to
this version of install_all_updates.
3. If install_all_updates locates an update to the install utilities (the [Link] fileset), it first installs
the update and then reinvokes itself to process the remaining updates. The ″-i″ flag can be used to
update the install utilities only, this is useful when attempting to view an accurate preview.
4. install_all_updates applies all installp updates unless the COMMIT flag (-c) is specified. For more
information of APPLY vs. COMMIT please see the installp man page.
5. install_all_updates will by default instruct installp to automatically install requisites and to do any
necessary filesystem expansions. The ″-n″ will override the install requisite default, and ″-x″ will
override the filesystem expansion default.
6. The following flags apply to installp updates only: -c, -n, -x, -v, -S, and -V.
Flags
-c Instructs installp to commit all newly installed updates. Updates are applied by default (Please see
the installp man page for more explanation on applying vs. committing updates).
-d Device Specifies where the installation media can be found. This can be a hardware device such as tape or
cdrom or it can be a directory that contains installation images. When installation media is a tape
device it should be specified as no-rewind-on-close and no-retension-on-open.
-D Turns on install_all_updates debug output. This flag is for debugging the install_all_updates utility
and should not be used for normal operations.
-i Update install utilities only.
-n Instructs installp to not automatically install requisites. Automatic installation of requisites is the
default behavior.
-N Skip updating install utilities first.
Note: This flag is not recommended unless you are debugging a related problem.
-p Performs a preview of an action by running all preinstallation checks for the specified action. No
software changes are made.
-r Update rpm images (if possible). This flag is not set by default.
Exit Status
0 All lppmgr related operations completed successfully.
>0 An error occurred.
Security
Only the root user can execute install_all_updates.
Examples
1. To install all installp updates on device /dev/cd0 and to verify the current recommended maintenance
or technology level, enter:
install_all_updates -d /dev/cd0
2. To commit install all installp updates and install any installable rpm updates in directory /images, enter:
install_all_updates -d /images -rc
3. To install the latest level of install utilities on device /dev/cd0 ([Link] installp fileset), enter:
install_all_updates -d /dev/cd0 -i
Files
/usr/sbin/install_all_updates Contains the install_all_updates command.
Related Information
The installpl command, lslpp command, rpm commnand
install_assist Command
Purpose
Starts the Installation Assistant application.
Syntax
install_assist
Description
The install_assist command starts Installation Assistant, an application designed to simplify the
customization of your system after a Base Operating System (BOS) installation. The Installation Assistant
guides you through post-installation tasks and, in some cases, automatically installs software packages for
you. The Installation Assistant has two interfaces, ASCII and graphical. The interface that displays is based
on your terminal type (defined in the TERM environment variable).
On a system with an ASCII interface, the newly installed BOS reboots and starts the Installation Assistant
to guide you through completing configuration tasks. You must have root user authority to use the
Installation Assistant. To access the Installation Assistant later, type install_assist on the command line.
You can also access it from a graphics system through the SMIT smit assist fast path. If there are
outstanding software license agreements that must be accepted before you can continue to use the
machine, the Installation Assistant prompts you to view and accept these agreements.
On a system with a graphical interface, the newly installed BOS reboots and the Configuration Assistant
starts to guide you through the configuration tasks. If there are outstanding software license agreements
that must be accepted before you can continue to use the machine, the Configuration Assistant prompts
you to view and accept these agreements. To access the Configuration Assistant later, type configassist
on the command line.
Most Installation Assistant tasks create or add to the [Link] and [Link] files in your home directory.
(These are the same files appended when you run a SMIT session.) The commands built and run by the
Installation Assistant tasks are added to the end of the [Link] file along with the command output. The
time, name of the task, and the command (flags and parameters included) are added to the end of the
[Link] file in a format that can easily be used to create executable shell scripts.
Example
1. To start the Installation Assistant, type:
install_assist
2. To access the Configuration Assistant, type:
configassist
3. Access the Installation Assistant from a graphical interface, use the SMIT smit assist fast path.
Files
[Link] Specifies detailed information on your session, with time stamps.
[Link] Specifies the task commands run during your session, with time stamps.
Related Information
The configassist command.
install_mh Command
Purpose
Sets up mailbox directories.
Syntax
install_mh [ -auto ] [ -help ]
The install_mh command starts automatically the first time you run any Message Handler (MH) command.
The install_mh command prompts you for the name of your mail directory. If the directory does not exist,
the install_mh command queries you if it should be created. Upon receiving a positive response, the
install_mh command creates the $HOME/.mh_profile file and places the Path: profile entry in it. This
entry identifies the location of your mailbox by specifying the directory path for your MH directory,
UserMHDirectory.
Flags
-auto Creates the standard MH path without prompting.
-help Lists the command syntax, available switches (toggles), and version information.
Note: For MH, the name of this flag must be fully spelled out.
Files
$HOME/.mh_profile Contains the MH user profile.
Related Information
Mail applications in Networks and communication management.
install_wizard Command
Purpose
Invokes the Web-based System Manager Install Wizard or the SMIT install menu.
Syntax
install_wizard [ -d Media ]
Description
The install_wizard command invokes the Web-based System Manager Install Wizard or the SMIT install
menu. This provides an easy path to the install interfaces. These interfaces show media content for
installp, UDI, or ISJE products and launch the appropriate installer.
Flags
-d device or directory The device or directory containing the images to install.
Example
To invoke the Web-based System Manager Install Wizard, insert an install CD in cd1 and type:
install_wizard -d /dev/cd1
Files
/usr/sbin/install_wizard
installbsd Command
Purpose
Installs a command (BSD version of the install command).
Syntax
/usr/bin/installbsd [ -c ] [ -g Group ] [ -m Mode ] [ -o Owner ] [ -s ] BinaryFileDestination
Description
The installbsd command installs the file specified by the BinaryFile parameter by moving it to a file or
directory specified by the Destination parameter. Use of the -c flag copies the BinaryFile rather than
moving it. If the specified Destination parameter is a directory, the BinaryFile is moved into the directory. If
the specified Destination parameter already exists as a file, the installbsd command removes that file
before the BinaryFile is moved. The installbsd command does not move a file onto itself.
Flags
-c Copies the file specified by the BinaryFile parameter to the file or directory specified by the
Destination parameter.
-g Group Specifies a group for the file specified by the Destination parameter. The default group is staff.
-m Mode Specifies a mode for the file specified by the Destination parameter. The default mode is 755. The
specified mode can be an octal number or a symbolic value.
-o Owner Specifies the owner for the file specified by the Destination parameter. The default owner is the root
user.
-s Causes the file specified by the BinaryFile parameter to be stripped after installation.
Examples
To install a new command called fixit, enter:
This command sequence installs a new command by copying the program fixit to /usr/bin/fixit, with
user mike as the owner.
Files
/usr/ucb/install Hard-link to the /usr/bin/installbsd file.
/usr/bin/installbsd Contains the installbsd command.
Related Information
The chgrp command, chmod command, chown command, cp command, install command, mv
command, strip command.
Purpose
Sets up the environment and creates NIM resources from the Virtual I/O Server DVD to install the Virtual
I/O logical partition and the Integrated Virtualization Manager.
Syntax
To set up the environment and create NIM resources for installing a Virtual I/O logical partition or
Integrated Virtualization Manager:
installios -u [ -f | -U ]
Description
The installios command creates NIM resources from the Virtual I/O Server DVD to install a Virtual I/O
logical partition and Integrated Virtualization Manager. When invoked on a NIM client, the -L flag must be
specified with the location of the [Link] fileset. The installios command configures the
client as a NIM master and creates the resources from the Virtual I/O Server DVD to install the ioserver
logical partition or the Integrated Virtualization Manager. After the logical partition or Integrated
Virtualization Manager have been installed, the installios command can return the NIM master back to its
original state by removing the created resources from the DVD or by unconfiguring the NIM master. All of
the flags are optional. If no flags are specified, the installios wizard runs and the user is prompted to
interactively enter the flag information.
Flags
-d path Specifies the path to the installation images (/dev/cd0 or
the path to a system backup of the Virtual I/O Server
created by the backupios command. The path may also
specify a remote NFS-mountable location such as
hostname:/path_to_backup.
-D duplex Specifies duplex (optional). This is the duplex setting with
which to configure the client’s network interface. This
value can be full or half. The default value is full if this flag
is not specified.
-f Forces a cleanup to deallocate and remove resources
which are not yet installed on a Virtual I/O logical partition
or Integrated Virtualization Manager.
-g gateway Specifies the client gateway (the default gateway that the
client will use during network installation of the Virtual I/O
Server operating system).
-i ipaddrorhostname Specifies the client IP address or hostname (the IP
address or hostname with which the client’s network
interface will be configured for network installation of the
Virtual I/O Server operating system).
Exit Status
0 The installios command was successful.
Security
You must have root authority to run the installios command
Examples
1. To create Virtual I/O resources on a NIM master for installing client [Link], type:
installios -d /dev/cd0 -i [Link] -g [Link] -S [Link]
2. To create Virtual I/O resources on a NIM client for installing client [Link] where /tmp contains the
[Link] fileset, type:
installios -d /dev/cd0 -i [Link] -g [Link] -S [Link] -L /tmp
Location
/usr/sbin/installios
Files
/usr/sbin/installios Contains the installios command
/etc/niminfo Contains variables used by NIM
Related Information
The nim_master_setup command, nim command, and nimconfig command.
installp Command
Purpose
Installs available software products in a compatible installation package.
Syntax
To Install with Apply Only or with Apply and Commit
installp [ -a | -a c [ -N ] ] [ -eLogFile ] [ -V Number ] [ -dDevice ] [ -E ] [ -Y ] [ -b ] [ -S ] [ -B ] [ -D ] [ -I ] [
-p ] [ -Q ] [ -q ] [ -v ] [ -X ] [ -F | -g ] [ -O { [ r ] [ s ] [ u ] } ] [ -tSaveDirectory ] [ -w ] [ -zBlockSize ] {
FilesetName [ Level ]... | -f ListFile | all }
Description
Notes:
1. The noclobber option of the Korn or C shell should be unset in the environment from which an
installation is performed.
2. Update all can be accomplished with smitty or with install_all_updates.
A fileset is the lowest installable base unit. For example, [Link] [Link] is a fileset. A fileset
update is an update with a different fix ID, maintenance level, or technology level. For example,
[Link] [Link] and [Link] [Link] are both fileset updates for [Link]
[Link].
When a base level (fileset) is installed on the system, it is automatically committed. You can remove a
fileset regardless of the state (committed, broken, committed with applied updates, committed with
committed updates, etc.).
When a fileset update is applied to the system, the update is installed. The current version of that
software, at the time of the installation, is saved in a special save directory on the disk so that later you
can return to that version if desired. After a new version of a software product has been applied to the
system, that version becomes the currently active version of the software.
Updates that have been applied to the system can be either committed or rejected at a later time. The
installp -s command can be used to get a list of applied updates that can be committed or rejected.
When updates are committed with the -c flag, the user is making a commitment to that version of the
software product, and the saved files from all previous versions of the software product are removed from
the system, thereby making it impossible to return to a previous version of the software product. Software
can be committed at the time of installation by using the -ac flags. Note that committing already applied
updates does not change the currently active version of a software product. It merely removes saved files
for previous versions of the software product.
When a base level is removed with the -u flag, the files that are part of the software product and all its
updates are removed from the system. Most cleanup of system configuration information pertaining to the
product is also done, but this is dependent on the product and may not always be complete.
When a software product update is rejected with the -r flag, the active version of the software product is
changed to the version immediately previous to the rejected update. Files saved for the rejected update
and any updates that were applied after it are removed from the system.
A software product that is to be removed from the system can be in any state. Any product updates can be
in either the applied or committed state, and they will also be removed.
The -t flag specifies an alternate location for a save directory that holds files being replaced by an update.
This option is primarily useful in the following two circumstances.
v You have enough local disk space for saving replaced files but you do not want to permanently expand
the root and /usr file systems.
In this case, you can choose to create a separate file system for the alternate save directory. When you
are satisfied with the updated system and have committed all applied updates, disk space can be
retrieved by deleting the save file system.
v If you do not have enough local disk space for saving replaced files but you have access to ample disk
space on a remote system, then you can specify a directory that is mounted from a remote file system.
If a remote file system is used, commit the updates as soon as possible. You may want to initiate the
installation action as an apply and commit operation with the -ac flags. If you want to apply only to be
capable of rejecting any unwanted updates, then test the newly installed updates as soon as possible
and then commit or reject them.
Take into account the following considerations when using an alternate save directory:
v It is recommended that you use the same alternate save location on each invocation of the installp
command.
v If an alternate save directory is used for an apply operation, make sure that the file system containing
that directory remains mounted. It is highly recommended that any necessary mounts be done
automatically on a reboot.
v If an alternate save directory is missing on a commit operation, the commit takes place, and a warning
is given stating that the save directory could not be deleted. It is then your responsibility to delete the
save directories that are no longer used in order to retrieve that disk space.
v If an alternate save directory is missing on reject, the reject operation cannot be done because the
saved files are missing. An error is given, and the entire reject operation is cancelled. If the missing
save directory is not caused by a temporary situation (for example, the inability to contact a remote
directory on the network,) your only options are to commit the updates or leave them in an applied state
permanently.
v When doing a system backup, you are responsible for backing up any alternate save directories that do
not reside in the root volume group.
v The installation process safeguards users with a remote save directory from the possibility of two
different systems using the same remote directory. However, use directory pathnames that easily and
uniquely identify each user’s system. For example, you might add the system’s hostname somewhere in
the pathname.
v Do not create a mksysb backup of a system with a remote save directory and then try to restore the
mksysb image onto a system other than the original. In this case, using a mksysb image to install
several like systems causes multiple ownership of the same remote save directory.
The installp -A command can be used to obtain a list of the Authorized Program Analysis Report (APAR)
numbers and summaries for all customer-reported problems that are fixed in the specified software
package. The installp -i command can be used to display supplemental information contained in files that
can be a part of the specified software package.
#
[Link] [Link] I N usr
# AIXwindows Application Development Toolkit Bitmap Fi
#
[Link] [Link] I N usr
# AIXwindows Application Development Toolkit for X Ext
#
[Link] [Link] I N usr
# AIXwindows Application Development Toolkit imake
#
[Link] [Link] I N usr
# AIXwindows Runtime Configuration Applications
#
[Link] [Link] I N usr
# AIXwindows msmit Application
Output from the installp -s command, which is used to get a list of applied software fileset updates and
updates that are available to be either committed or rejected, resembles the following:
Installp Status
---------------
Name Part Level State
--------------------------------------------------------------------
[Link] USR [Link] APPLIED
[Link] ROOT [Link] APPLIED
[Link] USR [Link] APPLIED
[Link].misc_cmds USR [Link] APPLIED
[Link] USR [Link] APPLIED
The software products and updates to be installed can be identified in one of three ways:
v by the keyword all, which indicates that all software contained on the specified installation media is to
be installed
v by a list of software product names (each of which can optionally be followed by a level) that indicates
the software to be installed
v by the -f flag followed by a file name, where each line in the file is an entry containing a software
product name, optionally followed by a level, or is a comment line that begins with a # and is ignored
Note: The installp program uses the sysck command to verify files after restoring them. The sysck
command does not recognize the following special characters in file names: ~, `, ’, \, ″, $, ^, &, (
), |, {}, [], <>, and ?. If a file name contains one of these characters, installation fails.
The FilesetName parameter can be used to specify an entire software product or any separately installable
filesets within the software package. For example, [Link] is the name of a software package, and the
separately installable filesets within that software package are [Link], [Link], and
[Link]. If the user specifies [Link] for the FilesetName parameter, then all of the separately
installable filesets listed are installed. If the user specifies [Link] for the FilesetName
parameter, then only that fileset is installed.
The Level parameter indicates the level of the software product or update that is to be installed. The Level
parameter is of the form [Link] where:
If a user is installing an installation package from installation media that contains only installation packages
it is not usually necessary to specify the level. More than one software product installation package with
different levels does not often exist on the same installation medium, but when this does occur installp
installs the specified software product at the latest software product level when Level is not specified with
FilesetName. For installation media that contain either update packages only or contain both installation
and update packages, all applicable update packages that are present on the installation media for the
specified FilesetName are also installed when Level is not specified. For installation media that contain
both installation and update packages the user can request the installation of only installation packages or
only update packages by specifying the -I or -B flags, respectively. If the user wants to install only some of
the updates on the installation medium for a specific software product both FilesetName and Level for
each of the updates to be installed for that software product must be specified.
An example of what might be entered to install TCP/IP and one of its updates that are both contained in
the /usr/sys/[Link] directory would be the following:
installp -a -d/usr/sys/[Link] [Link] [Link]
[Link] [Link]
Note: In the event that there are duplicate filesets at the same level, installp will use the first one that it
finds in the install table of contents ( .toc ). This situation can occur when bffcreate is used to
extract images from different media to the same installation directory. For this reason, make sure
that update images are not extracted to the same directory as base level images for the same
fileset at the same level.
A summary report is given at the end of the installp output that lists the status of each of the software
products that were to be installed. An example summary report for the previous installp command follows:
Installp Summary
----------------
Name Level Part Event Result
--------------------------------------------------------------------
[Link] [Link] USR APPLY SUCCESS
[Link] [Link] ROOT APPLY SUCCESS
[Link] [Link] USR APPLY SUCCESS
Note: If a previously installed level of a fileset update is in the broken state, the -acgN flags must be used
when that fileset update is installed again.
Event Values
The Event column of the summary report identifies the action that has been requested of the installp
command. The following values may be found in this column:
Event Definition
APPLY An attempt was made to apply the specified fileset.
COMMIT An attempt was made to commit the specified fileset update.
REJECT An attempt was made to reject the specified fileset update.
CLEANUP An attempt was made to perform cleanup for the specified fileset.
DEINSTALL An attempt was made to remove the specified fileset.
Result Definition
SUCCESS The specified action succeeded.
FAILED The specified action failed.
CANCELLED Although preinstallation checking passed for the specified option, it was necessary to cancel the
specified action before it was begun. Interrupting the installation process with Ctrl-c can sometimes
cause a canceled action, although, in general, a Ctrl-c interrupt causes unpredictable results.
Flags
-A Displays the APAR number and summary of all customer-reported problems that are
fixed in the specified software package. No installation is attempted.
-a Applies one or more software products or updates. This is the default action. This flag
can be used with the -c flag to apply and commit a software product update when
installed.
-b Prevents the system from performing a bosboot in the event that one is needed.
-B Indicates that the requested action should be limited to software updates.
-C Cleans up after an interrupted installation and attempts to remove all incomplete
pieces of the previous installation. Cleanup should be performed whenever any
software product or update is in a state of either applying or committing and can be
run manually as needed. For backwards compatibility other flags and parameters can
be accepted with installp -C, but are ignored because all necessary cleanup is
attempted.
-c Commits all specified updates that are currently applied but not committed. When an
update is committed all other software products it is dependent on must also be
committed (unless they are already in the committed state). The specified software
product is dependent on any software product that is a prerequisite or corequisite of
the specified product. The commit will fail and error messages will be given if any
requisite software products are not in the committed state. The -g flag can be used to
automatically commit requisite software product updates.
-D Deletes the installation image file after the software product or update has been
successfully installed. When the -g flag is specified, the installation image files for any
products that are automatically included will also be deleted. This flag is valid only
with the -a or -ac flags and is not valid with the -Or flag. This flag is also only valid
when the device is a directory and an installation image file on the system where the
installation is taking place.
-d Device Specifies where the installation media can be found. This can be a hardware device
such as tape or diskette, it can be a directory that contains installation images, or it
can be the installation image file itself. When the installation media is a product tape
or Corrective Service tape, specified the tape device as no-rewind-on-close and
no-retension-on-open. Examples of this would be /dev/rmt0.1 for a high density tape,
or /dev/rmt0.5 for a low density tape. Use the options specified by the tape supplier.
The default device is /dev/rfd0.
Not all output is appended. Copyright information is still displayed to the user. Any
error messages are displayed on the screen and sent to the file specified by the
LogFile variable. A results summary of the installp command invocation is also
displayed on the screen and sent to the LogFile. This flag is primarily used by NIM
and BOS install to limit the output shown to the user, but keep useful information for
later retrieval.
-E Displays software license agreements. This flag is only valid with the -a or -l flags. If
the -E flag is specified with the -a flag, a new section is emitted showing the pending
license agreements associated with the selected filesets. If the -E flag is specified
with the -l flag, output is emitted showing the license agreements associated with all
filesets on the media.
-F This option can be used to force the installation of a software product even if there
exists a previously installed version of the software product that is the same as or
newer than the version currently being installed. The -F flag is not valid with update
packages or the -g flag. When you use the -F flag, the -I flag is implicit.
-f ListFile Reads the names of the software products from ListFile. If ListFile is a - (dash), it
reads the list of names from the standard input. Software fileset names, optionally
followed by a level, should be one per line of text, and any text following the second
set of white spaces or tabs on a line is ignored. Output from the installp -l command
is suitable for input to this flag.
-g When used to install or commit, this flag automatically installs or commits,
respectively, any software products or updates that are requisites of the specified
software product. When used to remove or reject software, this flag automatically
removes or rejects dependents of the specified software. The -g flag is not valid when
used with the -F flag.
Note: This flag also automatically pulls in a superseding update present on the
media if the specified update is not present. This flag causes the newest update to be
installed for a given fileset, when there are multiple superseding updates for the same
fileset on the installation media.
-I (uppercase i) Indicates that the requested action should be limited to base level
filesets.
-i Displays on standard output the [Link], [Link], [Link], and README files
on the installation media for the software product, if they exist. This flag can take a
significant amount of time for a large number of filesets.
-J This flag is used when the installp command is executed from the System
Management Interface Tool (SMIT) menus.
-l (lowercase L) Lists all the software products and their separately installable options
contained on the installation media to standard output. No installation occurs. The -l
flag is not valid with the -Or flag.
-L Displays the contents of the media by looking at the table of contents (TOC) and
displaying the information in colon-separated output. This flag is used by smit and
vsm to list content of the media. The format provided:
package:fileset:v.r.m.f:PTF:type:state:supersede:\
sup_ptf:sup_state:latest_sup:quiesce:Descr:\
netls_vendor_id:netls_prod_id:netls_prod_ver
-MPlatform Specifies the Platform value. Any of the following values may be used to list the
installable software packages:
R Specifies POWER-based platform packages only.
N Specifies neutral packages, that is, packages that are not restricted to the
POWER-based platform.
A Specifies all packages.
The -t flag is only valid with an apply or an apply/commit operation for updates. This
flag is not valid with the -N flag.
The -t flag is useful when there is insufficient space in the default file systems (/ and
/usr) or when it is undesirable to permanently expand these file systems. It may be
desirable for the specified directory to be a remote file system. A remote file system
must have ample space, because the installp command cannot expand remote file
systems.
-u Removes the specified software product and any of its installed updates from the
system. The product can be in either the committed or broken state. Any software
products that are dependent on the specified product must also be explicitly included
in the input list unless the -g flag is also specified. Removal of any [Link] fileset is
never permitted.
-v Verifies that all installed files in the fileset have the correct checksum value after the
installation. Installed files are always verified for correct file size after installation. Use
this flag after network or remote device installations. If any errors are reported, it
might be necessary to install the software product again. Post-installation requisite
consistency checks are also started by this flag.
Note: If verbosity level 2 or higher is used, the files that are restored on to the
system is shown in the output. Because this will make installp’s output much more
verbose, make sure that your / (root) filesystem does not become full when the
/[Link] becomes large (if using smit to run installp).
-w Does not wildcard FilesetName. Use this flag from smit so it only installs the fileset
chosen and will not install filesets that match. For example, if you choose [Link],
[Link] is not automatically pulled in, as it would be by default, without the -w
flag. This flag applies only to AIX 4.2 or later.
-X Attempts to expand any file systems where there is insufficient space to do the
installation. This option expands file systems based on current available space and
size estimates that are provided by the software product package. Note that it is
possible to exhaust available disk space during an installation even if the -X flag is
specified, especially if other files are being created or expanded in the same file
systems during an installation. Also note that any remote file systems cannot be
expanded.
-Y Agrees to required software license agreements for software to be installed. This flag
is only valid with the -a flag.
-z BlockSize Indicates in bytes the block size of the installation media. The default value of Size is
512.
FilesetName This is the name of the software product to be installed and can specify either an
entire software product or any separately installable filesets within the software
product. This can be used to specify the name of a fileset or fileset update.
Level This indicates the level of the software product or update that is to be installed and is
of the form [Link]. If a fileset update has an additional fix ID (also know as
ptf id), that ID should also be specified in the Level as in [Link].
Return Values
A zero (0) return value indicates that all attempted installations were successful, or that no processing was
required for the requested action on the requested filesets (for example, if a requested fileset was already
installed).
A nonzero return value indicates that some part of the installation was not successful.
A summary report is given at the end of the installp output that lists the status of each of the software
products that were to be installed. For those software products that could not be installed or whose
installation failed, the user can search for the cause in the more detailed information that is continually
displayed from the installp command during the installation process.
Auditing Events:
Event Information
INSTALLP_Inst Success or failure of the apply, commit, reject, and cleanup operations.
Examples
1. To list all software products and installable options contained on an installation cartridge tape, type:
installp -L -d /dev/rmt0.1
2. To list all customer-reported problems fixed by all software products on an installation tape, type:
installp -A -d /dev/rmt0.1 all
3. To install (automatically committed) all filesets within the [Link] software package (located in the
/usr/sys/[Link] directory) and expand file systems if necessary, type:
installp -aX -d/usr/sys/[Link] [Link]
4. To reinstall and commit the NFS software product option that is already installed on the system at the
same level (from tape), type:
installp -acF -d/dev/rmt0.1 [Link] [Link]
5. To install (apply only) certain updates that are contained on diskette for the TCP/IP software product,
type:
installp -a [Link] [Link] [Link] [Link]
6. To remove a fileset named [Link], type:
installp -u [Link]
7. To specify an alternate storage directory on a remote file system for a BOSNET TCP/IP update with
-t/temp_space, see the following example: the save directory becomes /temp_space/My_Hostname/
usr/lpp/[Link]/[Link]/[Link].save.
mount Server_Name:/Save_Area /temp_space
installp -a -t /temp_space/My_Hostname \
[Link] [Link]
8. In order to capture a log file of all output from the installp command, the script command can be
used as in the following example. Output is written to the typescript file in the current directory.
script
installp ...
<Ctrl>d
or
installp ... 2>&1 | tee /tmp/[Link]
In the second example, output is written to the screen and a copy is saved.
9. To preview (without performing) the installation of the Application Developer bundle of software using
the installp command, type:
installp -pacgXd /dev/rmt0.1 -f /usr/sys/[Link]/sys_bundles \
/App_Dev.bnd
10. To install TCP/IP and one of its updates that are both contained in the /usr/sys/[Link], type:
A summary report is given at the end of the installp output that lists the status of each of the software
products that were to be installed. An example summary report for the previous installp command
follows:
Note: This summary is also saved in /var/adm/sw/[Link] until the next installp
invocation. The header file inuerr.h in the /usr/include directory describes the fields making
up the records in the [Link] file.
11. To list software products (located in the /usr/sys/[Link] directory) that are installable on
POWER-based machines, type:
installp -l -MR -d /usr/sys/[Link]
12. To update all file sets from a CD that are currently installed on the system, type:
lslpp -lc | awk -F ":" ’{print $2}’ | tail -n +2 > /tmp/lslpp
installp -agXd /dev/cd0 -e /tmp/[Link] -f /tmp/lslpp
Files
/dev/rfd0 Specifies the default restore device.
/dev/rmtn Specifies the raw streaming tape interface.
/usr/sys/[Link] directory Contains files in backup format for use in installing or
updating a complete set or subset of software products.
Related Information
The bffcreate command, inudocm command, inutoc command, lppchk command, lslpp command,
sysck command.
instfix Command
Purpose
Installs filesets associated with keywords or fixes.
Syntax
instfix [ -T [ -M Platform ] ] [ -s String ] [ -S ] [ -k Keyword | -f File ] [ -p ] [ -d Device ] [ -i [ -c ] [ -q ] [ -t
Type ] [ -v ] [ -F ] ] [ -a ]
Description
The instfix command allows you to install a fix or set of fixes without knowing any information other than
the Authorized Program Analysis Report (APAR) number or other unique keywords that identify the fix.
Any fix can have a single fileset or multiple filesets that comprise that fix. Fix information is organized in
the Table of Contents (TOC) on the installation media. After a fix is installed, fix information is kept on the
system in a fix database.
The instfix command can also be used to determine if a fix is installed on your system.
Note: Return codes for the instfix command are documented in the /usr/include/inuerr.h file, which
is shipped with the [Link] fileset. There is also a general failure code of 1 and a single
reference to EACCES (13) from /usr/include/errno.h.
Security
Privilege Control: You must be the root user to install using the instfix command, but any user can run the
instfix command to query the fix database.
Examples
1. To install all filesets associated with fix IX38794 from the tape mounted on /dev/rmt0.1, type:
The first part of this command lists the fixes on the media, and the second part of this command uses
the list as input.
3. To list all keyword entries on the tape containing the string SCSI, type:
This sequence passes the list of fixes to the installp command to be applied and committed. The
installp command extends filesystems as needed with the flags shown. This example shows that you
can select other installp flags. The instfix command calls installp if the -p flag is not used.
6. To list all of the fixes that are not restricted to the POWER-based platform, type:
Files
/usr/sbin/instfix Contains the instfix command.
/usr/lib/objrepos/fix Specifies the path to the Object Data Manager database.
Related Information
The installp command.
inucp Command
Purpose
Performs simple copy operations for the installp command. This command is used by the installp
command and the install scripts.
Syntax
inucp -s StartDirectory [ -e FinalDirectory ] ListFile ProductName
Description
The inucp command copies the files in a file tree with its root at StartDirectory to the appropriate place on
the FinalDirectory root.
Before replacing files that may already exist in the FinalDirectory file tree, the inusave command should
be called to save the files until needed by the inurecv command.
The ListFile parameter specifies a list, one per line, of all the files for ProductName. ListFile is the full path
name of the file that contains the relative path names of files that the product needs to have copied.
The ProductName parameter specifies the name of the software product to be copied.
Environment Variables
INUEXPAND This flag is set to 1 by the installp command if file systems are to be expanded if necessary to
do the copy (that is, the -X flag was passed). It is set to 0 if file systems are not to be expanded.
If this environment variable is not set, the default is not to expand file systems.
INUTEMPDIR This flag is set by the installp command to the path of the current temporary directory. If this flag
is not set the default is /tmp.
Error Codes
The inucp command returns the following error codes, which are defined in inuerr.h.
Security
Privilege Control: You must be the root user to run this command.
Examples
To copy all the files listed in the /usr/lpp/X11/inst_root/al list from the /usr/lpp/X11/inst_root file tree to
the root directory, enter:
Related Information
The installp command, inurecv command, inurest command, inusave command.
inudocm Command
Purpose
Displays contents of files containing supplemental information.
Syntax
inudocm [ -d Device ] [ -q ] { ProductName ... | all }
The inudocm command is used to display supplemental information. The files from the media that are
displayed, if they exist, are the [Link] file, the [Link] file, the [Link] file and the README file.
The ProductName parameter specifies the name of the software product being checked. Specify all to
display information about all software products that are known to the system.
Flags
-d Device Specifies where the installation media can be found. The Device parameter can specify a hardware
device, such as a tape or diskette drive, a directory that contains installation images, or an
installation image file. The default device is /dev/rfd0.
-q Specifies quiet mode, which suppresses prompts.
Security
Privilege Control: Only a root user can run this command.
Examples
To display the update instructions for the snaserv software product on /dev/rfd0, enter:
inudocm snaserv
Files
/usr/sbin/inudocm Contains the inudocm command.
/usr/lpp/ProductName/[Link] Specifies the update instructions for the software
product.
/usr/lpp/ProductName/[Link] Specifies special instructions for the software product.
/usr/lpp/ProductName/README Specifies special instructions for the software product.
/usr/lpp/ProductName/[Link] Specifies the updates to the documentation for the
software product.
Related Information
The installp command, restore command.
inulag Command
Purpose
Acts as the front end to the subroutines to manage license agreements.
Syntax
inulag -r [ -n FilesetName | -s FileName | -p Product ] [ -d Description [ -m MessageSpecification ]] -f File
inulag -A
Description
The inulag command manages software license agreements. The basic forms are license agreement
registration, license agreement listing, license agreement deactivation, license agreement validation, and
license agreement revalidation.
The -r flag manages software license agreement registration of a fileset installed with installp or an
independently-installed product installed through another installer. The path to a file that is always installed
with an independently-installed product must be specified with the -s flag when the license agreement is
registered.
The -l flag lists software license agreement registrations. If the -c flag is specified, the path to the software
license agreement file is displayed rather than the contents of the file.
The -q flag queries for existence of software license agreements. A return code of 0 is returned if a license
agreement exists. If the -a flag is also specified, then a return code of 0 is returned if there is a pending
license agreement.
The -u flag removes the listing of software license agreements for a fileset or independently-installed
product.
The -D flag forces revalidation of software license agreements upon the next system reboot.
Flags
-a Used with the -l flag to show products that have a pending license agreement.
-A Registers agreements for all pending license agreements.
-c Used with the -l flag for colon-separated listing. Cannot be used with the -v flag.
-d Description Specifies the default description for the fileset or product to which license applies.
-D Forces the revalidation all license agreements on the next reboot.
-f File Specifies the pathname specification for the license agreement. A ’%L’ in the
specification is a substitution pattern for the current locale. en_US is the default
locale. A ″%l″ in the specification matches the first two characters of the locale unless
the current locale is zh_CN, in which all five characters of the locale designation are
used.
-l Lists software license agreements.
-m MessageSpecification Specifies the message catalog for a translated description of the form ″catalog,set
number,message number″.
-n FilesetName Specifies the name of a fileset registered in the software vital product database
governed by the license agreement.
-p Product Specifies the product id, a nontranslatable alphanumeric string that uniquely identifies
a product.
-q Queries for license agreements. Does not show output. The value of 0 is returned if a
license agreement exists. The -q flag can be used with other flags to query for
particular license agreements or pending license agreements.
-r Registers a software license agreement. Requires the -f flag for the path to the
agreement file and either the -n flag or the -s flag to indicate the fileset name or
signature file containing software subject to the agreement. The -r flag cannot be
used with the -l, -q, or the -u flag. License agreements are registered as pending
(status=’P’) during system installation, and NIM SPOT installation unless the
environment variable ACCEPT_LICENSES is set to yes.
Security
The agreement database is writable only by root. As a result, all flags other than the -l flag can only be
used by a user operating with root user authority.
Related Information
The installp command, lslpp command, nim command.
Installing optional software products and service updates in Installation and migration
inurecv Command
Purpose
Recovers files saved by the inusave command.
Syntax
inurecv ProductName [ OptionList ]
Description
The inurecv command recovers files and archive constituent files saved from a previous inusave
command. It uses the [Link] and [Link] files from the directory specified by the INUSAVEDIR
environment variable. The inurecv command recovers files saved by program-provided installation or
update procedures.
The inurecv command is primarily called by the installp -r command and the installp -C command to
recover the files for a rejected program or a program that needs to be cleaned up.
The inurecv command is used to recover all the files for an installable program by separate calls to
inurecv for the root, /usr, and /usr/share file trees. The save directories for the root, /usr, and /usr/share
parts of an installation are:
v /lpp/PackageName/FilesetName/[Link],
v /usr/lpp/PackageName/FilesetName/[Link] , and
v /usr/share/lpp/PackageName/FilesetName/[Link]
respectively, when set up by the installp command. Level refers to the level of the software product and
has the format of [Link], where vv = version, rr = release, mmmm = modification, ffff
= fix, and ppppppppp = fix ID (only for Version 3.2 images).
Environment Variables
INUEXPAND This flag is set to 1 by the installp command if file systems are to be expanded if necessary to
do the recover (that is, the -X flag was passed to installp). It is set to 0 if file systems are not to
be expanded. If this environment variable is not set, the default is not to expand file systems.
INUSAVE This flag is set to 1 by the installp command if files are to be saved (that is, the -N flag was not
passed), and otherwise set to 0. The inurecv command attempts to recover files if INUSAVE is
set to 1. If INUSAVE is set to 0, inurecv performs no recovery and exits with a return code of
INUGOOD. If this environment variable is not set, the default is to attempt to recover files.
INUSAVEDIR The full path name to the directory where files are saved. If this environment variable is not set,
then the directory used is /usr/lpp/ProductName/inst_updt.save.
ODMDIR The Object Data Manager object repository where the software vital product data is saved. If this
environment variable is not set, the default directory used is /etc/objrepos.
Error Codes
INUBADC1 A copy of a file from one directory to another was unsuccessful.
INUGOOD No error conditions occurred.
INUNORP1 Unsuccessful replacement of a file in an archive file during program recovery.
INUNOSAV The save directory does not exist.
INUNOSVF A file that was saved in the save directory was not found.
Security
Privilege Control: Only the root user can run this command.
Examples
To recover all files previously saved for the snaserv program, enter:
inurecv snaserv
Files
/lpp/PackageName/FilesetName/[Link]
Files saved for the root file tree.
/usr/lpp/PackageName/FilesetName/[Link]
Files saved for the /usr file tree.
/usr/share/lpp/PackageName/FilesetName/[Link]
Files saved for the /usr/share file tree.
Related Information
The installp command, inusave command.
Purpose
Performs simple archive and restore operations for the installp command and shell scripts. This command
is used by the installp command and the install scripts.
Syntax
inurest [ -d Device ] [ -q ] ListFile ProductName
Description
The inurest command restores or archives all files listed in the file specified by the ListFile parameter.
If files are to be archived, there must be an archive control file, /usr/lpp/ProductName/[Link], which
contains entries in the following form:
ComponentFile LibraryFile.a.
If the archive control file exists, the inurest command compares each of the file names in the ListFile file
to the component files listed in /usr/lpp/ProductName/[Link]. Whenever the inurest command finds a
match, the file name is added to a list of files that are archived. This list is then used to archive the
restored files into a copy of the corresponding archive. When the archive is finished, the copy replaces the
original file.
The ListFile parameter specifies the full path name of a file containing the relative path names, one per
line, of files that a product needs to have restored.
Flags
-d Device Specifies the input device. The default device is the /dev/rfd0 device.
-q Specifies quiet mode. Suppresses the prompt from restore.
Environment Variables
INUEXPAND This flag is set to 1 by the installp command if file systems are to be expanded if necessary to
do the restore (that is, the -X flag was passed). It is set to 0 if file systems are not to be
expanded. If this environment variable is not set, the default is not to expand file systems.
INULIBDIR This is the directory where files that are specific to software product installation reside. If
INULIBDIR is not set the /usr/lpp/ProductName directory is used.
INUTEMPDIR The directory to use for temporary space that is needed during the execution of this command. If
this environment variable is not set, then the directory used is /tmp.
Error Codes
INUBADRC Restoration of an updated version of files was unsuccessful.
INUBADMN Unusable flag was specified.
INUCHDIR Cannot change directory.
INUGOOD No error conditions occurred.
INUNOAP2 Unable to access the apply list.
INUNORP2 Failed replacing a constituent file in the archive file.
INUTOOFW One or more parameters are missing.
INUTOOMN Too many parameters are specified.
Examples
To restore all the files listed in the ac file for the snaserv program, enter:
inurest /usr/lpp/snaserv/ac snaserv
Files
$INULIBDIR/[Link] Archive control file.
Related Information
The installp command, inucp command, inurecv command, inusave command.
inurid Command
Purpose
Removes information used for installation of diskless/dataless clients from the inst_root directories of
installed software.
Syntax
inurid [ -q | -r ]
Description
The inurid command is used to remove files stored in the inst_root directories of installed software.
The names of these directories are of the forms: /usr/lpp/PackageName/inst_root for software products
and /usr/lpp/PackageName/OptionName/v.r.m.f/inst_root for AIX Version 4 updates.
When this command is called, the inst_root directories are removed for all products and updates in the
committed state. Also, an indicator is stored in the Software Vital Product Data indicating that the proper
inst_root directory information is to be removed after the completion of each future installation action, for
example, actions performed by the installp command.
Attention: One reason a user may want to remove inst_root directories is to save disk space. The
implication of removing these directories is that the system cannot be used as a Shared Product
Object Tree (SPOT) server of diskless/dataless clients. Also, once inst_root directories are removed
from a system, there is no way to retrieve the directories. Therefore, the system cannot later be
converted to a SPOT server without reinstalling the entire operating system.
Flags
-q Queries whether inst_root directories have been removed from the system. A return value of 0 indicates that
inst_root directories have not been removed and a return value of 1 indicates that the inst_root directories
have been removed.
-r Requests inst_root directories be removed from the system.
Files
/usr/lib/instl/inurid Contains the inurid command.
Related Information
The installp command.
inusave Command
Purpose
Saves files that are installed or updated during an installation procedure. This command is used by the
installp command and the install scripts.
Syntax
inusave ListFile ProductName
Description
The inusave command saves the files and archived files that are listed in the file specified by the ListFile
parameter for the ProductName software product. The inusave command is designed for use with the
installp command.
The save directories for the / (root), /usr, and /usr/share parts of an installation are:
v /lpp/PackageName/FilesetName/[Link],
v /usr/lpp/PackageName/FilesetName/[Link] , and
v /usr/share/lpp/PackageName/FilesetName/[Link]
respectively, when set up by the installp command. The installp command calls inusave for each of
these three directories. The ListFile parameter is the full path name of the file that lists the files that are to
be saved if a current copy exists.
If a file named in the ListFile file already exists, the inusave command copies that file to the
$INUSAVEDIR/update.n file, where n is an integer assigned by the inusave command. If the file does not
exist, the inusave command assumes that this entry in the ListFile parameter represents either a new file
or a file to be archived or processed by the archive procedure described later in this section.
The inusave command maintains a list of saved files in the $INUSAVEDIR/[Link] file. This file is a
stanza file with an entry for each saved file. Entries in the [Link] file resemble the following:
/usr/bin/chkey:
update.n = update.1
option = [Link]
_id = 209
_reserved = 0
_scratch = 0
lpp_id = 72
/usr/bin/domainname:
update.n = update.2
option = [Link]
_id = 210
_reserved = 0
_scratch = 0
lpp_id = 72
private = 0
file_type = 0
format = 1
loc0 = /usr/bin/domainname
size = 2526
checksum = 12439
In the previous example /usr/bin/chkey (the name of the stanza) is the name of an original file that was
saved and update.1 is the name of the file in the $INUSAVEDIR directory to which it was copied. The file
/usr/bin/chkey belongs to the [Link] installable option of the software product bosnet. The
stanza name and the first two items in the stanza (update.n and option) exist for each stanza in the
[Link] file. The remaining items in the stanza, which may vary, are information from the Software Vital
Product Data (SWVPD) database.
An archived constituent file is saved if there is a valid archive control file, [Link], in the current directory.
If the [Link] file exists, the inusave command compares each of the file names in ListFile to the
constituent file names in [Link]. When it finds a match, the inusave command uses the ar command to
extract the constituent file from its associated archive file. It then moves the file to the
$INUSAVEDIR/archive.n file, where n is an integer selected by the inusave command.
The inusave command maintains a list of the extracted files that have been saved in the
$INUSAVEDIR/[Link] file. This file is a stanza file with an entry for each saved constituent file.
Entries in the [Link] file resemble the following:
/[Link]:
archive.n = archive.1
arc_name = /usr/lib/productx/libprodx.a
option = [Link]
_id = 833
_reserved = 0
_scratch = 0
lpp_id = 7
private = 0
file_type = 0
format = 1
loc0 = /[Link]
loc1 = "h11,h12"
loc2 =
"/usr/lpp/[Link]/s11,/usr/lpp/[Link]/s12"
size = 1611
checksum = 62793
In the previous example /[Link] (the name of the stanza) is the name of the original constituent file
that was saved and archive.1 is the name of the file in the $INUSAVEDIR directory to which it was
copied. The /usr/lib/productx/libprodx.a is the full path name of the archive file defined in the [Link]
archive control file. The constituent file /[Link] belongs to the [Link] installable option
of the software product productx. The stanza name and the first three items in the stanza (archive.n,
arc_name, and option) will exist for each stanza in the [Link] file. The remaining items in the stanza,
which may vary, are information from the SWVPD database.
Environment Variables
INUEXPAND This flag is set to 1 by the installp command if file systems are to be expanded if necessary to
do the save (that is, the -X flag was passed to installp). It is set to 0 if file systems are not to be
expanded. If this environment variable is not set, the default is not to expand file systems.
INUSAVE This flag is set to 1 by the installp command if files are to be saved (that is, the -N flag was not
passed to installp). It is set to 0 if files are not to be saved. If this environment variable is not
set, the default is to save files.
INUSAVEDIR The full path name to the directory where files are to be saved. If this environment variable is not
set, then the directory to be used is /usr/lpp/ProductName/inst_updt.save.
INUTEMPDIR The directory to use for temporary space that is needed during the execution of this command. If
this environment variable is not set, then the directory used is /tmp.
Error Codes
The following error codes are defined in /usr/include/inuerr.h:
Security
Privilege Control: Only the root user can run this command.
Examples
To save all the files listed in the [Link] file of the snaserv program, enter:
inusave /usr/lpp/snaserv/[Link] snaserv
Files
/usr/lpp/PackageName/[Link]
Specifies the archive control file.
/lpp/PackageName/FilesetName/[Link]
Specifies the save directory for the root.
/usr/lpp/PackageName/FilesetName/[Link]
Specifies the save directory for the /usr files.
/usr/share/lpp/PackageName/FilesetName/[Link]
Specifies the save directory for the /usr/share files.
Related Information
The installp command, inurecv command.
Purpose
Creates a .toc file for directories that have backup format file install images. This command is used by the
installp command and the install scripts.
Syntax
inutoc [ Directory ]
Description
The inutoc command creates the .toc file in Directory. If a .toc file already exists, it is recreated with new
information. The default installation image Directory is /usr/sys/[Link]. The inutoc command adds
table of contents entries in the .toc file for every installation image in Directory.
The installp command and the bffcreate command call this command automatically upon the creation or
use of an installation image in a directory without a .toc file.
Error Codes
INUBADIR Usage error or Directory did not specify a directory.
INUCHDIR Unable to change directories to Directory.
INUCRTOC Could not create the .toc file.
INUGOOD No errors occurred.
INUSYSFL A system call failed.
Security
Privilege Control: Only the root user can run this command.
Examples
1. To create the .toc file for the /usr/sys/[Link] directory, enter:
inutoc
2. To create a .toc file for the /tmp/images directory, enter:
inutoc /tmp/images
Files
/usr/sys/[Link] The default directory to create a .toc file.
.toc The file created by this command in the specified directory.
Related Information
The bffcreate command, installp command.
inuumsg Command
Purpose
Displays specific error or diagnostic messages provided by a software product’s installation procedures.
This command is used by the installp command and the install scripts.
Description
The inuumsg command displays error or diagnostic messages for a software product’s installation
procedures. Rather than each procedure having its own text, messages are maintained in a central
message catalog, /usr/lpp/msg/$LANG/[Link]. When you run the inuumsg command and specify
the message Number, the error message is displayed. Up to four string arguments, Argument1 to
Argument4, can be substituted into the message in the appropriate location.
Return Values
0 Indicates the message was found and displayed.
1 Indicates the message was not found and not displayed.
Security
Privilege Control: Only the root user can run this command.
Examples
To see error message number 3, enter:
inuumsg 3
Files
/usr/lpp/msg/$LANG/[Link] The message catalog.
Related Information
The installp command.
invscout Command
Purpose
Surveys the host system for currently installed microcode or Vital Product Data (VPD).
Syntax
invscout [ -v ] [ -c ] [ -r ] [ -m machine_type_and_model ] [ -s serial_number ] [ -catl
microcode_catalog_path ][ -g ] [ -q ] [ -h ]
Description
The invscout command executes one instance of the stand-alone version of the Inventory Scout process.
The invscoutd command starts the server daemon side of a client-server version.
Microcode Survey
A Microcode Survey also produces a Microcode Survey Formatted Text Report File. This file can be
printed or displayed on a monitor and contains a subset of the information recorded in the upload file. This
subset includes information about the invscout execution itself and the levels of currently installed
microcode. The -r flag causes this report also to be sent to the screen from where the command was
invoked.
A VPD Survey stores the system VPD in a VPD Survey Upload File that can be uploaded to a Web
server via the Internet . Once on a Web server, a CGI forwards the file to a repository and produces a
Web page indicating the status of the operation.
This option concatenates two or more Microcode Survey Upload Files into a single Microcode Survey
Concatenated Upload File or two or more VPD Survey Upload Files into a single VPD Survey
Concatenated Upload File. A Concatenated Upload File can be uploaded to a Web server using the
Internet and processed by the server CGI to give the same results as would have been obtained by
uploading and processing all the component files individually. The input files can be any valid upload files
but, typically, this operation is done to simplify the task of uploading the results from several host systems.
v The version of the command executing the concatenation and the versions of the commands that
produced the files to be concatenated must all be the same.
v Microcode Survey Upload Files cannot be concatenated with VPD Survey Upload Files.
v Versions [Link] and subsequent versions of this command do not require concatenation of Microcode
Survey Upload Files, because the files are processed locally.
Exit Status
This command returns the following exit values:
Security
This command is owned by root, and is installed with the setuid bit ON so that any user can run it.
Examples
1. To run one Microcode Survey and send the results to a formatted text report file and an upload file,
type:
invscout
2. To run one VPD Survey and send the results to an upload file, type:
invscout -v
3. To concatenate previously produced Microcode Survey upload files into a single upload file, type:
invscout -c
Files
/usr/sbin/invscout Contains the invscout command.
/var/adm/invscout/[Link] Microcode Survey Upload File. The host variable is the host name of
the system represented in the file.
/var/adm/invscout/[Link] Microcode Survey Formatted Text Report File.
/var/adm/invscout/[Link] VPD Survey Upload File. The host variable is the host name of the
system represented in the file.
/var/adm/invscout/[Link] Microcode Survey Concatenation Input Directory.
Related Information
The invscoutd command.
invscoutd Command
Purpose
Launches a permanent Inventory Scout server daemon.
Syntax
invscoutd [ -o] [ -p Portno ] [ -b Bufsize ] [ -t Timeout ] [ -v Verblev ]
Description
The invscoutd command implements a permanent Inventory Scout server daemon on one machine in a
user’s local network. The usual client is a Java™ applet running in the user’s Web browser, which was
downloaded from a central Inventory Scout CGI application.
Daemon initialization involves reading command line options and several local Inventory Scout companion
files. When in operation, each client-server transaction involves reading from a well-known socket for a
text string and returning a text report over the same socket.
The daemon maintains a record of its actions in a log file. Depending on the specified verbosity level, the
log lines may contain startup and shutdown banners, traces of each call, detailed internal program traces,
and error statements. Depending on the specified verbosity level, startup banners may also be written to
stderr.
Protocols
Client connections to the daemon’s socket use the Internet TCP/IP protocol. In a transaction, the invoking
client applet sends an action request, as a URL-encoded text string, to the server daemon. The request is
by any ASCII control character (x00 to x1F), which triggers the processing of the request.
Some requests require the client to pass additional data. In these cases, the additional data immediately
follow the termination byte for a length specified in the action request.
With one exception (ACTION=PING), the server daemon always returns a pseudo MIME format text report
written back over the same socket connection. The pseudo MIME format is used even for error results.
The daemon terminates the returned text and the transaction itself by closing the socket, resulting in an
end-of-file (EOF) indication to the invoking client. The client should close the socket at its end of the
connection as soon as the EOF is received.
Notes:
1. Field names and their values are separated by equal signs (=).
2. Name=Value pairs are separated by an & character.
3. The Name field is always case insensitive.
4. The Value field is case insensitive, unless documented otherwise.
5. The ACTION=keyword pair must always be present.
6. A string between ampersands without an equal sign is parsed as a Name with an Empty value.
7. Spaces can be represented by + (plus signs).
8. Binary characters may be coded as the escape sequence of a percent sign followed by exactly two
hexadecimal chars (%xx). This escape sequence must also be used to code URL metacharacters like
the &, = (equal sign), and + (plus sign) within a Value.
9. The control character termination byte must always be sent by the client.
<EOF>
ECHO not required The daemon returns a text report consisting of the original unparsed request
string followed by a linefeed. A password (MRDM) is not required but will be
echoed if provided, along with everything else. Additional data (DATALEN) are
not required but will be echoed if present, as is, after the request string. For
the ECHO request, DATALEN will be silently truncated to a maximum of 2000.
Example:
"action=ECHO&MRDM=xyz&datalen=5\0abcde"
"RESULT=0\n"
"\n"
"action=ECHO&MRDM=xyz&datalen=5\n"
"abcde"<EOF>
URLDECODE not required The daemon returns a text report of the request string after parsing, and an
exact copy of any subsequent data. A password (MRDM) is not required but
will be parsed and returned if provided. Additional data (DATALEN) are not
required but will be parsed and returned if provided; however, any actual
additional data beyond the request string will be discarded. Each numbered
line of the report exhibits one parsed Name=Value pair from the original
string. Example:
"action=UrlDecode&subaction=xyz\0"
"RESULT=0\n"
"\n"
" 0: ACTION UrlDecode\n"
" 1: SUBACTION xyz\n"
<EOF>
TESTPWD required The daemon returns RESULT=0 if the MRDM password is valid. Otherwise it
returns RESULT=2. Additional data (DATALEN) are not accepted and will be
discarded if present. Example:
"ACTION=TESTPWD&MRDM=thepassword\0"
"RESULT=0\n"
"\n"
<EOF>
VERSIONS not required The daemon reports the current version numbers of the Inventory Scout itself.
Additional data (DATALEN) are not accepted and will be discarded if present.
Example:
"ACTION=VERSIONS\0"
"RESULT=0\n"
"\n"
"[Link]\n"
"[Link]\n"
<EOF>
"RESULT=0\n"
"\n"
<EOF>
MCODES required The daemon executes the Microcode Survey Option. Additional data
(DATALEN) are not accepted and will be discarded if present. Example:
"ACTION=MCODES&MRDM=xyz\0"
"RESULT=0\n"
"\n"
"Report Line 1\n"
"Report Line 2\n"
:
:
"Report Line N\n"
<EOF>
VPDS required The daemon executes the VPD Survey Option. Additional data (DATALEN)
are not accepted and will be discarded if present. Example:
"ACTION=VPDS&MRDM=xyz\0"
"RESULT=0\n"
"\n"
"Report Line 1\n"
"Report Line 2\n"
:
:
"Report Line N\n"
<EOF>
Results
The daemon returns a text result in a pseudo MIME format. It returns a header consisting of one or more
Name=Value pairs, each on a line by itself. The first Name=Value pair always is the result code in the
form RESULT=number. The result code always is returned for every action, except the PING action.
Internal scout result codes applicable only to the Java applet client are not documented in the following
information.
An optional free-form text report may follow the header lines depending on the result code. If there is a
free-form text report, the header is first terminated by an empty line, such as two adjacent linefeeds.
In any event, the result report is terminated by an EOF indicator after reading the last of the report text
from the socket. The EOF also signifies the end of the transaction itself.
Result Codes
Result= Description
0 Complete success.
1 Daemon aborted due to memory allocation error. This can happen in either the parent server
daemon or one of the service children.
Flags
Specify any arguments, beginning with a hyphen (-). Space is not allowed between a flag and its value.
-o Overwrites an existing logfile. If the -o flag is not specified, new logfile lines are
appended to any existing logfile.
-p Portno Changes this server’s port number from the default 808 to Port.
-b Bufsize Inventory Scout commands are specified as URL-encoded strings read from a
TCP/IP socket into a 1024 byte fixed length buffer. The -b flag can change the
buffer size to Bufsize bytes if future protocol changes require a larger read buffer.
-t Timeout The client applet writes a control character termination byte at the end of the
URL-encoded request string to indicate the end of the request. If the invscoutd
daemon does not receive the termination byte within a timeout period, it aborts
the transaction and closes the socket. Similarly the client must send all bytes of
the additional data specified in the DATALEN parameter with sufficient speed to
prevent timeout between read blocks. The -t option changes the default timeout
period from 30 seconds to Timeout seconds.
Verbosity Levels
Level Description
0 All error and status messages disabled.
5 Only fatal error messages are written. Fatal errors result in the death of the server. Usually, similar
messages are written to both the Logfile and stderr.
10 All error messages are written. These include nonfatal errors such as protocol errors, as well as fatal
errors. Nonfatal error messages are usually written only to the Logfile.
15 This level includes startup and shutdown banner messages. Simple banner messages are usually
written to both the Logfile and stderr.
18 This level includes call trace status messages. Every client call results in a single trace message.
This is the default level for the invscoutd daemon. Trace messages are written only to the Logfile.
20 This level includes program trace messages. Program traces are fairly detailed program execution
status messages typically used for debugging purposes. This level is not suitable for usual
production execution because over time, it floods the Logfile with large amounts of text. Trace
messages are written only to the Logfile.
25 This is the maximum level and includes extensive program debug messages. This level is not
suitable for usual production execution. Trace messages are written only to the Logfile.
Exit Status
This command returns the following exit values:
Security
The daemon must execute as effective user ID 0 (root). It is owned by root, and is installed with the
″setuid″ bit ON so that any user can launch it. At certain execution points, however, service children of the
daemon reset their user ID to the authentication user ID invscout. The daemon will not execute unless the
user invscout has been created on the host system.
By default, an accompanying cleartext password is required from the client for most operations. If the
client’s password does not match the system password for the authentication user ID invscout, the action
exits with a return code. The authentication user ID cannot be changed.
Files
/usr/sbin/invscoutd Contains the invscoutd command
/etc/security/password Host system password file
/var/adm/invscout/microcode Directory for microcode-related actions. Default location for
microcode catalog file.
/var/adm/invscout/microcode/[Link] Default microcode catalog file.
/var/adm/invscout/[Link] Log file
ioo Command
Purpose
Manages Input/Output tunable parameters.
Syntax
ioo [ -p | -r ] { -o Tunable [ =NewValue ] }
ioo [ -p | -r ] -D
ioo [ -p | -r ] -a
ioo -h [ Tunable ]
ioo -L [ Tunable ]
ioo -x [ Tunable ]
Description
Note: The ioo command can only be executed by root.
The ioo command configures Input/Output tuning parameters. This command sets or displays current or
next boot values for all Input/Output tuning parameters. This command can also make permanent changes
or defer changes until the next reboot. Whether the command sets or displays a parameter is determined
by the accompanying flag. The -o flag performs both actions. It can either display the value of a parameter
or set a new value for a parameter.
If a process appears to be reading sequentially from a file, the values specified by the minpgahead
parameter determine the number of pages to be read ahead when the condition is first detected. The
value specified by the maxpgahead parameter sets the maximum number of pages that are read ahead,
regardless of the number of preceding sequential reads.
The operating system allows tuning of the number of file system bufstructs (numfsbuf) and the amount
of data processed by the write-behind algorithm (numclust).
Before modifying any tunable parameter, you should first carefully read about all its characteristics in the
Tunable Parameters section below, and follow any Refer To pointer, in order to fully understand its
purpose.
If the Diagnosis and Tuning sections both contain only ″N/A″, you should probably never change this
parameter unless specifically directed by AIX development.
Flags
-h [Tunable] Displays help about the Tunable parameter if one is specified. Otherwise, displays the ioo
command usage statement.
-a Displays current, reboot (when used in conjunction with -r) or permanent (when used in conjunction
with -p) value for all tunable parameters, one per line in pairs tunable = value. For the permanent
option, a value is only displayed for a parameter if its reboot and current values are equal.
Otherwise NONE displays as the value.
-d Tunable Resets Tunable to its default value. If a Tunable needs to be changed (that is it is currently not set
to its default value) and is of type Bosboot or Reboot, or if it is of type Incremental and has been
changed from its default value, and -r is not used in combination, it is not changed but a warning
displays.
-D Resets all tunables to their default value. If tunables needing to be changed are of type Bosboot or
Reboot, or are of type Incremental and have been changed from their default value, and -r is not
used in combination, they are not changed but a warning displays.
-o Tunable Displays the value or sets Tunable to NewValue. If a Tunable needs to be changed (the specified
[=NewValue ] value is different than current value), and is of type Bosboot or Reboot, or if it is of type
Incremental and its current value is bigger than the specified value, and -r is not used in
combination, it is not changed but a warning displays.
When -r is used in combination without a NewValue, the nextboot value for tunable displays. When
-p is used in combination without a NewValue, a value displays only if the current and next boot
values for he Tunableare the same. Otherwise NONE displays as the value.
-p Specifies that the changes apply to both the current and reboot values when used in combination
with the -o, -d or -D flags. Turns on the updating of the /etc/tunables/nextboot file in addition to
the updating of the current value. These combinations cannot be used on Reboot and Bosboot
type parameters, their current value cannot be changed.
When used with -a or -o without specifying a new value, the values display only if the current and
next boot values for a parameter are the same. Otherwise NONE displays as the value.
-r Makes changes apply to reboot values when used in combination with the -o, -d or -D flags. That
is, turns on the updating of the /etc/tunables/nextboot file. If any parameter of type Bosboot is
changed, the user is prompted to run bosboot.
When used with -a or -o without specifying a new value, next boot values for tunables display
instead of current values.
-x [Tunable] Lists characteristics of one or all tunables, one per line, using the following (spreadsheet) format:
tunable,current,default,reboot,min,max,unit,type,{dtunable }
where:
current = current value
default = default value
reboot = reboot value
min = minimal value
max = maximum value
unit = tunable unit of measure
type = parameter type: D (for Dynamic), S (for Static), R (for Reboot),
B (for Bosboot), M (for Mount), I (for Incremental),
C (for Connect), and d (for Deprecated)
dtunable = space separated list of dependent tunable parameters
Any change (with -o, -d or -D) to a parameter of type Mount will result in a message being displayed to
warn the user that the change is only effective for future mountings.
Any change (with -o, -d or -D flags) to a parameter of type Connect will result in inetd being restarted,
and a message being displayed to warn the user that the change is only effective for future socket
connections.
Any attempt to change (with -o, -d or -D) a parameter of type Bosboot or Reboot without -r, will result in
an error message.
Any attempt to change (with -o, -d or -D but without -r) the current value of a parameter of type
Incremental with a new value smaller than the current value, will result in an error message.
For parameters of type Bosboot, whenever a change is performed, the tuning commands automatically
prompt the user to ask if they want to execute the bosboot command. For parameters of type Connect,
the tuning commands automatically restart the inetd daemon.
Note that the current set of parameters managed by the ioo command only includes Static, Dynamic,
Mount and Incremental types.
Compatibility Mode
When running in pre 5.2 compatibility mode (controlled by the pre520tune attribute of sys0, see
Performance tuning enhancements for AIX 5.2 in the Performance management), reboot values for
parameters, except those of type Bosboot, are not really meaningful because in this mode they are not
applied at boot time.
In pre 5.2 compatibility mode, setting reboot values to tuning parameters continues to be achieved by
imbedding calls to tuning commands in scripts called during the boot sequence. Parameters of type
Reboot can therefore be set without the -r flag, so that existing scripts continue to work.
This mode is automatically turned ON when a machine is MIGRATED to AIX 5L™ Version 5.2. For
complete installations, it is turned OFF and the reboot values for parameters are set by applying the
content of the /etc/tunables/nextboot file during the reboot sequence. Only in that mode are the -r and -p
flags fully functional. See Kernel Tuning in AIX 5L Version 5.3 Performance Tools Guide and Reference
for more information.
Tunable Parameters
j2_dynamicBufferPreallocation
Purpose:
Specifies the number of 16k slabs to preallocate when the
filesystem is running low of bufstructs.
Values:
Default: 16 (256k worth)
Range: 0 to 256
Type: Dynamic
Diagnosis:
N/A
Tuning:
The value is in 16k slabs, per filesystem. The filesystem does
not need remounting. The bufstructs for Enhanced JFS are now
dynamic; the number of buffers that start on the paging device
is controlled by j2_nBufferPerPagerDevice, but buffers are
allocated and destroyed dynamically past this initial value. If the
value of external pager filesystem I/Os blocked with no
fsbuf (from vmstat -v) increases, the
j2_dynamicBufferPreallocation should be increased for that
filesystem, as the I/O load on the filesystem could be exceeding
the speed of preallocation. A value of 0 (zero) disables dynamic
buffer allocation completely.
Examples
1. To list the current and reboot value, range, unit, type and dependencies of all tunables parameters
managed by the ioo command, type:
ioo -L
2. To turn sync_release_ilock on, type:
ioo -o sync_release_ilock=1
3. To display help on j2_nPagesPerWriteBehindCluster, type:
ioo -h j2_nPagesPerWriteBehindCluster
4. To set maxrandwrt to 4 after the next reboot, type:
Related Information
The nfso command, no command, raso command, schedo command, tuncheck command, tunchange
command, tundefault command, tunrestore command, tunsave command, and vmo command.
Kernel Tuning in AIX 5L Version 5.3 Performance Tools Guide and Reference.
iostat Command
Purpose
Reports Central Processing Unit (CPU) statistics, asynchronous input/output (AIO) and input/output
statistics for the entire system, adapters, tty devices, disks and CD-ROMs.
Syntax
iostat [ -a ] [ -l ] [ -s ] [-t ] [ -T ] [ -z ] [ { -A [ -P ] [ -q | -Q ] } | { -d |-D [-R ] }[ -m ] [ Drives ... ] [ Interval] [
Count ]
Description
The iostat command is used for monitoring system input/output device loading by observing the time the
physical disks are active in relation to their average transfer rates. The iostat command generates reports
that can be used to change system configuration to better balance the input/output load between physical
disks and adapters.
All statistics are reported each time the iostat command is run. The report consists of a tty and CPU
header row followed by a row of tty or asynchronous I/O and CPU statistics. On multiprocessor systems,
CPU statistics are calculated system-wide as averages among all processors.
A header row with Number of CPUs and the Number of disks that are currently active in the system are
printed at the beginning of the output. If the -s flag is specified, a system header row is displayed followed
by a line of statistics for the entire system. The hostname of the system is printed in the system header
row.
If the -a flag is specified, an adapter-header row is displayed followed by a line of statistics for the adapter.
This will be followed by a disk-header row and the statistics of all the disks/CD-ROMs connected to the
adapter. Such reports are generated for all the disk adapters connected to the system.
A disks header row is displayed followed by a line of statistics for each disk that is configured. If the
PhysicalVolume parameter is specified, only those names specified are displayed.
If the PhysicalVolume parameter is specified, one or more alphabetic or alphanumeric physical volumes
can be specified. If the PhysicalVolume parameter is specified, the tty and CPU reports are displayed and
the disk report contains statistics for the specified drives. If a specified logical drive name is not found, the
The Interval parameter specifies the amount of time in seconds between each report. If the Interval
parameter is not specified, the iostat command generates a single report containing statistics for the time
since system startup (boot). The Count parameter can be specified in conjunction with the Interval
parameter. If the Count parameter is specified, the value of count determines the number of reports
generated at Interval seconds apart. If the Interval parameter is specified without the Count parameter, the
iostat command generates reports continuously.
The iostat command is useful in determining whether a physical volume is becoming a performance
bottleneck and if there is potential to improve the situation. The % utilization field for the physical volumes
indicates how evenly the file activity is spread across the drives. A high % utilization on a physical volume
is a good indication that there may be contention for this resource. Since the CPU utilization statistics are
also available with the iostat report, the percentage of time the CPU is in I/O wait can be determined at
the same time. Consider distributing data across drives if the I/O wait time is significant and the disk
utilization is not evenly distributed across volumes.
Beginning with AIX 5.3, the iostat command reports number of physical processors consumed (physc) and
the percentage of entitlement consumed (% entc) in Micro-Partitioning environments. These metrics will
only be displayed on Micro-Partitioning environments.
Note: Some system resource is consumed in maintaining disk I/O history for the iostat command. Use
the sysconfig subroutine, or the System Management Interface Tool (SMIT) to stop history
accounting. While the iostat command is running for Count of iterations and if there is a change in
system configuration that affects the output of iostat command, it prints a warning message about
the configuration change. It then continues the output after printing the updated system
configuration information and the header.
Reports
The iostat command generates four types of reports, the tty and CPU Utilization report, the Disk Utilization
report, the System throughput report and the Adapter throughput report.
tty and CPU Utilization Report: The first report generated by the iostat command is the tty and CPU
Utilization Report. For multiprocessor systems, the CPU values are global averages among all processors.
Also, the I/O wait state is defined system-wide and not per processor. The report has the following format:
Column Description
tin Shows the total number of characters read by the system for all ttys.
tout Shows the total number of characters written by the system to all ttys.
% user Shows the percentage of CPU utilization that occurred while executing at the user level (application).
% sys Shows the percentage of CPU utilization that occurred while executing at the system level (kernel).
% idle Shows the percentage of time that the CPU or CPUs were idle and the system did not have an
outstanding disk I/O request.
% iowait Shows the percentage of time that the CPU or CPUs were idle during which the system had an
outstanding disk I/O request.
physc Number of physical processors consumed, displayed only if the partition is running with shared
processor.
% entc The percentage of entitled capacity consumed, displayed only if the partition is running with shared
processor. Because the time base over which this data is computed can vary, the entitled capacity
percentage can sometimes exceed 100%. This excess is noticeable only with small sampling
intervals.
Methods Used to Compute CPU Disk I/O Wait Time: Operating system version 4.3.3 and later contain
enhancements to the method used to compute the percentage of CPU time spent waiting on disk I/O (wio
time). The method used in AIX 4.3.2 and earlier versions of the operating system can, under certain
circumstances, give an inflated view of wio time on SMPs. The wio time is reported by the commands sar
(%wio), vmstat (wa) and iostat (% iowait).
The method used in AIX 4.3.2 and earlier versions is as follows: At each clock interrupt on each processor
(100 times a second per processor), a determination is made as to which of the four categories
(usr/sys/wio/idle) to place the last 10 ms of time. If the CPU was busy in usr mode at the time of the clock
interrupt, then usr gets the clock tick added into its category. If the CPU was busy in kernel mode at the
time of the clock interrupt, then the sys category gets the tick. If the CPU was not busy, a check is made
to see if any I/O to disk is in progress. If any disk I/O is in progress, the wio category is incremented. If no
disk I/O is in progress and the CPU is not busy, the idle category gets the tick. The inflated view of wio
time results from all idle CPUs being categorized as wio regardless of the number of threads waiting on
I/O. For example, systems with just one thread doing I/O could report over 90 percent wio time regardless
of the number of CPUs it has.
The method used in AIX 4.3.3 and later is as follows: The change in operating system version 4.3.3 is to
only mark an idle CPU as wio if an outstanding I/O was started on that CPU. This method can report
much lower wio times when just a few threads are doing I/O and the system is otherwise idle. For
example, a system with four CPUs and one thread doing I/O will report a maximum of 25 percent wio time.
A system with 12 CPUs and one thread doing I/O will report a maximum of 8 percent wio time. NFS client
reads/writes go through the VMM, and the time that biods spend in the VMM waiting for an I/O to
complete is now reported as I/O wait time.
Disk Utilization Report: The second report generated by the iostat command is the Disk Utilization
Report. The disk report provides statistics on a per physical disk basis. The default report has a format
similar to the following:
% tm_act Indicates the percentage of time the physical disk was active (bandwidth utilization for the drive).
Kbps Indicates the amount of data transferred (read or written) to the drive in KB per second.
tps Indicates the number of transfers per second that were issued to the physical disk. A transfer is an
I/O request to the physical disk. Multiple logical requests can be combined into a single I/O request
to the disk. A transfer is of indeterminate size.
Kb_read The total number of KB read.
Kb_wrtn The total number of KB written.
System Throughput Report: This report is generated if the -s flag is specified. This report provides
statistics for the entire system. This report has the following format:
Kbps Indicates the amount of data transferred (read or written) in the entire system in KB per second.
tps Indicates the number of transfers per second issued to the entire system.
Kb_read The total number of KB read from the entire system.
Kb_wrtn The total number of KB written to the entire system.
Adapter Throughput Report: This report is generated if the -a flag is specified. This report provides
statistics on an adapter-by-adapter basis (for both physical and virtual adapters). This report has the
following format for a physical adapter report:
Kbps Indicates the amount of data transferred (read or written) in the adapter in KB per second.
tps Indicates the number of transfers per second issued to the adapter.
Kb_read The total number of KB read from the adapter.
Kb_wrtn The total number of KB written to the adapter.
The virtual adapter’s default throughput report has the following format:
Kbps Indicates the amount of data transferred (read or written) in the adapter in KB per second.
tps Indicates the number of transfers per second issued to the adapter.
bkread Number of blocks received per second from the hosting server to this adapter.
bkwrtn Number of blocks per second sent from this adapter to the hosting server.
partition-id The partition ID of the hosting server, which serves the requests sent by this adapter.
The virtual adapter’s extended throughput report (-D option) has the following format:
Metrics related to
transfers (xfer:)
Kbps Indicates the amount of data transferred (read or written) in the adapter in KB per
second.
tps Indicates the number of transfers per second issued to the adapter.
bkread Number of blocks received per second from the hosting server to this adapter.
bkwrtn Number of blocks per second sent from this adapter to the hosting server.
partition-id The partition ID of the hosting server, which serves the requests sent by this adapter.
Asynchronous I/O report: The asynchronous I/O report has the following column headers :
avgc Average global AIO request count per second for the specified interval.
avfc Average fastpath request count per second for the specified interval.
maxgc Maximum global AIO request count since the last time this value was fetched.
maxfc Maximum fastpath request count since the last time this value was fetched.
maxreqs Maximum AIO requests allowed.
Disk Input/Output History: To improve performance, the collection of disk input/output statistics has
been disabled. To enable the collection of this data, type:
chdev -l sys0 -a iostat=true
Flags
-a Specifies adapter throughput report.
-A Displays AIO statistics for the specified interval and count.
-d Specifies drive report only.
-D Specifies extended drive report only.
-l Displays the output in long listing mode. The default column width is 80.
-m Specifies statistics for paths.
-P Same as -A option, except data is obtained using the POSIX AIO calls.
-q Specifies AIO queues and their request counts.
-Q Displays a list of all the mounted filesystems and the associated queue numbers with their request
counts.
-R Specifies that the reset of min* and max* values should happen at each interval. The default is to do
the reset only once when iostat is started.
-s Specifies system throughput report.
-t Specifies tty/cpu report only.
-T Specifies time stamp.
-z Resets the disk input/output statistics. Only root users can use this option.
Notes:
1. -q or -Q can be specified only with -A.
2. -a and -s can also be specified with -A, but not when -q or -Q are specified.
3. -t and -d cannot be specified together.
4. -t and -D cannot be specified together.
5. -d and -D cannot be specified together.
6. -R can be specified only with -D.
Examples
1. To display a single history since boot report for all tty, CPU, and Disks, type:
iostat
2. To display a continuous disk report at two second intervals for the disk with the logical name disk1,
type:
iostat -d disk1 2
3. To display six reports at two second intervals for the disk with the logical name disk1, type:
iostat disk1 2 6
4. To display six reports at two second intervals for all disks, type:
iostat -d 2 6
5. To display six reports at two second intervals for three disks named disk1, disk2, disk3, type:
iostat disk1 disk2 disk3 2 6
6. To print the System throughput report since boot, type:
iostat -s
7. To print the Adapter throughput reports at 5-second intervals, type:
iostat -a 5
8. To print 10 System and Adapter throughput reports at 20-second intervals, with only the tty and CPU
report (no disk reports), type:
iostat -sat 20 10
File
/usr/bin/iostat Contains the iostat command.
Related Information
The vmstat command.
The Input and Output Handling Programmer’s Overview in AIX 5L Version 5.3 General Programming
Concepts: Writing and Debugging Programs describes the files, commands, and subroutines used for
low-level, stream, terminal, and asynchronous I/O interfaces.
ipcrm Command
Purpose
Removes message queue, semaphore set, or shared memory identifiers.
Syntax
ipcrm [ -m SharedMemoryID ] [ -M SharedMemoryKey ] [ -q MessageID ] [ -Q MessageKey ] [ -s
SemaphoreID ] [ -S SemaphoreKey ]
Description
The ipcrm command removes one or more message queues, semaphore sets, or shared memory
identifiers.
Flags
-g Group Restricts the removal to unnamed semaphores matching the group specified.
The msgctl, shmctl, and semctl subroutines provide details of the remove operations. The identifiers and
keys can be found by using the ipcs command.
Examples
To remove the shared memory segment associated with SharedMemoryID 18602, enter:
ipcrm -m 18602
Related Information
The ipcs command.
The msgget subroutine, semctl subroutine, semget subroutine, shmctl subroutine, shmget subroutine.
ipcs Command
Purpose
Reports interprocess communication facility status.
Syntax
ipcs [ -m] [ -q] [ -s] [ -S] [ -P] [ -l] [ -a | -b -c -o -p -r -t] [ -T] [ -C CoreFile] [ -N Kernel ] [ -X ]
Description
The ipcs command writes to the standard output information about active interprocess communication
facilities. If you do not specify any flags, the ipcs command writes information in a short form about
currently active message queues, shared memory segments, semaphores, remote queues, and local
queue headers.
The column headings and the meaning of the columns in an ipcs command listing follow. The letters in
parentheses indicate the flags that cause the corresponding heading to appear. The designator all means
the heading is always displayed. These flags only determine what information is provided for each facility.
Note: The key of a shared memory segment is changed to IPC_PRIVATE when the
segment is removed until all processes attached to the segment detach from it.
MODE (all) the facility access modes and flags. The mode consists of 11 characters that are
interpreted as follows:
The next nine characters are interpreted as three sets of 3 bits each. The first set refers to
the owner’s permissions; the next to permissions of others in the user group of the facility
entry; and the last to all others. Within each set, the first character indicates permission to
read, the second character indicates permission to write or alter the facility entry, and the last
character is currently unused.
Note: For the OWNER, GROUP, CREATOR, and CGROUP, the user and group IDs
display instead of the login names.
CBYTES (a,o) The number of bytes in messages currently outstanding on the associated message
queue.
QNUM (a,o) The number of messages currently outstanding on the associated message queue.
QBYTES (a,b) The maximum number of bytes allowed in messages outstanding on the associated
message queue.
LSPID (a,p) The ID of the last process that sent a message to the associated queue. If the last
message sent was from a process in a node other than the node that holds the queue,
LSPID is the PID of the kernel process that actually placed the message on the queue, not
the PID of the sending process.
Flags
-a Uses the -b, -c, -o, -p and -t flags.
-b Writes the maximum number of bytes in messages on queue for message queues, the size of
segments for shared memory, and the number of semaphores in each semaphores set.
-c Writes the login name and group name of the user that made the facility.
-CCoreFile Uses the file specified by the CoreFile parameter in place of the /dev/mem file. The CoreFile
parameter is a memory image file produced by the Ctrl-(left)Alt-Pad1 key sequence.
-l When used with the -S flag, this flag writes the list of SIDs unwrapped.
-m Writes information about active shared memory segments.
-NKernel Uses the specified Kernel (the /usr/lib/boot/unix file is the default).
-o Writes the following usage information:
v Number of messages on queue
v Total number of bytes in messages in queue for message queues
v Number of processes attached to shared memory segments
-p Writes process number information:
v Process number of the last process to receive a message on message queues
v Process number of last process to send a message on message queues
v Process number of the creating process
v Process number of last process to attach or detach on shared memory segments
-P Writes the list of SIDs (segment IDs) associated with the shared memory ID, along with the
number of bytes pinned to that segment and an indication of whether the segment is large-page
enabled or not. If the segment is large-page enabled, a ’Y’ is displayed, otherwise a ’-’ is
displayed.
Notes:
1. If the user specifies either the -C or -N flag, the real and effective UID/GID is set to the real UID/GID of
the user invoking ipcs.
2. Values can change while ipcs is running; the information it gives is guaranteed to be accurate only
when it was retrieved.
Example
Example output from entering ipcs without flags:
IPC status from /dev/mem as of Mon Aug 14 [Link] 1989
T ID KEY MODE OWNER GROUP
Message Queues:
q 0 0x00010381 -Rrw-rw-rw- root system
q 65537 0x00010307 -Rrw-rw-rw- root system
q 65538 0x00010311 -Rrw-rw-rw- root system
q 65539 0x0001032f -Rrw-rw-rw- root system
q 65540 0x0001031b -Rrw-rw-rw- root system
q 65541 0x00010339--rw-rw-rw- root system
q 6 0x0002fe03 -Rrw-rw-rw- root system
Shared Memory:
m 65537 0x00000000 DCrw------- root system
m 720898 0x00010300 -Crw-rw-rw- root system
m 65539 0x00000000 DCrw------- root system
Semaphores:
s 131072 0x4d02086a --ra-ra---- root system
s 65537 0x00000000 --ra------- root system
s 1310722 0x000133d0 --ra------- 7003 30720
Files
/usr/lib/boot/unix Specifies the system kernel image.
/dev/mem Specifies memory.
/etc/passwd Specifies user names.
/etc/group Specifies group names.
/usr/include/sys/ipc.h Contains the header file.
Related Information
The ipcrm command.
The msgrcv subroutine, msgsnd subroutine, semop subroutine, shmat subroutine, shmdt subroutine.
ipfilter Command
Purpose
Extracts different operation headers from an ipreport output file and displays them in a table. Some
customized nfs information regarding requests and replies is also provided.
Syntax
ipfilter [ -f [ u n t x c a ] ] [ -s [ u n t x c a ] ] [ -n [ -d milliseconds ] ] ipreport_output_file
Description
The ipfilter command extracts specific information from an ipreport output file and displays it to a table.
The operation headers currently recognized are: udp, nfs, tcp, ipx, icmp, atm. The ipfilter command has
three different types of reports:
v A single file ([Link]) that displays a list of all the selected operations. The table displays packet
number, Time, Source and Destination, Length, Sequence #, Ack #, Source Port, Destination Port,
Network Interface, and Operation Type.
v Individual files for each selected header ([Link], [Link], [Link], [Link], [Link],
[Link]). The information is the same as [Link].
v A file [Link] that reports on nfs requests and replies. The table contains: Transaction ID #, Type of
Request, Status of Request, Call Packet Number, Time of Call, Size of Call, Reply Packet Number,
Time of Reply, Size of Reply, and Elapsed millisecond between call and reply.
Flags
untxca Specifies operation headers (udp, nfs, tcp, ipx, and icmp and atm respectively).
-d milliseconds Only Call/Reply pairs whose elapsed time is greater than milliseconds are to be shown.
-f [ u n t x c a ] Selected operations are to be shown in [Link].
-n Generates an [Link].
-s [ u n t x c ] Separate files are to be produced for each of the selected operations.
Related Information
The iptrace daemon, ipreport command.
ipreport Command
Purpose
Generates a packet trace report from the specified packet trace file.
Syntax
/usr/sbin/ipreport [ -e ] [ -r ] [ -n ] [ -s ] LogFile
Description
The /usr/sbin/ipreport command generates a trace report from the specified trace file created by the
iptrace command. The LogFile parameter specifies the name of the file containing the results of the
Internet Protocol trace. This file is created by the iptrace command.
Related Information
The iptrace command, trpt command.
ipsec_convert Command
Purpose
Converts IP Security tunnel export files to a format that can be imported by the IBM Secure Network
Gateway.
Syntax
ipsec_convert SNG22 | FW31 [-f export_directory]
Description
IP Security allows the importing of IBM Secure Network Gateway 2.2 and IBM Firewall 3.1 tunnels using
the imptun command. However, these firewall products do not allow the reverse capability. The
ipsec_convert command allows for this capability by translating exported IP Security tunnels to IBM
Firewall tunnels. The translated files will be placed in the current directory.
Flags
SNG22 | FW31 Specifies whether the format of the resulting files will be in the format of IBM Secure Network
Gateway 2.2 or IBM Firewall 3.1 format.
-f Specifies the directory where the exported IPSec files are located.
Related Information
The imptun command.
ipsecstat Command
Purpose
Lists status of IP Security devices, IP Security crypto algorithms, and statistics of IP Security packets.
Syntax
ipsecstat [ -c ] [ -d ] [ -A ] [ -E ]
Description
The ipsecstat command, used without flags, displays the status of the IP Security devices, the crypto
algorithms installed for IP Security, and the statistics of IP Security packets.
The command can be used with flags to only list the status of IP Security devices, to only list the installed
algorithms, or to reset statistic counters (to zero).
ipsectrcbuf Command
Purpose
Lists the contents of tracing buffers in the IP Security subsystem.
Syntax
ipsectrcbuf [-l {0|1|2}]
Description
The IP Security subsystem maintains a memory resident trace buffer to help debug if there is a problem.
The content of the buffer, a fixed number of the most recent trace messages, will be in a system dump or
can be listed by running this command with no arguments.
Flags
-l Sets the IP Security trace level. By default, of the nine IP Security trace hooks, only IPSEC_ERROR
trace messages are put into the buffer. To enable or disable the other trace hooks, use the -l flag
with one of the following values:
0 Only IPSEC_ERROR trace messages are written to the buffer. This is the default.
1 IPSEC_FILTER, IPSEC_CAPSUL, IPSEC_CRYPTO, IPSEC_TUNNEL, as well as
IPSEC_ERROR trace messages are written to the buffer.
2 All IP Security trace messages are put into the buffer (that includes IPSEC_FILTER_INFO,
IPSEC_CAPSUL_INFO, IPSEC_CRYPTO_INFO, and IPSEC_TUNNEL_INFO as well as
those in level 1).
iptrace Daemon
Purpose
Provides interface-level packet tracing for Internet protocols.
Syntax
/usr/sbin/iptrace [ -a ] [ -b ][ -e ] [ -u ] [ -PProtocol_list ] [ -iInterface ] [ -pPort_list ] [ -sHost [ -b ] ] [
-dHost ] [ -L Log_size ] [ -B ] [ -T ] [ -S snap_length] LogFile
Description
The /usr/sbin/iptrace daemon records Internet packets received from configured interfaces. Command
flags provide a filter so that the daemon traces only packets meeting specific criteria. Packets are traced
only between the local host on which the iptrace daemon is invoked and the remote host.
The LogFile parameter specifies the name of a file to which the results of the iptrace command are sent.
To format this file, run the ipreport command. The ipreport command may display the message TRACING
DROPPED xxxx PACKETS. This count of dropped packets indicates only the number of packets that the
iptrace command was unable to grab because of a large packet, the size of which exceeded the
socket-receive buffer size. This message does NOT mean that the packets are being dropped by the
system.
Notes:
1. The file specified by the LogFile parameter should not reside on an NFS-mounted file system.
Specifying an output file on an NFS-mounted file system can cause the iptrace daemon to hang. In
this case, you might not be able to kill the iptrace daemon, thus, requiring that you restart the system.
2. If iptrace is killed with kill -9, it is required that you issue iptrace -u to unload the bpf kernel
extensions or simply reboot. Sometimes, on a busy system, it is required that you issue iptrace -u
multiple times due to a possibility that the kernel extension used by iptrace is busy processing
packets.
3. The iptrace command supports srcmstr as well and can be started and stopped from the command
line. If started from the command line, it can be stopped using the kill -9 command.
Flags
-a Suppresses ARP packets.
-b Changes the -d or -s flags to bidirectional mode.
-B Uses bpf for packet capture.
-d Host Records packets headed for the destination host specified by the Host variable. The Host
variable can be a host name or an Internet address in dotted-decimal format.
If used with the -b flag, the -d flag records packets both going to and coming from the host
specified by the Host variable.
-e Enables promiscuous mode on network adapters that support this function.
-i Interface Records packets received on the interface specified by the Interface variable.
-L Log_size This option causes iptrace to log data in such that the LogFile is copied to [Link] at
the start and also every time it becomes approximately Log_size bytes long.
-P Protocol_list Records packets that use the protocol specified by the Protocol_list variable which is a
comma separated list of protocols. The Protocols can be a decimal number or name from the
/etc/protocols file.
-p Port_list Records packets that use the port number specified by the Port_list variable which is a
comma separated list of ports. The Port_list variable can be a decimal number or name from
the /etc/services file.
-s Host Records packets coming from the source host specified by the Host variable. The Host
variable can be a host name or an Internet address in dotted-decimal format.
If used with the -b flag, the -s flag records packets both going to and coming from the host
specified by the Host variable.
-S snap_length Specifies the snap size (how much of each packet is actually captured from wire. The
command iptrace -S 1500 /tmp/[Link] will limit captured packet size to 1500 bytes.
The default is 80 bytes.
-T Creates a tcpdump compatible dump file. To read the output, use ipreport -T or tcpdump -r.
iptrace -T in AIX 5.3.0 is not compatible with release 5.2 and earlier, due to different versions
of packet capture library (libpcap). Captured files created with iptrace -T in AIX 5.3 cannot
be read with standard AIX tcpdump or ipreport on AIX 5.2 and earlier.
-u Unloads the kernel extension that was loaded by the iptrace daemon at startup.
The recorded packets are received on and sent from the local host. All packet flow between the local
host and all other hosts on any interface is recorded. The trace information is placed into the
/tmp/nettrace file.
3. To record packets received on an interface from a specific remote host, enter the command in the
following format:
iptrace - i en0 -p telnet -s airmail /tmp/[Link]
The packets to be recorded are received on the en0 interface, from remote hostairmail, over the
telnet port. The trace information is placed into the /tmp/[Link] file.
4. To record packets coming in and going out from a specific remote host, enter the command in the
following format:
iptrace -i en0 -s airmail -b /tmp/[Link]
The packets to be recorded are received on the en0 interface, from remote hostairmail. The trace
information is placed into the /tmp/[Link] file.
Related Information
The ipreport command, the tcpdump command.
isC2host Command
Purpose
Determine the C2 status of a system.
Syntax
isC2host [ -i | -s ]
Description
The isC2host command returns the configuration status of the host machine. If the host has been
configured to operate in C2 mode, the command exits with a zero (true) code. If the host has not been
configured to operate in C2 mode, the command exits with a non-zero (false) code.
This command may be used in shell scripts where the security status of the host must be known.
The -i option is used to determine the installation status of the system. The C2 status of the system is
determined by examining the ODM database, and the exit status indicates whether or not the system was
installed in C2 mode.
Flags
-i Determine the C2 installation status of the system.
-s Set the C2 status of the system from the ODM.
Subcommands
Exit Status
0 When used with no options, the system has been initialized to operate in C2 mode. When used
with the -s flag, the system was successfully initialized according to the C2 mode setting defined
in the ODM database. When used with the -i flag, the system was installed with C2 enabled.
1 When used with no options, the system has not been initialized to operate in C2 mode. When
used with the -s flag, the system could not be initialized to operate in the security mode that was
defined in the ODM. When used with the -i flag, the system was installed with C2 enabled but is
not currently operating in C2 mode.
2 When used with the -s option, the isC2host command was executed by a non-root user. When
used with the -i option, the system was not installed with C2 enabled.
3 The isC2host command was executed with an invalid command line option.
Files
/usr/sbin/isC2host Contains the isC2host command.
Related Information
The chC2admin command, lsC2admin command, mkC2admin command, rmC2admin command.
isCChost Command
Purpose
Determine the Common Criteria enabled status of a system.
Syntax
isCChost [ -i | -s ]
Description
The isCChost command returns the configuration status of the host machine. If the host has been
configured to operate in Common Criteria enabled mode, the command exits with a zero (true) code. If the
host has not been configured to operate in Common Criteria enabled mode, the command exits with a
non-zero (false) code.
This command may be used in shell scripts where the security status of the host must be known.
The -s option is used to initialize AIX in Common Criteria enabled mode and may only be issued by the
root user. The Common Criteria enabled status of the system is determined by examining the ODM
database. On a system that has not been installed with Common Criteria enabled, as indicated by the
ODM, this option performs no operation.
Flags
-i Determine the Common Criteria enabled installation status of the system.
-s Set the Common Criteria enabled status of the system from the ODM.
Subcommands
Exit Status
0 When used with no options, the system has been initialized to operate in Common Criteria
enabled mode. When used with the -s flag, the system was successfully initialized according to
the Common Criteria enabled mode setting defined in the ODM database. When used with the -i
flag, the system was installed with Common Criteria enabled enabled.
1 When used with no options, the system has not been initialized to operate in Common Criteria
enabled mode. When used with the -s flag, the system could not be initialized to operate in the
security mode that was defined in the ODM. When used with the -i flag, the system was installed
with Common Criteria enabled but is not currently operating in Common Criteria enabled mode.
2 When used with the -s option, the isCChost command was executed by a non-root user. When
used with the -i option, the system was not installed with Common Criteria enabled.
3 The isCChost command was executed with an invalid command line option.
Files
/usr/sbin/isCChost Contains the isCChost command.
Related Information
The chCCadmin command, lsCCadmin command, mkCCadmin command, rmCCadmin command.
istat Command
Purpose
Examines i-nodes.
Syntax
istat {FileName | i-nodeNumber Device}
If you specify the FileName parameter, the istat command writes the following information about the file:
v Device where the file resides
v i-node number of the file, on that device
v File type, such as normal, directory, and block device
v File access permissions
v Name and identification number of the owner and group
Note: The owner and group names for remote files are taken from the local /etc/passwd file.
v Number of links to the file
v If the i-node is for a normal file, length of the file
v If the i-node is for a device, major and minor device designations
v Date of the last i-node update
v Date of the last file modification
v Date of the last reference to the file
If you specify the i-nodeNumber and Device parameters, the istat command also displays, in hexadecimal
values, the block numbers recorded in the i-node.
Examples
1. To display the information in the i-node corresponding to the /usr/bin/ksh file, enter:
istat /usr/bin/ksh
This command displays the i-node information for the /usr/bin/ksh file. The information looks similar
to the following:
Inode 10360 on device 10/6 File
Protection: r-xr-xr-x
Owner: 2(bin) Group: 2(bin)
Link count: 2 Length 372298 bytes
This command displays the information contained in the i-node identified by the number 10360 on the
/dev/hd2 device. In addition to the information shown in Example 1, this displays:
Block pointers (hexadecimal):
2a9a 2a9b 2a9c 2a9d 2a9e 2a9f 2aa0 2aa1
These numbers are addresses of the disk blocks that make up the /usr/bin/ksh file.
Related Information
The fsdb command.
File systems in Operating system and device management explains file system types, management,
structure, and maintenance.
Files in Operating system and device management provides information on working with files.
Directories in Operating system and device management provides an introduction on i-nodes and how they
are used by the file system.
j2edlimit Command
Purpose
Manages quota Limits Classes for JFS2 file systems.
Syntax
To edit Quota Limits Classes:
j2edlimit [ -e ] [ -u | -g ] Filesystem
j2edlimit -l [ -u | -g ] Filesystem
Description
Quotas are managed in JFS2 file systems through the use of Limits Classes. Each Limits Class has hard
and soft limits for disk space and file, and grace periods for exceeding the soft limits. Individual users and
groups may be assigned to a Limits Class and are then subject to the quotas defined by that class. Any
user or group not assigned to a class is subject to the quotas defined by the default class (Class ID 0).
Quota limits for all users or groups in a particular class can be changed by using j2edlimit to modify the
Limits Class, without having to change or duplicate quotas for each user or group. By default, or when
used with the -e flag, the j2edlimit command edits the User Limits Classes for the file system specified on
the command line. When used with the -g flag, the j2edlimit command edits the Group Limits Classes for
the specified file system. The command creates a temporary file that contains the file system’s current
limits classes, then invokes the vi editor (or the editor specified by the EDITOR environment variable) on
the temporary file so that the limits classes can be added and modified. When the editor is exited, the
command reads the temporary file and modifies the binary quota files to reflect any changes.
Flags
-a Assigns the User or Group specified by the -u or -g flag to the indicated Limits Class in the file system
specified on the command line.
-d Sets the indicated Limits Class as the default for the file system specified on the command line. By default,
or with the -u flag, the default is set for User quotas. With the -g flag, the default is set for Group quotas.
-e Edits the Limits Classes for the file system specified on the command line (this is the default operation for
the j2edlimit command). By default, or with the -u flag, the default is set for User quotas. With the -g flag,
the default is set for Group quotas.
-g When used with the -d, -l or optional -e flag, performs the peration on the Group Limits Classes for the file
system specified on the command line. When used with the -a flag, assigns the associated Group to the
specified Limits Class.
Note: If the parameter contains all numbers then it will be treated as a Group ID, and the Group ID will be
assigned to the Limits Class.
-l Lists the Limits Classes for the file system specified on the command line. By default, or with the -u flag,
User limits classes are listed. With the -g flag, Group limits classes are listed. The format of the listing is the
same as found in the temporary file when editing Limits Classes.
Security
Access Control:
Only the root user can execute this command.
Examples
1. To edit User Limits Classes for the /home file system:
j2edlimit /home
2. To list Group Limits Classes for the /home file system:
j2edlimit -l -g /home
3. To set User Limits Class ID 2 as the default for the /foo file system:
j2edlimit -d2 /foo
4. To assign user markg to Limits Class ID 1 in the /home file system:
j2edlimit -a 1 -u markg /home
Files
[Link] Contains usage and Limits information for users.
[Link] Contains usage and Limits information for groups.
/etc/filesystems Contains file system names and locations.
Related Information
The quota command, quotacheck command quotaon, quotaoff command, and repquota command.
The Disk quota system overview and Setting up the disk quota system in the Security.
jobs Command
Purpose
Displays status of jobs in the current session.
Syntax
jobs [ -l | -n | -p ] [ JobID ... ]
Description
The jobs command displays the status of jobs started in the current shell environment. If no specific job is
specified with the JobID parameter, status information for all active jobs is displayed. If a job termination is
reported, the shell removes that job’s process ID from the list of those known by the current shell
environment.
The /usr/bin/jobs command does not work when operating in its own command execution environment,
because that environment does not have applicable jobs to manipulate. For this reason, the jobs
command is implemented as a Korn shell or POSIX shell regular built-in command.
job-number Indicates the process group number to use with the wait, fg, bg, and kill commands. When
used with these commands, prefix the job number with a % (percent sign).
current A + (plus sign) identifies the job that will be used as a default for the fg or bg commands.
This job ID can also be specified using the %+ (percent sign, plus) or %% (double percent
sign).
A - (minus sign) identifies the job that becomes the default if the current default job exits.
This job ID can also be specified using %- (percent sign, minus).
For other jobs, the current field is a space character. Only one job can be identified with a
+, and only one job can be identified with a -. If there is a single suspended job, that will be
the current job. If there are at least two suspended jobs, then the previous job is also
suspended.
state Displays one of the following values (in the POSIX locale):
Running
Indicates that the job has not been suspended by a signal and has not exited.
Done Indicates that the job completed and returned exit status 0.
Done (code)
Indicates that the job completed normally and that it exited with the specified
non-zero exit status code. This code is expressed as a decimal number.
Stopped
Indicates that the job was suspended.
Stopped (SIGTSTP)
Indicates that the SIGTSTP signal suspended the job.
Stopped (SIGSTOP)
Indicates that the SIGSTOP signal suspended the job.
Stopped (SIGTTIN)
Indicates that the SIGTTIN signal suspended the job.
Stopped (SIGTTOU)
Indicates that the SIGTTOU signal suspended the job.
command The associated command that was given to the shell.
If the -l flag is specified, a field containing the process group ID is inserted before the state field. Also,
more processes in a process group may be output on separate lines, using only the job-number and
command fields.
Flags
-l (lowercase L) Provides more information about each job listed. This information includes the job number,
current job, process group ID, state, and the command that initiated the job.
-n Displays only jobs that have stopped or exited since last notified.
-p Displays the process IDs for the process group leaders for the selected jobs.
By default the jobs command displays the status of all stopped jobs, all running background jobs, and all
jobs whose status has changed but not been reported by the shell.
Exit Status
The following exit values are returned:
0 Successful completion.
Examples
1. To display the status of jobs in the current environment, enter:
jobs -l
Using the jobs reported in Example 1, the screen displays the following process ID:
465
Files
/usr/bin/ksh Contains the Korn shell jobs built-in command.
/usr/bin/jobs Contains the jobs command.
Related Information
The bg command,csh command, fg command, kill command, ksh command, wait command.
join Command
Purpose
Joins the data fields of two files.
Syntax
join [ -a FileNumber | -v FileNumber ] [ -e String ] [ -o List ] [ -t Character ] [ -1 Field ] [
-2 Field ] File1 File2
Description
The join command reads the files specified by the File1 and File2 parameters, joins lines in the files
according to the flags, and writes the results to standard output. The File1 and File2 parameters must be
text files. Both File1 and File2 must be sorted in the collating sequence of sort -b on the field that they are
being joined by before invoking the join command.
One line appears in the output for each identical join field appearing in both files. The join field is the field
in the input files examined by the join command to determine what will be included in the output. The
output line consists of the join field, the rest of the line from the file specified by the File1 parameter, and
the rest of the line from the file specified by the File2 parameter. Specify standard input in place of either
the File1 or File2 parameter by substituting a - (dash) as the file name. Both input files cannot be specified
with a - (dash).
Fields are usually separated by a space, a tab character, or a new-line character. In this case, the join
command treats consecutive separators as one and discards leading separators.
Exit Status
This command returns the following exit values:
0 Successful completion.
>0 An error occurred.
Examples
Note: The vertical alignment shown in the following examples might not be consistent with your output.
1. To perform a simple join operation on two files where the first fields are the same, type:
join phonedir names
Each line consists of the join field (the last name), followed by the rest of the line found in the phonedir
file and the rest of the line in the names file.
2. To display unmatched lines with the join command, type:
If the phonedir and names files are the same as in Example 1, the join command displays:
Erwin G. 555-1234 Dept. 389
Frost Dept. 217
Nicholson Dept. 311
Norwood M. 555-5341 Dept. 454
Wright M. 555-1234 Dept. 520
Xandy G. 555-5015 Dept. 999
This command performs the same join operation as in Example 1, and also lists the lines of names
that have no match in the phonedir file. The names Frost and Nicholson are included in the listing,
even though they do not have entries in the phonedir file.
3. To display selected fields with the join command, type:
If the phonedir file and names files are the same as in Example 1, the join command displays:
389 Erwin G. 555-1234
454 Norwood M. 555-5341
520 Wright M. 555-1234
999 Xandy G. 555-5015
4. To perform the join operation on a field other than the first, type:
This command combines the lines in the phonedir and numbers files, comparing the third field of the
phonedir file to the first field of the numbers file.
First, this command sorts the phonedir file by the third field, because both files must be sorted by their
join fields. The output of the sort command is then piped to the join command. The - (dash) by itself
then this command displays the names listed in the phonedir file or each telephone number:
555-0256 Jackson J.
555-1234 Erwin G.
555-1234 Wright M.
Note that the join command lists all the matches for a given field. In this case, the join command lists
both Erwin G. and Wright M. as having the telephone number 555-1234. The number 555-5555 is not
listed because it does not appear in the phonedir file.
Files
/usr/bin/join Contains the join command.
/usr/lib/nls/loc/*.src Contains collation information.
Related Information
The awk command, comm command, cut command, paste command, sort command.
National Language Support Overview for Programming in AIX 5L Version 5.3 National Language Support
Guide and Reference.
joinvg Command
Purpose
Joins a snapshot volume group back into its orginal volume group.
Syntax
joinvg [ -f ] VGname
Description
Joins a snapshot volume group that was created with the splitvg command back into its orginal volume
group. The snspshot volume group is deleted and the disks reactivated in the orginal volume group. Any
stale partitions will be resycrhonized by a background process.
Flags
-f Forces the join when disks in the snashot volume group are not active. The mirror copy on the
inactive disks will be removed from the orginal volume group.
VGname The orginal volume group name with the splitvg command.
Examples
To join the the original volume group, testvg, with the snapshot volume group snapvg, type:
joinvg testvg
Files
/usr/sbin Directory where the joinvg command resides.
Related Information
The splitvg and recreatevg commands.
kdb Command
Purpose
Allows for the examining of a system dump or a running kernel.
Syntax
kdb -h
Description
The kdb command is an interactive utility for examining an operating system image or the running kernel.
The kdb command interprets and formats control structures in the system and provides miscellaneous
functions for examining a dump.
Root permissions are required to use the kdb command on the active system because the /dev/pmem
special file is used. To run the kdb command on the active system, type the following:
kdb
Note: Stack tracing of the current process on a running system does not work.
To invoke the kdb command on a system image file, type the following:
kdb SystemImageFile
When kdb starts, it looks for a .kdbinit file in the user’s home directory and in the current working
directory. If a .kdbinit file exists in either of these locations, kdb will execute all of the commands inside
the file as if they were entered at the interactive kdb prompt. If a .kdbinit file exists in both of these
locations, the file in the home directory will be processed first, followed by the file in the current working
directory (unless the current directory is the home directory, in which case the file is processed only once).
Parameters
KernelFile Specifies the AIX kernel that kdb will use to resolve kernel symbol defintions. A
kernel file must be available. When examining a system dump, it is imperative that
the kernel file be the same as the kernel that was used to take the system dump.
The default value is /unix.
KernelModule Specifies the file names of any additional kernel modules that kdb uses to resolve
symbol definitions not found in the kernel file itself.
SystemImageFile Specifies the file that contains the system image. The value can indicate a system
dump, the name of a dump device, or the /dev/pmem special file. The default value
is /dev/pmem.
Examples
The following examples demonstrate invocation options for the kdb command:
1. To invoke the kdb command with the default system image and kernel image files, type the following:
kdb
The kdb program returns a (0)> prompt and waits for the entry of a subcommand.
2. To invoke the kdb command using a dump file named /var/adm/ras/vmcore.0 and the UNIX® kernel
file named /unix, type the following:
kdb /var/adm/ras/vmcore.0 /unix
Files
/usr/sbin/kdb Contains the kdb command.
/dev/pmem Default system image file.
/unix Default kernel file.
Related Information
AIX 5L Version 5.3 KDB Kernel Debugger and kdb command
kdestroy Command
Purpose
Destroys a Kerberos credentials cache.
Syntax
kdestroy [ -q] [ -c cache_name | -e expired_time]
Description
The kdestroy command deletes a Kerberos credentials cache file.
If you specify the -e flag, the command checks all of the credentials cache files in the default cache
directory (/var/krb5/security/creds) and deletes any file which contains only expired tickets, provided the
tickets have been expired for the specified expired_time.
Flags
-c cache_name Specifies the name of the credentials cache you want to destroy. The default credentials cache is
destroyed if you do not specify a command flag.
If the KRB5CCNAME environment variable is set, its value is used to name the default
credentials (ticket) cache.
You must specify the expired_time components in this order but you can omit any component.
For example, 4h5m represents four hours and 5 minutes and 1w2h represents 1 week and 2 hours.
If you only specify a number, the default is hours.
-q Suppress the beep when kdestroy fails to destroy the ticket.
Examples
1. To delete the default credentials cache for the user, type:
kdestroy
2. To delete all credentials cache with expired tickets older than one day, type:
kdestroy -e 1d
Files
/usr/krb5/bin/kdestroy
/var/krb5/security/creds/krb5cc_[uid] default credentials cache ([uid] is the UID of
the user.)
Related Information
The kinit command, klist command, and env command.
keyadd Command
Purpose
keyadd retrieves objects from the source keystore and adds them to the destination keystore.
Syntax
keyadd [-S servicename] -l label -s source_keystore [-d destination_keystore] [username]
Description
The keyadd command retrieves the objects named by label from the source keystore and adds them to
the destination keystore. In a keystore, a user may have the private key, public key and the certificate
stored using the same label. All objects matching a label are copied regardless of the object type. If an
object with the same label already exists in the destination keystore, the command returns an error. This
forces the user to explicitly remove an existing object instead of blindly destroying it.
The -S option specifies which end-entity services and libraries to use while adding the objects from the
keystore. Available services are defined in /usr/lib/security/pki/[Link]. When invoked without -S,
keydelete will use the default service, which is local. It is an error to specify a servicename which does
not have an entry in the /usr/lib/security/ pki/[Link] file.
The -l option must be specified. This label uniquely identifies an object in the keystore to be copied. The
-s option must also be specified.
If the -d option is not given, the username’s default keystore file will be used as the destination keystore
The user’s default keystore location is /var/pki/security/keys/<username>.
If no username is given, the currend user’s username will be used. The user will be prompted for the
password of the destination keystore and the source keystore. If the destination keystore does not exist,
one will be created and the user will be asked to enter the destination keystore password again for
confirmation.
Exit Status
0 The command completed successfully.
>0 An error occurred.
Security
This is a setuid command. In order to list the contents of a keystore the user must know the password of
the private keystore.
Root and invokers belonging to group security are allowed to list anybody’s keystore. However, they can
only successfully complete this operation if they know the password to the keystore. A non-privileged user
is only allowed to list the keystore that he owns.
Audit
This command records the following event information:
KEY_Add <username>
Examples
To copy a keystore object labeled as label from /var/pki/security/keys/[Link] to
/var/pki/security/keys/[Link], enter:
$ keyadd -s /var/pki/security/keys/[Link] -d /var/pki/
security/keys/[Link] -l label pkitest
Files
/usr/lib/security/pki/[Link]
/usr/lib/security/pki/[Link]
Related Information
The certadd, certcreate, certdelete, certget, certlink, certlist, certrevoke, certverify, keydelete,
keylist, keypasswd and mksecpki commands.
keycomp Command
Purpose
Compiles a keyboard mapping file into an input method keymap file.
Syntax
keycomp <Infile >Outfile
You can bind characters and strings to keys on a keyboard with specified combinations of modifier keys
called keyboard states, or you can specify particular key and state combinations as unbound (return
nothing). All input keys are represented by keysyms, which stand for the key symbols that are usually used
in the AIXwindows environment to represent keyboard input.
Any combination of modifier keys is possible when you press a key on the keyboard, but usually the keys
are mapped into a smaller set of states. This state mapping can be specified.
Hexadecimal ( \xXX), octal ( \oOOO), and decimal ( \dDDD) notations of a byte can be contained in
character and string items.
Keyboard States
Modifier keys (Shift, Lock, Ctrl, Alt, and Alt Graphics keys) change the state of the keyboard. They are
used to select one item from a line corresponding to the input keysym. A value that is a combination of
bits, each bit corresponding to a modifier key, indicates the state of a keyboard. The modifier keys
increase in significance in the following order: Shift, Lock, Ctrl, Alt, and Alt Graphic modifier keys.
The bit combination or state value of a keyboard is mapped to one item of a line. The mapping is defined
by the line beginning with the %M control, which can contain only numbers. The first number after the %M
control is the item number. The numbers that follow the first number represent keyboard states, and they
are all mapped to the item. See “Examples.”
Flags
<InFile Specifies a source file to be compiled by the keycomp command.
>OutFile Specifies the name of the keymap file to be created.
Examples
1. The following is an example of a line for XK_a keysym input:
XK_a’a’ XK_A XK_A XK_a ’\x01’ U "hello"
A , (comma) can, but need not, follow each item. Regardless of whether a comma follows an item, a
space or tab must separate the items.
Files
/usr/include/x11/keysymdef.h Contains standard keysym definitions.
/usr/include/x11/aix_keysym.h Contains unique keysym definitions.
/usr/bin/keycomp Contains the keycomp command.
/usr/lib/nls/loc/*.[Link] Contains imkeymap source information.
/usr/lib/nls/loc/*.imkeymap Maps a keysym/modifier to a string.
Related Information
The IMInitializeKeymap subroutine.
The Input Method Overview in AIX 5L Version 5.3 National Language Support Guide and Reference.
The National Language Support Overview in AIX 5L Version 5.3 National Language Support Guide and
Reference.
keydelete Command
Purpose
Deletes an object (key, certificate, etc) identified by the label from a keystore. If the label is ALL, all objects
are deleted.
Syntax
keydelete [ -S ServiceName ] -l Label [ -p PrivateKeystore ] [ UserName ]
Description
The keydelete command deletes an object (key, certificate, etc) identified by the Label. If the Label is ALL,
all objects are deleted. The -S flag specifies which end-entity services and libraries to use while deleting
the objects from the keystore. Available services are defined in /usr/lib/security/pki/[Link]. When invoked
without -S, keydelete uses the default service, which is local. An error is returned if a ServiceName is
specified which does not have an entry in the /usr/ lib/security/pki/[Link] file.
The -l flag must be specified. The Label is a variable length text string that is used to map a key in the
keystore to the certificate which contains the matching public key. If the Label is ALL, all the objects in the
keystore are deleted.
If the -p flag is not given, the username’s default keystore file is used. The user’s default keystore location
is /var/pki/security/keys/<UserName>.
If no UserName is given, the current user’s user name is used. The user is prompted for the password of
the keystore.
Arguments
username - Specifies the user whose key is going to be deleted.
Security
This is a privileged (set-UID root) command.
In order to list the contents of a keystore, the user must know the password of the private keystore.
root and invokers belonging to group security are allowed to list anybody’s keystore. However, they can
only successfully complete this operation if they know the password to the keystore. A non-privileged user
is only allowed to list the keystore that he owns.
Audit
This command records the following event information:
KEY_Delete <UserName>
Examples
1. To delete a keystore object with a label signcert from the invoker’s default keystore, type:
keydelete -l signcert
2. To delete all the objects from the invoker’s default keystore, type:
keydelete -l ALL
3. To delete a keystore object with a label signcert from the keystore /home/bob/ [Link], type:
keydelete -p /home/bob/[Link] -l signcert
Files
/usr/lib/security/pki/[Link]
Related Information
The keyadd, keylist, and keypasswd commands.
keyenvoy Command
Purpose
Acts as an intermediary between user processes and the keyserv daemon.
Syntax
/usr/sbin/keyenvoy
Description
The keyenvoy command acts as an intermediary by some Remote Procedure Call (RPC) programs
between their user processes and the keyserv daemon. An intermediary is necessary because the
keyserv daemon talks only to root processes. This program cannot be run interactively.
Related Information
The keyserv daemon.
Network File System (NFS) Overview for System Management in Networks and communication
management.
Network Information Services (NIS) Overview for System Management in AIX 5L Version 5.3 Network
Information Services (NIS and NIS+) Guide.
NIS Reference.
keylist Command
Purpose
keylist lists the keystore labels in a private keystore.
Syntax
keylist [-S servicename] [-v | -c] [-p privatekeystore] [username]
Description
The keylist command lists the keystore labels in a private keystore. The -S option specifies which
end-entity services and libraries to use while listing the labels in the keystore. Available services are
defined in /usr/lib/security/pki/[Link]. When invoked without -S, keylist will use the default service, which
is local. It is an error to specify a servicename which does not have an entry in the /usr/lib/security/pki/
[Link] file. The user optionally may provide the location of the private keystore. If not given, the default
location will be used. If the -c option is given, the type of the keystore object corresponding to the label will
be specified by one letter symbol. The following are the symbols denoting the keystore object types:
P = Public Key
p = Private Key
T = Trusted Key
S = Secret Key
C = Certificate
t = Trusted Certificate
U = Useful Certificate
If the -v option is used, the type of the object for a label will be given in non-abbreviated version ( for
example, Public Key, Secret Key).
If required, the user will be prompted for the password of the underlying service keystore.
Arguments
username Specifies the AIX user whose key labels is going to be queried.
Exit Status
0 Successful completion.
>0 An error occured.
Security
This is a privileged (set-UID root) command.
In order to list the contents of a keystore the user must know the password of the private keystore.
Root and invokers belonging to group security are allowed to list anybody’s keystore. However, they can
only successfully complete this operation if they have the knowledge of the password to the keystore.
Audit
This command records the following event information:
KEY_List <username>
Examples
1. To list the labels in keystore /var/security/pki/keys/bob, enter:
$ keylist -c -p /var/pki/security/keys/bob bob
PpC label1
PpC label2
2. To list labels/objects in verbose mode, enter:
$ keylist -v -p /var/pki/security/keys/bob bob
Files
/usr/lib/security/pki/[Link]
/usr/lib/security/pki/[Link]
Related Information
The certadd, certcreate, certdelete, certget, certlink, certlist, certrevoke, certverify, keyadd,
keydelete, keypasswd and mksecpki commands.
Purpose
Decrypts and stores the user’s secret key.
Syntax
/usr/bin/keylogin
Description
The keylogin command prompts users for their passwords. Then, the keylogin program decrypts the
user’s secret key, which is stored in the /etc/publickey file. The decrypted key is then stored by the local
keyserv daemon to be used by any secure Remote Procedure Call (RPC) service, such as the Network
File System (NFS).
The decrypted key given to the local keyserv daemon may eventually reach a time out and become
invalid for that particular login session. The user can use the keylogin command again to refresh the key
held by the keyserv daemon.
Files
/etc/publickey Contains public or secret keys for NIS maps.
Related Information
The chkey command, newkey command.
How to Export a File System Using Secure NFS, How to Mount a File System Using Secure NFS in
Security.
Network File System (NFS) Overview for System Management in Operating system and device
management.
Network Information Services (NIS) Overview for System Management in AIX 5L Version 5.3 Network
Information Services (NIS and NIS+) Guide.
keylogout Command
Purpose
Deletes stored secret key.
Syntax
keylogout [ -f ]
Description
The keylogout command deletes the key stored by the key server process keyserv. Further access to the
key is revoked; however, current session keys may remain valid until they expire or are refreshed.
Flags
-f Forces keylogout to delete the secret key for the superuser. By default, keylogout by the superuser
is disallowed because it would break all RPC services, such as NFS, that are started by the
superuser.
Related Information
The at command, chkey command, login command, keylogin command, newkey command.
keypasswd Command
Purpose
keypasswd manages the passwords which are used to access a user’s private keystore.
Syntax
keypasswd [-S servicename] [-p privatekeystore | -k username]
Description
The keypasswd command allows a user to change the password of a private keystore. The user will be
asked to enter the old and new password of the keystore. The -S option specifies which end-entity
services and libraries to use while changing the password. Available services are defined in the
/usr/lib/security/pki/[Link] file. When invoked without -S, keypasswd will use the local service. You will
get an error if you specify a servicename which does not have an entry in the /usr/lib/security/pki/[Link]
file. The -p option specifies the private keystore for which the password is going to be changed. The -k
option specifies the user’s default private keystore. You will get an error if you specify both the -k and -p
options.
Flags
-S servicename Specifies which service module to use.
-p privatekeystore Specifies the private keystore whose password is going to be changed.
-k Specifies that the keystore to be used is that of username.
Security
This is a privileged (set-UID root) command.
To change the password of a keystore one must know the password of the keystore.
Root and invokers belonging to group security are allowed to change the password of any keystore as long
as they know the password of the keystore. A non-privileged user is allowed to change only the keystore
file that they own.
KEY_Password <username>
Examples
1. To change the password of the default private keystore that is owned by Bob, enter:
$ keypasswd
Files
/usr/lib/security/[Link]
/usr/lib/security/[Link]
Related Information
The certadd, certcreate, certdelete, certget, certlink, certlist, certrevoke, certverify, keyadd,
keydelete, keylist, and mksecpki commands.
keyserv Daemon
Purpose
Stores public and private keys.
Syntax
/usr/sbin/keyserv [ -n ]
Description
The keyserv daemon stores the private encryption keys of each user logged into the system. When a user
types in a password during a keylogin, the secret key is decrypted. The decrypted key is then stored by
the keyserv daemon. These decrypted keys enable the user to access secure network services such as
secure Network File System (NFS).
When the keyserv daemon starts, it reads the key for the root directory from the /etc/.rootkey file. This
daemon keeps the secure network services operating normally. For instance, after a power failure, when
the system restarts itself, it gets the key for the root directory from the /etc/.rootkey file.
Flags
-n Prevents the keyserv daemon from reading the key for the root directory from the /etc/.rootkey file. Instead,
the keyserv daemon prompts the user for the password to decrypt the root directory’s key stored in the
network information service map and then stores the decrypted key in the /etc/.rootkey file for future use. This
option is useful if the /etc/.rootkey file ever goes out of date or is corrupted.
Examples
1. To start the keyserv daemon enabling the system to get the key for the root directory from the
/etc/.rootkey file, enter:
This command sequence starts a script that contains the keyserv daemon.
3. To prevent the keyserv daemon from reading the key for the root directory from the /etc/rootkey file,
enter:
chssys -s keyserv -a ’-n’
This command passes the -n argument to the keyserv daemon if SRC is used to start the daemon.
Files
/etc/.rootkey Stores the encrypted key for the root directory.
Related Information
The chssys command, keyenvoy command, startsrc command.
How to Export a File System Using Secure NFS, How to Mount a File System Using Secure NFS in
Security.
Network Information Services (NIS) Overview for System Management in AIX 5L Version 5.3 Network
Information Services (NIS and NIS+) Guide.
NIS Reference.
kill Command
Purpose
Sends a signal to running processes.
Syntax
To Send Signal to Processes
kill [ -s { SignalName | SignalNumber } ] ProcessID ...
Description
The kill command sends a signal (by default, the SIGTERM signal) to a running process. This default
action normally stops processes. If you want to stop a process, specify the process ID (PID) in the
ProcessID variable. The shell reports the PID of each process that is running in the background (unless
A root user can stop any process with the kill command. If you are not a root user, you must have initiated
the process you want to stop.
If the specified SignalNumber is 0, the kill command checks the validity of the specified PID.
Flags
-s{SignalName | SignalNumber} Specifies the signal as a signal number or a signal name, such as -9 or
KILL for the SIGKILL signal.
-SignalName Specifies a signal name, such as SIGHUP.
-SignalNumber Specifies a signal number.
Note: To specify the negative PID with the default signal in this
syntax, you must specify - - as a signal. Otherwise the first
operand is interpreted as a SignalNumber.
ProcessID Specifies a decimal integer representing a process or process group to
be signaled. If PID is a positive value, the kill command sends the
process whose process ID is equal to the PID. If the PID value is 0, the
kill command sends the signal to all processes having a process group
ID equal to the process group ID of the sender. The signal is not sent to
processes with a PID of 0 or 1. If the PID is -1, the kill command sends
the signal to all processes owned by the effective user of the sender.
The signal is not sent to processes with a PID of 0 or 1. If it is a
negative number but not -1, the kill command sends the signal to all
processes that have a process group ID equal to the absolute value of
the PID.
-l Lists all signal names supported by the implementation
-lExitStatus Lists signal names stripped of the common SIG prefix. If ExitStatus is an
decimal integer value, the signal name corresponding to that signal is
displayed. If ExitStatus is a value of the exit status corresponding to a
process that was terminated by a signal, the signal name corresponding
to the signal that terminated the process is displayed.
Exit Status
This command returns the following exit values:
0 At least one matching process was found for each ProcessID operand, and the specified signal was
successfully processed for at least one matching process.
>0 An error occurred.
Examples
1. To stop a given process, enter:
kill 1095
This stops process 1095 by sending it the default SIGTERM signal. Note that process 1095 might not
actually stop if it has made special arrangements to ignore or override the SIGTERM signal.
2. To stop several processes that ignore the default signal, enter:
kill -kill 2098 1569
This sends signal 9, the SIGKILL signal, to all processes having a process group ID equal to the
senders process group ID. Because the shell cannot ignore the SIGKILL signal, this also stops the
login shell and logs you off.
4. To stop all processes that you own, enter:
kill -9 -1
This sends signal 9, the SIGKILL signal, to all processes owned by the effective user, even those
started at other work stations and that belong to other process groups. If a listing that you requested is
being printed, it is also stopped.
5. To send a different signal code to a process, enter:
kill -USR1 1103
The name of the kill command is misleading because many signals, including SIGUSR1, do not stop
processes. The action taken on SIGUSR1 is defined by the particular application you are running.
Note: To send signal 15, the SIGTERM signal with this form of the kill command, you must
explicitly specify -15 or TERM.
Files
/usr/include/sys/signal.h Specifies signal names.
Related Information
The csh command, ksh command, ps command, sh command.
killall Command
Purpose
Cancels all processes except the calling process.
Syntax
killall [ - ] [ -Signal ]
Description
The killall command cancels all processes that you started, except those producing the killall process.
This command provides a convenient means of canceling all processes created by the shell that you
control. When started by a root user, the killall command cancels all cancellable processes except those
processes that started it. If several Signals are specified, only the last one is effective.
Examples
1. To stop all background processes that have started, enter:
killall
This sends all background processes the kill signal 9 (also called the SIGKILL signal).
2. To stop all background processes, giving them a chance to clean up, enter:
killall -
This sends signal 15, the SIGTERM signal; waits 30 seconds, and then sends signal 9, the SIGKILL
signal.
3. To send a specific signal to the background processes, enter:
killall -2
Related Information
The kill command.
kinit Command
Purpose
Obtains or renews the Kerberos ticket-granting ticket.
Syntax
kinit [ -l lifetime ] [ -r renewable_life ] [ -f ] [ -p ] [ -A ] [ -s start_time ] [ -S target_service ] [ -k [ -t
keytab_file ] ] [ -R ] [ -v ] [ -c cachename ] [ principal ]
Description
The kinit command obtains or renews a Kerberos ticket-granting ticket. The Key Distribution Center (KDC)
options specified by the [kdcdefault] and [realms] in the Kerberos configuration file ([Link]) are used if
you do not specify a ticket flag on the command line.
If you are not renewing an existing ticket, the command reinitializes the credentials cache and will contain
the new ticket-granting ticket received from the KDC. If you do not specify the Principal name on the
command line and you do specify the -s flag, the Principal name is obtained from the credentials cache.
The new credentials cache becomes the default cache unless you specify the cache name using the -c
flag.
The ticket Time value for the -l, -r and -s flags is expressed as ndnhnmns where:
n represents a number
You must specify the components in this order but you can omit any component, for example 4h5m
represents four hours and 5 minutes and 1d2s represents 1 day and 2 seconds.
Flags
-A Specifies that the ticket contain a list of client addresses. The ticket will contain the local host
address list if this option is not specified. When an initial ticket contains an address list, it can
be used only from one of the addresses in the the address list.
-c cachename Specifies the name of the credentials cache to use. The default credentials cache is used if
this flag is not specified. If the KRB5CCNAME environment variable is set, its value is used
to name the default ticket cache. Any existing contents of the cache i are destroyed by kinit.
-f Specifies that the ticket is to be forwardable. To forward the ticket, this flag must be specified.
-k Specifies to obtain the key for the ticket principal from a key table. If you do not specify this
flag, you are prompted to enter the password for the ticket principal.
-l lifetime Specifies the ticket end time interval. The ticket cannot be used after the interval expires
unless the ticket is renewed. The interval default time is 10 hours.
-p Specifies that the ticket is to be proxiable. To make the ticket proxiable, this flag must be
specified.
principal Specifies the ticket principal. The principal is obtained from the credentials cache if the
principal is not specified on the command line.
-r renewable_life Specifies the renew time interval for a renewable ticket. The ticket cannot be renewed after
the interval expires. The renew time must be greater than the end time. If this flag is not
specified, the ticket is not renewable, although you can still generate a renewable ticket if the
requested ticket lifetime exceeds the maximum ticket lifetime.
-R Specifies to renew an existing ticket. No other flags may be specified when renewing an
existing ticket.
-s start_time Specifies a request for a postdated ticket, valid starting at start_time.
-S target_service Specifies an alternate service name to use when getting initial tickets.
-t keytab_file Specifies the key table name. The default key table is used if this flag is not specified and the
-k flag is specified. The -t flag implies the -k flag.
-v Specifies that the ticket granting ticket in the cache be passed to the kdc for validation. If the
ticket is within its requested time range, the cache is replaced with the validated ticket.
Examples
1. To obtain a ticket-granting ticket with a lifetime of 10 hours, which is renewable for five days, type:
kinit -l 10h -r 5d my_principal
2. To renew an existing ticket, type:
kinit -R
Files
/usr/krb5/bin/kinit
/var/krb5/security/creds/krb5cc_[uid] default credentials cache ([uid] is the UID of the user.)
/etc/krb5/[Link] default location for the local host’s keytab file.
/var/krb5/krb5kdc/[Link] Kerberos KDC configuration file.
klist Command
Purpose
Displays the contents of a Kerberos credentials cache or key table.
Syntax
klist [[ -c] [ -f] [ -e] [ -s] [ -a] [ -n]] [ -k [ -t] [ -K]] [ name]
Description
The klist command displays the contents of a Kerberos credentials cache or key table.
Flags
-a Displays all tickets in the credentials cache, including expired tickets. Expired tickets are not listed if
this flag is not specified. This flag is valid only when listing a credentials cache.
-c Lists the tickets in a credentials cache. This is the default if neither the -c nor the -k flag is specified.
This flag is mutually exclusive with the -k flag.
-e Displays the encryption type for the session key and the ticket.
-f Displays the ticket flags using the following abbreviations:
F Forwardable ticket
f Forwarded ticket
P Proxiable ticket
p Proxy ticket
D Postdateable ticket
d Postdated ticket
R Renewable ticket
I Initial ticket
i Invalid ticket
H Hardware preauthentication used
A Preauthentication used
O Server can be a delegate
name Specifies the name of the credentials cache or key table. The default credentials cache or key table
is used if you do not specify a filename.
If you do not specify a name indicating a cache name or keytab name, klist displays the credentials
in the default credentials cache or keytab file as appropriate. If the KRB5CCNAME environment
variable is set, its value is used to name the default credentials (ticket) cache.
-k Lists the entries in a key table. This flag is mutually exclusive with the -c flag.
-K Displays the encryption key value for each key table entry. This flag is valid only when listing a key
table.
-n Displays the numerical internet address instead of the host name. The default without the -n is host
name. This command is used in conjunction with the -a flag.
-s Suppresses command output but sets the exit status to 0 if a valid ticket-granting ticket is found in
the credentials cache. This flag is valid only when listing a credentials cache.
-t Displays timestamps for key table entries. This flag is valid only when listing a key table.
Files
/usr/krb5/bin/klist
/var/krb5/security/creds/krb5cc_[uid] default credentials cache ([uid] is the UID of
the user.)
/etc/krb5/[Link] default location for the local host’s keytab
file.
Related Information
The kinit command, kdestroy command, and env command.
kmodctrl Command
Purpose
Loads or unloads the kernel extension /usr/lib/drivers/kmobip6.
Syntax
kmodctrl [ -k kextname ] [ -luq ]
Description
The kernel extension /usr/lib/drivers/kmobip6 contains support for the Mobile IPv6 functionality. This
kernel extension must be loaded in order to configure the system as a mobile IPv6 home agent or
correspondent node. Normally this command will be run automatically by the /etc/rc.mobip6 script if
mobile IPv6 has been enabled using system management.
Flags
-k Specifies an alternate path for the mobility kernel extension.
-l Loads the mobility kernel extension.
-q Checks whether the kernel extension is loaded.
-u Unloads the mobility kernel extension.
Exit Status
0 The command completed successfully.
>0 An error occurred.
Security
You must be the root user or a member of the system group to execute this command.
Examples
1. The following example loads the kmobip6 kernel extension:
kmodctrl -l
Related Information
The mobip6ctrl command, mobip6reqd daemon, ndpd-router command, rc.mobip6 command.
kpasswd Command
Purpose
Changes the password for a Kerberos principal.
Syntax
kpasswd [ Principal]
Description
The kpasswd command changes the password for a specified Kerberos principal. It prompts for the
current principals password, which is used to obtain a changepw ticket from the KDC for the user’s
Kerberos realm. If kpasswd successfully obtains the changepw ticket, the user is prompted twice for the
new password and the password is changed.
If the principal is governed by a policy that specifies for example length and/or number of character
classes required in the new password, the new password must conform to the policy.
You may not change the password for a ticket-granting service principal (krbtgt/domain) using the
kpasswd command.
Parameters
Principal Specifies the principal for which password you want to change. If you do not specify the principal
on the command line, the principal is obtained from the default credentials cache.
Security
When requesting a password change, you must supply both the current password and the new password.
Files
/usr/krb5/bin/kpasswd
/var/krb5/security/creds/krb5cc_[uid] default credentials cache ([uid] is the UID of the user.)
krlogind Daemon
Purpose
Provides the server function for the rlogin command.
Note: The krlogind daemon is normally started by the inetd daemon. It can also be controlled from
the command line, using SRC commands.
Description
The /usr/sbin/krlogind daemon is the server for the rlogin remote login command. The server provides a
remote login facility.
Changes to the krlogind daemon can be made by using Web-based System Manager, the System
Management Interface Tool (SMIT) or System Resource Controller (SRC), by editing the /etc/[Link] or
/etc/services file. Entering krlogind at the command line is not recommended. The krlogind daemon is
started by default when it is uncommented in the /etc/[Link] file.
The inetd daemon get its information from the /etc/[Link] file and the /etc/services file.
After changing the /etc/[Link] or /etc/services file, run the refresh -s inetd or kill -1 InetdPID
command to inform the inetd daemon of the changes to its configuration file.
Error Messages
The following error messages are associated with the krlogind daemon:
Flags
-n Disables transport-level keep-alive messages. The messages are enabled by default.
-s Turns on socket level debugging.
Related Information
The rlogin command.
For information on installing the Web-based System Manager, see Chapter 2: Installing Web-based
System Manager in AIX 5L Version 5.3 Web-based System Manager Administration Guide.
krshd Daemon
Purpose
Provides the server function for remote command execution.
Syntax
/usr/sbin/krshd
Note: The rshd daemon is normally started by the inetd daemon. It can also be controlled from the
command line, using SRC commands.
Description
The /usr/sbin/krshd daemon is the server for the rcp and rsh commands using Kerberos authentication.
The krshd daemon provides remote execution of shell commands. These commands are based on
requests from privileged sockets on trusted hosts. The shell commands must have user authentication.
The krshd daemon listens at the kshell socket defined in the /etc/services file.
Changes to the krshd daemon can be made using the System Management Interface Tool (SMIT) or
System Resource Controller (SRC), by editing the /etc/[Link] or /etc/services file. Entering krshd at
the command line is not recommended. The krshd daemon is started by default when it is uncommented
in the /etc/[Link] file.
The inetd daemon gets its information from the /etc/[Link] file and the /etc/services file.
After changing the /etc/[Link] or /etc/services file, run the refresh -s inetd or kill 1 InetdPID
command to inform the inetd daemon of the changes to its configuration file.
Related Information
The rsh command.
The /etc/[Link] file format, /etc/[Link] file format, and /etc/services file format.
Purpose
Invokes the Korn shell.
Syntax
ksh [ -i ] [ { + | - } { a e f h k m n t u v x } ] [ -o Option ... ] [ -c String | -s | -r | File [ Parameter ] ]
Note: Preceding a flag with + (plus) rather than - (minus) turns off the flag.
Description
The ksh command invokes the Korn shell, which is an interactive command interpreter and a command
programming language. The shell carries out commands either interactively from a terminal keyboard or
from a file.
The Korn shell is backwardly compatible with the Bourne shell (invoked with the bsh command) and
contains most of the Bourne shell features as well as several of the best features of the C shell.
For more information about the Korn shell, refer to Korn shell or POSIX shell commands in Operating
system and device management.
Note: The ksh wait built in behaves in a manner similar to the parent wait() API.
An enhanced version of the Korn shell, called ksh93, is also available. The enhanced Korn shell has
additional features that are not available in the default Korn shell. For information regarding these
additional features, refer to Enhanced Korn shell (ksh93) in Operating system and device management.
Additionally, a restricted version of the Korn shell, called rksh, is available. The restricted Korn shell allows
administrators to provide a controlled execution environment for the users. For more information regarding
restricted Korn shell, refer to Restricted Korn shell in Operating system and device management.
Flags
-a Exports automatically all subsequent parameters that are defined.
-c String Causes the Korn shell to read commands from the String variable. This flag cannot be used with
the -s flag or with the File[Parameter] parameter.
-e Executes the ERR trap, if set, and exits if a command has a nonzero exit status. This mode is
disabled while reading profiles.
-f Disables file name substitution.
-h Designates each command as a tracked alias when first encountered.
-i Indicates that the shell is interactive. An interactive shell is also indicated if shell input and output
are attached to a terminal (as determined by the ioctl subroutine). In this case, the TERM
environment variable is ignored (so that the kill 0 command does not kill an interactive shell) and
the INTR signal is caught and ignored (so that a wait state can be interrupted). In all cases, the
QUIT signal is ignored by the shell.
-k Places all parameter assignment arguments in the environment for a command, not just those
arguments that precede the command name.
-m Runs background jobs in a separate process and prints a line upon completion. The exit status of
background jobs is reported in a completion message. On systems with job control, this flag is
turned on automatically for interactive shells.
-n Reads commands and checks them for syntax errors, but does not execute them. This flag is
ignored for interactive shells.
You can set more than one option on a single ksh command line.
-r Runs a restricted shell. With a restricted shell you cannot:
v Change the current working directory.
v Set the value of the SHELL, ENV, or PATH variable.
v Specify the pathname of a command that contains a / (slash).
v Redirect output of a command with > (right caret), >| (right caret, pipe symbol), <> (left caret,
right caret), or >> (two right carets).
Using this flag is the same as issuing the rksh command.
Files
/usr/bin/ksh Contains the path name to the Korn shell.
/tmp/sh* Contains temporary files that are created when a shell is opened.
Related Information
The env command.
Korn shell or POSIX shell commands and Enhanced Korn shell (ksh93) in Operating system and device
management.
The Restricted Korn shell section in Operating system and device management.
ksh93 Command
Purpose
Invokes the Enhanced Korn shell.
Syntax
ksh93 [ + | - a b c C e f h i k m n p r s t u v x ] [+-R file] [ +-o Option ] [arg...].
Note: Preceding a flag with + (plus) rather than - (minus) turns off the flag.
Description
The ksh93 command invokes the Enhanced Korn shell, which is an interactive command interpreter and a
command programming language. The shell carries out commands either interactively from a terminal
keyboard or from a file.
The Enhanced Korn shell has additional features that are not available in the default Korn shell. For
information regarding these additional features, refer to Enhanced Korn shell (ksh93) in Operating system
and device management.
For more information about the Korn shell, refer to Korn shell or POSIX shell commands in Operating
system and device management.
Note: The ksh93 built-in wait behaves in a manner similar to the parent wait subroutine.
You can set more than one option on a single ksh93 command line.
Exit Status
0 Successful completion.
>0 An error occurred.
Location
/usr/bin/ksh93
Related Information
The env command, the “ksh Command” on page 158.
Korn shell or POSIX shell commands and Enhanced Korn shell (ksh93) in Operating system and device
management.
kvno Command
Purpose
Displays the current key version number for a principal.
Syntax
kvno [ -e etype ] service 1 service2....
Description
The kvno command displays the current key version number for a principal (service 1 service2...). The
security policy must allow a service ticket to be obtained for the principal. The current network identity is
used when requesting the service ticket.
Security
The security policy must allow a service ticket to be obtained for the principal.
Files
/usr/krb5/bin/kvno
Related Information
The klist command.
last Command
Purpose
Displays information about previous logins.
Syntax
last [ -X ] [ -f FileName ] [ -t Time ] [ -n Number | -Number ] [ Name ... ] [ Terminal ... ]
Description
The last command displays, in reverse chronological order, all previous logins and logoffs still recorded in
the /var/adm/wtmp file. The /var/adm/wtmp file collects login and logout records as these events occur
and holds them until the records are processed by the acctcon1 and acctcon2 commands as part of the
daily reporting procedures. When the time daemon, timed, changes the system time, it logs entries in
wtmp under the pseudo-user ″date″. An entry starting with ″date |″ is logged before the change, and one
starting with ″date {″ is logged after the change. This allows for accurate accounting of logins that span a
time change.
Note: If you specify both a Name and Terminal parameter, the last command displays all logins
and logoffs meeting either criterion.
The kill command sends the default SIGTERM signal when it is invoked without any option. If you want to
send the SIGQUIT signal, enter the following:
kill -3 (Process ID)
Flags
-f FileName Specifies an alternate file from which to read logins and logoffs.
-n Specifies the number of lines to be displayed on the list.
-t Time Displays users logged in at the given Time value. The Time variable is specified in the decimal
form [[CC]YY]MMDDhhmm[.SS] where:
CC Specifies the first two digits of the year.
YY Specifies the last two digits of the year.
MM Specifies the month of the year (01 to 12).
DD Specifies the day of the month (01 to 31).
hh Specifies the hour of the day (00 to 23).
mm Specifies the minute of the hour (00 to 59).
SS Specifies the second of the minute (00 to 59).
-X Prints all available characters of each user name instead of truncating to the first 8 characters.
Examples
1. To display all the recorded logins and logoffs by user root or from the console terminal, type:
last root console
2. To display the time between reboots of the system, type:
last reboot
Files
/usr/bin/last Contains the last command.
/var/adm/wtmp Contains connect-time accounting data, including login, logoff, and shutdown records.
For more information about the Accounting System, the preparation of daily and monthly reports, and the
accounting files, see the System accounting in Operating system and device management.
Setting up an accounting subsystem in Operating system and device management describes the steps you
must take to establish an accounting system.
lastcomm Command
Purpose
Displays information about the last commands executed.
Syntax
lastcomm [ -X ][ Command ] [ Name ] [ Terminal ]
Description
The lastcomm command displays information, in reverse chronological order, about all previously
executed commands that are still recorded in the summary files in the /var/adm/pacct directory. You need
to run the /usr/sbin/acct/startup command before you can execute the lastcomm command.
v The name of the command under which the process was called.
v The seconds of CPU time used by the process.
v The time the process was started.
Flags
-X Prints all available characters of each user name instead of truncating to the first 8 characters.
Examples
1. To display information about all previously executed commands recorded in the /var/adm/pacct file,
enter:
Files
/usr/bin/lastcomm Contains the lastcomm command.
/var/adm/pacct The directory that contains the current accounting summary files.
Related Information
The acctcms command.
For more information about the Accounting System, the preparation of daily and monthly reports, and the
accounting files, see the System accounting in Operating system and device management.
Setting up an accounting subsystem in Operating system and device management describes the steps you
must take to establish an accounting system.
lastlogin Command
Purpose
Reports the last login date for each user on the system.
Syntax
/usr/sbin/acct/lastlogin [ -X ]
Description
The lastlogin command updates the /var/adm/acct/sum/loginlog file to show the last date each user
logged in. Normally, the runacct command, running under the cron daemon, calls this command and adds
the information to the daily report. However, the lastlogin command can also be entered by a user who is
a member of the ADM group.
Note: You should not share accounting files among nodes in a distributed environment. Each node
should have its own copy of the various accounting files.
Flags
-X Processes all available characters for each user name instead of truncating to the first 8 characters.
This flag will also cause the lastlogin command to write to the /var/adm/acct/sumx/loginlog file
instead of the /var/adm/acct/sum/loginlog file.
Security
Access Control: This command should grant execute (x) access only to members of the ADM group.
Related Information
The runacct command.
For more information about the Accounting System, the preparation of daily and monthly reports, and the
accounting files, see the System accounting in Operating system and device management.
Setting up an accounting subsystem in Operating system and device management explains the steps you
must take to establish an accounting system.
lb_admin Command
Purpose
Administers the registration of NCS-based servers in location broker databases.
Syntax
lb_admin [ -nq ] [ -version ]
Description
The lb_admin tool administers the registrations of NCS-based servers in global location broker (GLB) or
local location broker (LLB) databases. A server registers universal unique identifiers (UUIDs) specifying an
object, a type, and an interface, along with a socket address specifying its location. A client can locate
servers by issuing lookup requests to GLBs and LLBs. The lb_admin tool can be used to look up
information, add new entries, and delete existing entries in a specified database.
The lb_admin tool is useful for inspecting the contents of location broker databases and for correcting
database errors. For example, if a server terminates abnormally without unregistering itself, use lb_admin
to manually remove its entry from the GLB database.
When accepting input or displaying output, lb_admin uses either character strings or descriptive textual
names to identify objects, types, and interfaces. A character string directly represents the data in a UUID in
the format
[Link]
where each x is a hexadecimal digit. Descriptive textual names are associated with UUIDs in the
[Link] file.
The lb_admin command examines or modifies only one database at a time. This is referred to as the
current database. The use_broker command selects the type of location broker database, GLB or LLB.
The set_broker command selects the host whose GLB or LLB database is to be accessed. If one replica
of a replicated GLB database is modified, the modifications are propagated to the other replicas of that
database.
Subcommands
In the lookup, register, and unregister commands, the object, type, and interface arguments can be
either character strings representing UUIDs or textual names corresponding to UUIDs, as described
earlier.
There are two situations in which it is likely that a database entry should be
deleted:
v The server does not respond. lb_admin succeeds in contacting the LLB at
the host where the server is located, but the server is not registered with
that LLB. The server is probably no longer running.
v Server responds, but its UUIDs do not match the entry in the database.
The server that responded is not the one that registered the entry.
Entries that meet either of these conditions are probably safe to delete.
In other situations, it is best not to delete the entry unless it can be verified
directly that the server is not running (for example, by listing the processes
running on its host).
When lb_admin asks to delete an entry, there are four ways to respond. A
y[es] response deletes the entry. A n[o] response leaves the entry intact in
the database. After a yes or a no, lb_admin proceeds to check the next entry
in the current database. A g[o] response invokes automatic deletion, in which
all eligible entries are deleted and all ineligible entries are left intact, without
the user being queried, until all entries have been checked. A q[uit] response
terminates the clean operation.
d[elete] Synonym for unregister.
h[elp] [Command] or ? [Command] Displays a description of the specified Command or, if none is specified, list
all of the lb_admin commands.
l[ookup] Object Type Interface Looks up and displays all entries with matching Object, Type, and Interface
fields in the current database. An asterisk can be used as a wildcard for any
of the arguments. If all the arguments are wildcards, lookup displays the
entire database.
q[uit] Exits the lb_admin session.
The Flag is either local (the default) or global, indicating whether the entry
should be marked for local registration only or for registration in both the LLB
and GLB databases. The Flag is a field that is stored with the entry but does
not affect where the entry is registered. The set_broker and use_broker
commands select the particular LLB or GLB database for registration.
s[et_broker] [BrokerSwitch] Host Sets the host for the current LLB or GLB. If specifing global as the
BrokerSwitch, set_broker sets the current GLB; otherwise, it sets the current
LLB. The host is a string in the format Family:Host, where Family is an
address family and Host is a host name. Possible values for Family include
ip. A leading # can be used to indicate that a host name is in the standard
numeric form. For example, ip:prague and ip:#[Link] are acceptable
host specifiers.
Related Information
The drm_admin (NCS) command
The glbd (NCS) daemon, llbd (NCS) daemon, nrglbd (NCS) daemon.
Purpose
Gets a list of global location broker (GLB) server daemons and their attributes.
Syntax
lb_find [ -q ] [ -v ] [ -dl ]
Description
The lb_find command sends out inquiries to the NCS location broker daemons and gathers the
responses. The results are analyzed to determine whether the global location broker is replicatable, and
which cell each daemon serves. After ten seconds, the results are summarized, showing the GLB broker
type, the server host’s network address, a cell name of either default or alternate_N, and the cell’s UUID.
Flags
-q Queries for a GLB server, using the standard RPC mechanism. At most, one GLB server is printed, and only
servers in the current machine’s cell are searched. The program exits with a status of 0 if a GLB server is
found; otherwise the status is nonzero.
-v Prints out the NCS version string.
-dl Turns on RPC debugging while searching for GLB servers.
Examples
A network contains one glbd in each of two NCS cells and one nrglbd in a third cell.
/etc/ncs/lb_find
.....
Related Information
The lb_admin command.
The glbd (NCS) daemon, llbd (NCS) daemon, nrglbd (NCS) daemon.
Purpose
Low BandWidth X proxy.
Syntax
lbxproxy [ :<display>] [ -help ] [ -display Display ] [ -motion Number ] [ -terminate | -reset ] [
-reconnect ] [ -I ] [ -nolbx ] [ -nocomp ] [ -nodelta ] [ -notags ] [ -nogfx ] [ -noimage ] [ -nosquish ] [
-nointernsc ] [ -noatomsfile ] [ -atomsfiles File ] [ -nowinattr ] [ -nograbcmap ] [ -norgbfile ] [ -rgbfile
Path ] [ -tagcachesize ] [ -zlevel Level ] [ -compstats ] [ -nozeropad ] [ -cheaterrors ] [ -cheatevents ]
Description
The lbxproxy command accepts client connections, multiplexes them over a single connection to the X
server, and performs various optimizations on the X protocol to make it faster over low bandwidth and/or
high latency connections. Applications that would like to take advantage of the Low Bandwidth extension to
X (LBX) must make their connections to an lbxproxy. These applications need to know nothing about LBX,
they simply connect to the lbxproxy as if were a regular server.
For authentication/authorization, lbxproxy passes the credentials presented by the client along to the
server. Since X clients connect to lbxproxy, it is important that the user’s .Xauthority file contain entries
with valid keys associated with the network ID of the proxy. lbxproxy does not get involved with how
these entries are added to the .Xauthority file. The user is responsible for setting it up.
The lbxproxy program has various flags, all of which are optional.
If :<Display> is specified, the proxy uses the Display port when listening for connections. The display port
is an offset from port 6000, identical to the way in which regular X display connections are specified. If no
port is specified on the command line, lbxproxy defaults to port 63. If the port that the proxy tries to listen
on is in use, the proxy exits with an error message.
At startup, lbxproxy pre-interns a configurable list of atoms. This allows lbxproxy to intern a group of
atoms in a single round trip and immediately store the results in its cache. While running, lbxproxy uses
heuristics to decide when to delay sending window property data to the server. The heuristics depend on
the size of the data, the name of the property, and whether a window manager is running through the
same lbxproxy. Atom control is specified in the AtomControl file, set up during installation of lbxproxy,
with command line overrides.
The file is a simple text file. There are three forms of lines: comments, length control, and name control.
Lines starting with a ! (exclamation point) are treated as comments. A line of the form z length specifies
the minimum length in bytes before property data is delayed. A line of the form options atomname controls
the given atom, where options is any combination of the following characters: i means the atom should be
pre-interned; and w means data for properties with this name should be delayed only if a window manager
is also running through the same lbxproxy.
Flags
-atomsfile File Overrides the default AtomControl file.
-cheaterrors Allows cheating on X protocol for the sake of improved performance. The X protocol
guarantees that any replies, events or errors generated by a previous request are sent before
those of a later request. This puts substantial restrictions on when lbxproxy can short circuit
a request. The -cheaterrors flag allows lbxproxy to violate X protocol rules with respect to
errors. Use at your own risk.
-cheatevents The -cheatevents flag allows lbxproxy to violate X protocol rules with respect to events as
well as errors. Use at your own risk.
ld Command
Purpose
Links object files.
Syntax
ld [ -DNumber ] [ -eLabel ] [ -G ] [ -HNumber ] [ -K ] [ -m ] [ -M ] [ -oName ] [ -r ] [ -s ] [ -SNumber ] [
-TNumber ] [ -u Name ] ... [ -v ] [ -V ] [ -z ] [ -ZString ] ... [ -bOption ] ... [ -LDirectory ] ... { -fFileID ...
-lName ... InputFile ... }
or
Description
The ld command, also called the linkage editor or binder, combines object files, archives, and import files
into one output object file, resolving external references. It produces an executable object file that can be
Alphabetical Listing of Commands 173
run. In addition, if you specify the ld command without the -s flag, you can use the output file as an
InputFile parameter in another call to the ld command. By default, the ld command creates and places its
output in the [Link] file.
The ld command can relink a program without requiring that you list all input object files again. For
example, if one object file from a large program has changed, you can relink the program by listing the
new object file and the old program on the command line, along with any shared libraries required by the
program. See “Examples” on page 191.
The ld command links input files in the order you specify on the command line. If you specify a file more
than once, only the first occurrence of the file is processed. You must specify at least one input file, either
with the -bI (uppercase letter i), -bimport, -bkeepfile, -f, or -l (lowercase letter L) flag or as an InputFile
parameter. (The -bI, -bimport, or -bkeepfile flag is the -b flag used with the I, import, or keepfile option.)
Use the cc command to link files when you are producing programs that run under the operating system.
Because the cc command calls the ld command with common options and necessary support libraries,
you do not need to specify them on the command line. (This information is read from the /etc/[Link] or
/etc/[Link] configuration file.)
Linking Mode
The ld command can link 32-bit objects and programs as well as 64-bit objects and programs, but 32-bit
and 64-bit objects may not be linked together. To specify the mode for linking, you can use the
OBJECT_MODE environment variable or the -b32 or -b64 options.
Archive Files
Archive files are composite objects, which usually contain import files and object files, including shared
objects. If an archive file contains another archive file or a member whose type is not recognized, the ld
command issues a warning and ignores the unrecognized member. If an object file contained in an archive
file has the F_LOADONLY bit set in the XCOFF header, the ld command ignores the member. This bit is
usually used to designate old versions of shared objects that remain in the archive file to allow existing
applications to load and run. New applications link with the new version of the shared object, that is,
another member of the archive.
Shared Objects
A shared object, usually created by another call to the ld command, is an object file with the F_SHROBJ
bit set in the XCOFF header. A shared object defines external symbols that are resolved at run time. If you
specify the -bnso or -bnoautoimp option, the ld command processes a shared object as an ordinary
object file, and if the file is stripped, the link fails.
Ordinarily, a shared object used as input is only listed in the loader section of the output file if a symbol in
the shared object is actually referenced. When the run-time linker is used, however, you might want
shared objects to be listed even if there are no symbols referenced. When the -brtl option is used, all
shared objects listed on the command-line that are not archive members are listed in the output file. The
system loader loads all such shared objects when the program runs, and the symbols exported by these
shared objects may be used by the run-time linker. Shared objects that are archive members are not
loaded automatically unless automatic loading is enabled by an import file in the archive. To enable
automatic loading, see “Import and Export File Format (-bI: and -bE: Flags)” on page 188.
Libraries
Libraries are files whose names end in .a, or possibly .so. To designate a library, you can specify an
absolute or relative path name or use the -l (lowercase letter L) flag in the form -lName. The last form
designates a libName.a file, or in dynamic mode, a [Link] file, to be searched for in several
directories. These search directories include any directories specified by -L flags and the standard library
directories /usr/lib and /lib.
Note: If you specify a shared object, or an archive file containing a shared object, with an absolute or
relative path name, instead of with the -lName flag, the path name is included in the import file ID
string in the loader section of the output file. You can override this behavior with the -bnoipath
option.
Processing
The ld command processes all input files in the same manner, whether they are archives or not. It
includes the symbol tables of all objects, discarding only symbol definitions that duplicate existing symbols.
Unlike some other versions of the ld command, you do not need to order archive files so references
precede definitions. Furthermore, you do not need to list an archive file more than once on the command
line.
The order of the ld command flags does not affect how they are processed, except for the flags used with
input object files, libraries, and import files. These flags are: -L, -f, -l (lowercase letter L), -bkeepfile, and
-bI (uppercase letter i). The flags are processed in the following order:
1. The -L flag adds a directory to the list of search directories to locate libraries specified by the -l
(lowercase letter L) flag. The directories are searched in the order specified. All -L flags are processed
before any -l flags are processed.
2. The ld command processes the InputFile parameters, the files specified by the -f flag and libraries
specified by the -l (lowercase letter L) flag in the order specified.
3. The ld command processes import files specified by the -bI (uppercase letter i) flag in the order
specified after processing all other object files and libraries. You can specify an import file as an input
file without the -bI flag if it is necessary to process the file before processing some object files. In this
case, the first line of the import file must begin with the #! (#, exclamation point) symbols, and the
import file is processed with other input files as described in step 2.
4. The -bkeepfile option names an input file on which the ld command does not perform garbage
collection. If the specified input file is also specified as an InputFile parameter or listed in a file
specified by the -f flag, the -bkeepfile option does not affect the order in which the file is processed.
Otherwise, the file is processed in order along with other input files, as described in step 2.
An output file produced by the ld command has execute permission set, unless you specify the -r flag or
-bnox option or errors were reported while linking. An existing output file is not overwritten if any severe
errors occurred, or if the output file was specified as an input file and any errors occurred.
Symbols
The ld command uses the following predefined symbols to provide special address locations and can be
declared in C syntax as extern char name[ ].The symbol names are:
Garbage Collection
By default, the ld command performs garbage collection, deleting control sections (CSECTs) that are not
referenced when generating the output file.
A CSECT is an indivisible unit of coding or data. A CSECT references another CSECT if it contains a
relocation entry (RLD) referring to a symbol contained in the other CSECT. A referenced CSECT causes
all CSECTs it references to be referenced as well. In addition, a CSECT is referenced if it contains
exported symbols, symbols specified with the -u flag, or the symbol designated as the entry point with the
-e flag.
If a symbol is not referenced but is needed in the output file, you can export the symbol, specify the
symbol with the -u flag, or suppress garbage collection. To suppress garbage collection, use the -r flag or
-bnogc option. To suppress garbage collection for individual object files, use the -bkeepfile option or the
-bgcbypass option. Even when garbage collection is suppressed, unreferenced internal symbols are
deleted.
Flags that the ld command does not support result in an error message. After all unsupported flags are
diagnosed, the ld command stops without further processing.
Flags
The ld command conforms to the XPG Utility Syntax Guidelines, except that the argument — only applies
to the next operand, not to the remaining operands on the command line. For example, in the command
line:
ld -- -s -v
The -s is treated as a filename and the -v is treated as a flag. To have -v treated as a filename, specify:
ld -- -s -- -v
Note: Enter a flag with an operand with or without a space between the flag and the operand. You can
specify numeric values in decimal, octal (with a leading 0), or hexadecimal (with a leading 0x or 0X)
format. If you specify conflicting flags on the command line, the ld command accepts the latest flag
and ignores earlier ones.
-bOption Sets special processing options. This flag can be repeated. For more information on
these options, see “Options (-bOptions)” on page 179.
-d [y | n] When -dy is specified, ld uses dynamic linking; this option is equivalent to the -b so
option. When -dn is specified, ld uses static linking; this option is equivalent to the -b
nso option. The default is -dy. This option is valid only when the -bsvr4 option is
specified.
If the specified Number causes any CSECTS to be unaligned within the output file, the
ld command issues a warning and the output executable file may not load or run.
-K Aligns the header, text, data, and loader sections of the output file so that each section
begins on a page boundary. This flag is equivalent to specifying -HNumber, where
Number is the page size of the machine on which ld is running.
-lName In dynamic mode, processes the [Link] or libName.a file. In all cases, directories
specified by the -L flag or in the standard library directories (/usr/lib and /lib) are
searched to find the file. In dynamic mode, the first directory containing either
[Link] or libName.a satisfies the search. If both files are found in the same
directory, libName.a is used. To preference to [Link], you must specify the rtl
option as well. You can repeat this flag. For more information about dynamic mode, see
“Run-time Linking” on page 188.
Note: The first definition of a symbol is kept, even if no reference to the symbol has
been seen when the archive is read. In other versions of the ld command, a symbol
defined in an archive is ignored if no reference to the symbol has been seen when the
archive is read.
-LDirectory Adds Directory to the list of search directories used for finding libraries designated by the
-l (lowercase letter L) flag. The list of directories, including the standard library
directories, is also recorded in the output object file loader section for use by the system
loader unless you use the -blibpath or -bnolibpath option. You can repeat this flag.
-m or -M Lists to standard output the names of all files and archive members processed to create
the output file. Shared objects and import files are not listed.
-oName Names the output file Name. By default, the name of the output file is [Link].
-r Produces a nonexecutable output file to use as an input file in another ld command call.
This file may also contain unresolved symbols. The -r flag is equivalent to specifying the
erok, noglink, nox, and nogc options with the -b flag. (Subsequent options can
override these options.)
-R Path Valid only when the -bsvr4 option is present on the ld command line. It defines a
colon-separated list of directories used to specify library search directories to the runtime
linker. Path, if present and not NULL, is recorded in the output file’s loader section. Then
it is used when linking an executable with shared libraries at runtime. Multiple instances
of this option are concatenated together with each Path separated by a colon.
-s Strips the symbol table, line number information, and relocation information when
creating the output file. Stripping saves space but impairs the usefulness of the
debuggers. You can also strip an existing executable by using the strip command.
Note: Non-shared objects cannot be linked if they are stripped. A shared object can be
stripped, but a stripped, shared object cannot be used when linking statically.
For more information on large user stacks and 32-bit programs, see “Large Program
Support Overview” in AIX 5L Version 5.3 General Programming Concepts: Writing and
Debugging Programs.
-TNumber Sets the starting address of the text section of the output file to Number. The default
value is 0.
Note: The system loader relocates the text section at run time, so the specified number
affects only addresses listed in address maps or printed by utilities such as the nm or
the dump command.
-uName Prevents garbage collection of the external symbol Name. If the specified symbol does
not exist, a warning is reported. You can repeat this flag.
-v Writes additional information about binder command execution to the loadmap file.
-V Writes the version string of ld to standard error (stderr).
-z In the absence of the -b svr4 option, functions the same as the -K flag.
-z defs Forces a fatal error if any undefined symbols remain at the end of the link. This is the
default when an executable is built. It is also useful when building a shared library to
assure that the object is self-contained, that is, that all its symbolic references are
resolved internally. This option is valid only when the -b svr4 option is specified. It is
equivalent to -b ernotok option.
-z nodefs Allows undefined symbols. This is the default when a shared library is built. When used
with executables, the behavior of references to such undefined symbols is unspecified.
This option is valid only when the -b svr4 option is specified. It is equivalent to -b erok
option.
-z multidefs Allows multiple symbol definitions. By default, multiple symbol definitions occurring
between relocatable objects (.o files) will result in a fatal error condition. This option
suppresses the error condition and allows the first symbol definition to be taken. This
option is valid only when the -b svr4 option is specified.
-z text In dynamic mode only, forces a fatal error if any relocations against the .text section
remain. This option is valid only when the -b svr4 option is specified.
-z nowarntext In dynamic mode only, allows relocations against all mappable sections, including the
.text section. This is the default when building a shared library. This option is valid only
when the -b svr4 option is specified.
-z warntext In dynamic mode only, warns if any relocations against the .text section remain. This is
the default when building an executable. This option is valid only when the -b svr4
option is specified.
-ZString Prefixes the names of the standard library directories with String when searching for
libraries specified by the -l (lowercase letter L) flag. For example, with the -Z/test and
-lxyz flags, the ld command looks for the /test/usr/lib/libxyz.a and /test/lib/libxyz.a
files. When the -ZString flag is used, the standard library directories are not searched.
This flag has no effect on the library path information saved in the loader section of the
output file. This flag is useful when developing a new version of a library. You can repeat
this flag.
The Binder
The ld command verifies the command-line arguments and calls the binder (by default the
/usr/ccs/bin/bind file), passing a generated list of binder subcommands. The binder program actually links
the files. Although the binder is usually called by the ld command, you can start the binder directly. In this
case, the binder reads commands from standard input.
Two options affect the calling of the binder. The binder option specifies which binder to call, and the
nobind option prevents the ld command from calling a binder. Other binder options affect the binder
subcommands that are generated.
The default value for quiet_opt is quiet and the default value for the loadmap_opt is the null string, so the
default command line is:
/usr/ccs/bin/bind quiet
Options (-bOptions)
The following values are possible for the Options variable of the -b flag. You can list more than one option
after the -b flag, separating them with a single blank.
Notes:
1. In the following list of binder options, two option names separated by the word or are synonymous.
2. The FileID indicates a path name. You can use either a relative or a full path name.
3. For a non-repeatable option that is followed by an argument, you can negate the option using a null
argument. That is, specify only the option and the colon.
4. If you specify conflicting options, the last one takes precedence.
32 Specifies 32-bit linking mode. In this mode, all input object files must be XCOFF32 files, or
an error is reported. XCOFF64 archive members are ignored. For import or export files
specifying the mode of certain symbols, 64-bit symbols are ignored. If both -b32 and -b64
options are specified, the last specified option is used. If neither option is specified, the
mode is determined from the value of environment variable OBJECT_MODE.
64 Specifies 64-bit linking mode. In this mode, all input object files must be XCOFF64 files, or
an error will be reported. XCOFF32 archive members are ignored. For import or export
files specifying the mode of certain symbols, 32-bit symbols are ignored. If both -b32 and
-b64 options are specified, the last specified option is used. If neither option is specified,
the mode is determined from the value of environment variable OBJECT_MODE.
asis Processes all external symbols in mixed case. This is the default. To process all external
symbols in uppercase, see the caps option that follows.
autoexp Automatically exports some symbols from the output module without having to list them in
an export file. (This option does not export all symbols from the output module. Use the
-bexpall option to export all symbols.)This is the default. Use this option when linking a
main program. The linker assumes that you are linking a main program when you do not
specify a module type (with the M or modtype option) beginning with S and you do not
use the noentry option.
When you use the autoexp option, if any shared object listed on the command-line
imports a symbol from the special file . (dot), and the module being linked contains a local
definition of the symbol, the symbol is exported automatically.
Other symbols are also exported automatically when you link with the rtl option. If a
symbol defined in the module being linked has one or more additional definitions exported
from a shared object listed on the command-line, and if any of the definitions is a BSS
symbol, the symbol is exported automatically. If the definition in the module being linked is
a BSS symbol, the symbol is exported with the nosymbolic attribute. Otherwise, the
symbol is exported with the symbolic attribute. If the symbol is listed in an export file with
another export attribute, the explicit attribute is used.
If the autoexp option would automatically export a symbol, but the symbol is listed in an
export file with the list attribute, the symbol is not exported.
autoimp or so Imports symbols from any shared objects specified as input files. The shared objects are
referenced but not included as part of the output object file. This is the default.
autoload: Automatically load archive member when the -brtl option is used.
path/file(member)
Use this option when linking object files on the current level of the system that you intend
to relink on AIX 3.1.
cror31 Uses the cror 31,31,31 (0x4ffffb82) instruction as the special no-op instruction following a
call instruction. The default value is ori 0, 0, 0 (0x60000000). See the nop option.
Use this option when linking object files on the current level of the system that you intend
to relink on AIX 3.2.
D: Number [/dsa] or Sets the maximum size (in bytes) allowed for the user data area (or user heap) when the
maxdata:Number[/dsa] executable program is run. This value is saved in the auxiliary header and used by the
system loader to set the soft data ulimit. The default value is 0. When this option is used,
the specified number of bytes are reserved for the user data area. The program may not
explicitly map objects, using shmat or mmap functions, to virtual addresses that are
reserved for the user data area.
For 32-bit programs, the maximum value allowed by the system is 0x80000000 for
programs running under Large Program Support and 0xD0000000 for programs running
under Very Large Program Support. See “Large Program Support Overview” in AIX 5L
Version 5.3 General Programming Concepts: Writing and Debugging Programs. When a
non-zero value is specified, the user data area begins in segment 3, and the program uses
as many segments as neccessary to satisfy the maxdata value specified.
For 64-bit programs the maxdata option provides a guaranteed maximum size for the
programs data heap. Any value can be specified but the data area cannot extend past
0x06FFFFFFFFFFFFF8 regardless of the maxdata value specified.
datapsize:psize Requests psize page sizes in bytes for data. The value can be specified as a decimal,
hexadecimal, or octal number. The number specifications are the same as in C
programming language. Additionally, the page sizes can be specified as a number followed
by a one-character suffix:
v k or K for kilo or 0x400 bytes
v m or M for mega or 0x100000 bytes
v g or G for giga or 0x40000000 bytes
v t or T for tera or 0x10000000000 bytes
v p or P for peta or 0x4000000000000 bytes
v x or X for exo or 0x1000000000000000 bytes
For example, either -b datapsize:16k or -b datapsize:0x4000 will request 0x4000 for
data and set the F_VARPG bit in the XCOFF header.
When you use this option, you might be able to avoid using an export file. On the other
hand, using an export file provides explicit control over which symbols are exported, and
allows you to use other global symbols within your shared object without worrying about
conflicting with names exported from other shared objects. The default is noexpall.
export:FileID Functions the same as the E:FileID option.
f Functions the same as the ernotok option.
gc Performs garbage collection. Use the nogc, gcbypass, or keepfile option to prevent
garbage collection for some or all object files. This is the default.
gcbypass:Number Specifies the number of files to bypass when garbage collecting if the gc option is
specified. This option is ignored if the nogc option is used. If Number is 0, this option is
equivalent to the gc option and garbage collection is performed for all files. The default
value is 0.
This option sorts routines by priority, starting with the routine with the smallest (most
negative) priority. It invokes initialization routines in order, and termination routines in
reverse order.
This option invokes routines with the same priority in an unspecified order, but if multiple
initfini options specify the same priority and both an initialization and termination routine, it
preserves the relative order of the routines. For example, if you specify the options
initfini:i1:f1 and initfini:i2:f2, then function i1 and i2 are invoked in an unspecified order,
but if i1 is invoked before i2 when the module is loaded, f2 will be invoked before f1 when
the module is unloaded.
Note: IBM will only use priorities in the following inclusive ranges:
-2,147,483,640 to -2,147,000,000
-1,999,999,999 to -1,000,000,000
-99,999,999 to -50,000,000
0
50,000,000 to 99,999,999
1,000,000,000 to 1,999,999,999
2,147,000,000 to 2,147,483,640
ipath For shared objects listed on the command-line, rather than specified with the -l flag, use
the path component when listing the shared object in the loader section of the output file.
This is the default.
keepfile:FileID Prevents garbage collection of FileID. By default, the binder deletes unreferenced
CSECTS in all files. You can repeat this option.
When a module is linked, a list of its dependent modules is saved in the module’s loader
section. The system loader automatically loads the dependent modules after the module is
loaded. When lazy loading is enabled, loading is deferred for some dependents until a
function is called in the module for the first time.
A module is lazy loaded when all references to the module are function calls. If variables
in the module are referenced, the module is loaded in the typical way.
Note: Be careful while comparing function pointers if you are using lazy loading. Usually a
function has a unique address to compare two function pointers to determine whether they
refer to the same function. When using lazy loading to link a module, the address of a
function in a lazy loaded module is not the same address computed by other modules.
Programs that depend upon the comparison of function pointers should not use lazy
loading.
For more information about lazy loading, refer to “Shared Libraries and Lazy Loading” in
AIX 5L Version 5.3 General Programming Concepts: Writing and Debugging Programs.
l:FileID or (Lowercase L)Writes each binder subcommand and its results to FileID. By default, no file
loadmap:FileID is produced.
libpath:Path Uses Path as the library path when writing the loader section of the output file. Path is
neither checked for validity nor used when searching for libraries specified by the -l flag.
Path overrides any library paths generated when the -L flag is used.
If you do not specify any -L flags, or if you specify the nolibpath option, the default library
path information is written in the loader section of the output file. The default library path
information is the value of the LIBPATH environment variable if it is defined, and
/usr/lib:/lib, otherwise.
loadmap:FileID Functions the same as the l:FileID option.
m:UR Sets the SGETUREGS flag for the linker. When the SGETUREGS flag is set, the contents
of the registers are stored in a buffer. This option is used by coredump system call.
M:ModuleType or Sets the two-character module-type field and the shared object flag in the object file. The
modtype:ModuleType module type is not checked by the binder, but it should be set to one of the following
values:
1L Single use. Module requires a private copy of the data section for each load.
RE Reusable. Module requires a private copy of the data area for each process
dependent on the module.
RO Read only. Module is read-only, and can be used by several processes at one
time.
If an S prefix is used on any of the preceding options, the shared flag in the
object file is set. The system loader attempts to share a single instance of the
data section of an RO module. Otherwise, the module type is ignored by the
system loader. The default value is 1L.
map:FileID or R:FileID Writes an address map of the output object file to FileID. Symbols are sorted by section
and then by address. By default, no file is produced. To learn more about the map option,
see “Address Maps” on page 190.
maxdata:Number[/dsa] Functions the same as the D:Number[/dsa] option.
maxstack:Number or Functions the same as the -S flag.
S:Number
modtype:ModuleType Functions the same as the M:ModuleType option.
nl or noloadmap Does not write the binder subcommands and their results to a load map file. This is the
default.
noautoexp Prevents automatic exportation of any symbols. The default is the autoexp option.
If both the noobjreorder and noreorder options are specified, the noreorder option takes
precedence. The default is the reorder option.
The last machine instruction specified is the instruction generated by the binder after
intramodule branches. Other specified machine instructions are recognized as no-op
instructions, but are converted to the preferred no-op instruction.
noquiet Writes each binder subcommand and its results to standard output. The default is the
quiet option.
noreorder Does not reorder CSECTs, except to combine all XMC_TC (TOC address constant) and
XMC_TD (TOC variable) CSECTs and place them in the data section, and combine all
BSS symbols and place them in the bss section. All other CSECTs are placed in the text
section, so text and data are mixed in the output file. When the noreorder option is used,
the text section of the output file may no longer be position-independent and the system
loader will not load a module if the text section is not position-independent. Therefore,
avoid using this option for programs and kernel extensions. If both noobjreorder and
noreorder options are specified, the noreorder option takes precedence. The default is
the reorder option.
nortl Disables run-time linking for the output file. This option implies the nortllib and
nosymbolic- options. Furthermore, additional actions described under the rtl option are
not taken. This is the default.
nortllib Does not include a reference to the run-time linker. If a main program is linked with this
option, no run-time linking will take place in the program, regardless of the way any shared
modules were linked that are used by the program. This is the default.
norwexec Specifies that if the system’s sed_config setting is not off, the process’ private data areas
will have non-execute permission.
nostrip Does not generate a stripped output file. Thus, the symbol table and relocation information
is written in the output file. This option overrides the -s flag. This is the default.
nosymbolic Assigns the nosymbolic attribute to most symbols exported without an explicit attribute.
For more information, see “Attributes of Exported Symbols” on page 189. The default is
the nosymbolic- option.
nosymbolic- Assigns the nosymbolic- attribute to most symbols exported without an explicit attribute.
For more information, see “Attributes of Exported Symbols.” This is the default.
notextro or nro Does not check to ensure that there are no load time relocation entries for the text section
of the output object file. This is the default.
notypchk Does not check function-parameter types between external functional calls. The default is
the typchk option.
nov Does not write additional information to the load map file. This option is the default and
overrides the -v flag.
nox Does not make the output file executable. Neither the auxiliary header nor the loader
section is written. Flags and options that specify values written in the auxiliary header or
loader section have no effect when this option is used. The default is the x option.
nro Functions the same as the notextro option.
nso Functions the same as the noautoimp option.
pD:Origin Specifies Origin as the address of the first byte of the file page containing the beginning of
the data section. For example, if the data section begins at offset 0x22A0 in th