Bull Power6 - Serveur d'E-S virtuel et Virtual Computing Guide

Category
Software
Type
Virtual Computing Guide
ESCALA
Virtual I/O Server and
Integrated Virtualization
Manager commands
REFERENCE
86 A1 41EV 05
ESCALA
Virtual I/O Server and
Integrated Virtualization
Manager commands
Hardware
May 2009
BULL CEDOC
357 AVENUE PATTON
B.P.20845
49008 ANGERS CEDEX 01
FRANCE
REFERENCE
86 A1 41EV 05
The following copyright notice protects this book under Copyright laws which prohibit such actions as, but not limited
to, copying, distributing, modifying, and making derivative works.
Copyright © Bull SAS
2009
Printed in France
Trademarks and Acknowledgements
We acknowledge the rights of the proprietors of the trademarks mentioned in this manual.
All brand names and software and hardware product names are subject to trademark and/or patent protection.
Quoting of brand and product names is for information purposes only and does not represent trademark misuse.
The information in this document is subject to change without notice. Bull will not be liable for errors
contained herein, or for incidental or consequential damages in connection with the use of this material.
Contents
Virtual I/O Server and Integrated Virtualization Manager commands listed alphabetically 1
Reading syntax diagrams ...............................1
Exit status for Virtual I/O Server commands ........................1
activatevg command.................................2
alt_root_vg command ................................3
awk command...................................4
backup command .................................20
backupios command ................................25
IVM bkprofdata command ..............................26
bootlist command .................................27
cat command ...................................30
cattracerpt command ................................32
cfgassist command .................................32
cfgdev command .................................33
cfglnagg command .................................34
cfgnamesrv command ................................35
cfgsvc command..................................37
chbdsp command .................................42
chdate command .................................43
chdev command..................................44
IVM chhwres command ...............................45
chlang command .................................52
IVM chled command ................................52
IVM chlparutil command ...............................54
chlv command ..................................55
chmod command .................................55
chpath command .................................59
chrep command ..................................60
chsp command ..................................61
IVM chsvcevent command ..............................63
IVM chsyscfg command ...............................64
IVM chsysstate command ..............................72
chtcpip command .................................74
chuser command .................................75
IVM chvet command ................................77
chvg command ..................................78
chvopt command .................................79
cl_snmp command .................................79
clear command ..................................82
cp command ...................................83
cplv command ..................................86
cpvdi command ..................................87
crontab command .................................88
date command ..................................92
deactivatevg command ...............................95
IVM defsysplanres command .............................96
IVM deploysysplan command .............................97
diagmenu command ................................99
dsmc command .................................100
entstat command .................................102
errlog command .................................106
exportvg command ................................106
extendlv command ................................107
extendvg command ................................108
fcstat command .................................109
fsck command ..................................111
© Copyright IBM Corp. 2007, 2009 iii
ftp command ..................................112
grep command ..................................124
head command ..................................126
hostmap command ................................127
hostname command ................................129
importvg command ................................129
installios command ................................130
invscout command ................................132
ioslevel Command.................................133
ldapadd command ................................133
ldapsearch command ................................134
ldfware command .................................136
license command .................................137
loadopt command .................................138
loginmsg command ................................138
IVM lpar_netboot command .............................139
IVM lpcfgop command ...............................141
ls command ...................................142
lsdev command .................................146
lsfailedlogin command ...............................150
lsfware command .................................150
lsgcl command ..................................151
IVM lshwres command ...............................152
IVM lsled command ................................176
lslparinfo command ................................178
IVM lslparmigr command ..............................178
IVM lslparutil command ..............................181
lslv command ..................................188
lsmap command .................................193
IVM lsmemdev command ..............................198
lsnetsvc command.................................200
lsnports command.................................201
lspath command .................................203
lspv command ..................................206
IVM lsrefcode command ..............................210
lsrep command ..................................213
lssp command ..................................214
lssvc command ..................................216
IVM lssvcevents command ..............................217
lssw command ..................................227
IVM lssyscfg command ...............................228
IVM lssysconn command ..............................242
IVM lssysplan command ..............................244
IVM lssysplanres command .............................245
lstcpip command .................................245
lsuser command .................................247
IVM lsvet command ................................248
lsvg command ..................................249
lsvopt command .................................254
man command ..................................255
migratepv command ................................255
IVM migrlpar command...............................256
mirrorios command ................................260
IVM mkauthkeys command .............................261
mkbdsp command.................................263
mkdir command .................................264
IVM mkgencfg command ..............................265
mkkrb5clnt command ...............................268
mkldap command .................................268
mklv command..................................270
mklvcopy command ................................271
iv Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
mkpath command .................................272
mkrep command .................................273
mksp command .................................274
IVM mksvcevent command .............................275
IVM mksyscfg command ..............................276
IVM mksysplan command ..............................284
mktcpip command ................................285
mkuser command .................................287
mkvdev command ................................288
mkvg command .................................291
mkvopt command .................................292
mkvt command .................................293
more command..................................293
motd command .................................298
mount command .................................298
mv command ..................................299
netstat command .................................302
oem_platform_level command.............................306
oem_setup_env command ..............................306
optimizenet command ...............................307
IVM os_install Command ..............................312
passwd command .................................316
pdump command .................................317
ping command ..................................317
prepdev command ................................319
redefvg command .................................320
reducevg command ................................321
remote_management command ............................322
replphyvol command................................323
restore command .................................324
restorevgstruct command ..............................332
rm command ..................................333
rmbdsp command .................................336
rmdev command .................................337
rmlv command ..................................338
rmlvcopy command ................................338
rmpath command .................................339
rmrep command .................................341
rmsp command..................................341
IVM rmsyscfg command ..............................342
IVM rmsysplan command ..............................343
IVM rmsysplanres command .............................343
rmtcpip command.................................344
rmuser command .................................345
rmvdev command .................................346
rmvopt command .................................346
rmvt command ..................................347
IVM rsthwres command ...............................347
IVM rstprofdata command ..............................350
save_base command ................................351
savevgstruct command ...............................352
seastat command .................................353
sed command ..................................354
showmount command ...............................358
shutdown command ................................359
snap command ..................................360
snmp_info command ................................361
snmp_trap command ................................363
snmpv3_ssw command ...............................364
startnetsvc command ................................364
startsvc command .................................366
Contents v
startsysdump command ...............................367
starttrace command ................................368
stopnetsvc command ................................368
stopsvc command .................................370
stoptrace command ................................371
stty command ..................................371
su command ..................................378
svmon command .................................380
syncvg command .................................383
sysstat command .................................384
tail command ..................................384
tee command ..................................386
topas command .................................387
traceroute command ................................395
uname command .................................397
unloadopt command ................................399
unmirrorios command ...............................399
unmount command ................................400
IVM update_install_setup command...........................400
updateios command ................................402
vasistat command .................................403
vfcmap command .................................411
vi command...................................412
viosecure command ................................431
viostat command .................................433
vmstat command .................................437
wall command ..................................441
wc command ..................................442
who command ..................................444
wkldagent command ................................447
wkldmgr command ................................447
wkldout command ................................448
Appendix. Notices ..............................451
Programming interface information ...........................452
Trademarks ...................................452
Terms and conditions................................453
vi Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
Virtual I/O Server and Integrated Virtualization Manager
commands listed alphabetically
This topic contains links to information about the Virtual I/O Server and Integrated Virtualization
Manager commands, including syntax statements, flag descriptions, and usage examples. Commands are
listed alphabetically.
Reading syntax diagrams
Syntax diagrams are a way to represent command syntax and consist of symbols such as brackets ([ ]),
braces ({ }), and vertical bars (|). The following is a sample of a syntax statement for the lsdev command:
lsdev { -dev DeviceName | -plc PhysicalLocationCode }[-child ][-field FieldName...][-fmt Delimiter ]
The following conventions are used in the command syntax statements:
v Items that must be entered literally on the command line are in bold. These items include the
command name, flags, and literal characters.
v Items representing variables that must be replaced by a name are in italics. These items include
parameters that follow flags and parameters that the command reads, such as Files and Directories.
v Parameters enclosed in brackets are optional.
v Parameters enclosed in braces are required.
v Parameters not enclosed in either brackets or braces are required.
v A vertical bar signifies that you choose only one parameter. For example,[a|b]indicates that you
can choose a, b, or nothing. Similarly,{a|b}indicates that you must choose either a or b.
v Ellipses ( ... ) signify the parameter can be repeated on the command line.
v Thedash(-)represents standard input.
Exit status for Virtual I/O Server commands
The following table defines the standard return codes returned by all of the Virtual I/O Server
commands. Additional return codes unique to a specific command are defined within the individual
command description page.
Return Code Description
0 Success
1 Syntax Error
2 Not Found
1 Command requires an option
1 Command requires the specified option
1 Command requires an attribute
3 Invalid access to execute command
1 Invalid command
1 Invalid flag or argument
1 Invalid option flag
1 Invalid attribute
1 Invalid option combination
© Copyright IBM Corp. 2007, 2009 1
Return Code Description
1 Specified option requires an argument
1 Specified option requires an attribute
1 Specified option also requires another option
1 Specified option is repeated
1 Attributes cannot be repeated
1 Contains an invalid argument
1 Is invalid
1 Too many arguments
1 Too few arguments
1 Unable to acquire permission to execute command
4 Execution of this command did not complete
10 No device found with physical location
11 Too many matches for physical location
12 Too many matches for physical location code
18 Insufficient memory
activatevg command
Purpose
Activates a volume group.
Syntax
activatevg [-f ] VolumeGroup
Description
The activatevg command activates the volume group specified by the VolumeGroup parameter and all
associated logical volumes. When a volume group is activated, physical partitions are synchronized if
they are not current.
Flags
-f Allows a volume group to be made active that does not currently have a quorum of
available disks.
Exit Status
See “Exit status for Virtual I/O Server commands” on page 1.
Examples
1. To activate volume group vg03, type:
activatevg vg03
2 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
Related Information
The mkvg command, the chvg command, the extendvg command, the reducevg command, the mirrorios
command, the unmirrorios command, the lsvg command, the deactivatevg command, the importvg
command, the exportvg command, and the syncvg command.
alt_root_vg command
Purpose
Creates a copy of (clones) the currently running system to an alternative disk.
Syntax
alt_root_vg [-g][-z][-bundle bundle_name -location images_location] -target target_disks...
Description
The alt_root_vg command allows users to copy the current root volume group to an alternate disk and to
update the operating system to the next fix pack level, without taking the machine down for an extended
period of time and mitigating outage risk. This can be done by creating a copy of the current rootvg on
an alternate disk and simultaneously applying fix pack updates. If needed, the bootlist command can be
run after the new disk has been booted, and the bootlist can be changed to boot back to the older level of
the operating system.
Note: The target_disk cannot be a physical volume that is assigned to a shared memory pool (to be used
as a paging space device by a shared memory partition).
Cloning the running rootvg, allows the user to create a backup copy of the root volume group. This copy
can be used as a back up in case the rootvg failed, or it can be modified by installing additional updates.
One scenario might be to clone a 1.3.0.0 system, and then install updates to bring the cloned rootvg to
1.3.0.0-FP8.0. This would update the system while it was still running. Rebooting from the new rootvg
would bring the level of the running system to 1.3.0.0-FP8.0. If there was a problem with this level,
changing the bootlist back to the 1.3.0.0 disk and rebooting would bring the system back to 1.3.0.0. Other
scenarios would include cloning the rootvg and applying individual fixes, rebooting the system and
testing those fixes, and rebooting back to the original rootvg if there was a problem.
At the end of the installation, a volume group, altinst_rootvg, is left on the target disks in the varied off
state as a placeholder. If varied on, it indicates that it owns no logical volumes; however, the volume
group does contain logical volumes, but they have been removed from the ODM because their names
now conflict with the names of the logical volumes on the running system. Do not vary on the
altinst_rootvg volume group; instead, leave the definition there as a placeholder.
After rebooting from the new alternate disk, the former rootvg volume group is displayed in a lspv
listing as old_rootvg, and it includes all disks in the original rootvg. This former rootvg volume group is
set to not vary-on at reboot.
If a return to the original rootvg is necessary, the bootlist command is used to reboot from the original
rootvg.
Flags
-target target_disks Specifies a space-delimited list of the name or names of the target disks where the
alternate rootvg will be created. These disks must not contain any volume group
definitions. The lspv command shows these disks as belonging to volume group None.
Alphabetical list of commands 3
-bundle bundle_name Path name of optional file that contains a list of packages or file sets that are installed
after a rootvg clone is created. You must also specify the -location flag when you
specify the bundle option.
-location image_location Location of the installp images or updates to apply after a clone of rootvg is created.
The location can be a directory and full-path name or device name, such as /dev/rmt0.
-g Skips checks to ensure the disk can boot.
-z Specifies that no types of non-rootvg volume groups are to be imported.
Exit Status
See “Exit status for Virtual I/O Server commands” on page 1.
Examples
To create a boot list of logical devices to be used in the next normal boot, enter the following commands:
alt_root_vg -target hdisk2 -bundle my_bundle -location /tmp/update
alt_root_vg -target hdisk2 -bundle my_bundle -location /home/padmin
Related Information
The bootlist command.
awk command
Purpose
Finds lines in files that match a pattern and performs specified actions on those lines.
Syntax
awk [ -F Ere ][-v Assignment ] ... { -f ProgramFile | Program }[[File ... | Assignment ... ] ] ...
Description
The awk command utilizes a set of user-supplied instructions to compare a set of files, one line at a time,
to extended regular expressions supplied by the user. Then actions are performed upon any line that
matches the extended regular expressions.
The pattern searching of the awk command is more general than that of the grep command, and it allows
the user to perform multiple actions on input text lines. The awk command programming language
requires no compiling, and allows the user to use variables, numeric functions, string functions, and
logical operators.
The awk command is affected by the LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES,
LC_NUMERIC, NLSPATH, and PATH environment variables.
The awk command takes two types of input: input text files and program instructions.
Input Text Files
Searching and actions are performed on input text files. The files arespecified by:
v Specifying the File variable on the command line.
v Modifying the special variables ARGV and ARGC.
v Providing standard input in the absence of the File variable.
4 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
If multiple files are specified with the File variable,the files are processed in the order specified.
Program Instructions
Instructions provided by the user control the actions of the awk command. These instructions come from
either the `Program variable on the command line or from a file specified by the -f flag together with the
ProgramFile variable. If multiple program files are specified, the files are concatenated in the order
specified and the resultant order of instructions is used.
Output for the awk Command
The awk command produces three types of output from the data within the input text file:
v Selected data can be printed to standard output, without alteration to the input file.
v Selected portions of the input file can be altered.
v Selected data can be altered and printed to standard output, with or without altering the contents of
the input file.
All of these types of output can be performed on the same file. The programming language recognized
by the awk command allows the user to redirect output.
File Processing with Records and Fields
Files are processed in the following way:
1. The awk command scans its instructions and executes any actions specified to occur before the input
file is read.
The BEGIN statement in the awk programming language allows the user to specify a set of
instructions to be done before the first record is read. This is particularly useful for initializing special
variables.
2. One record is read from the input file.
A record is a set of data separated by a record separator. The default value for the record separator is
the new-line character, which makes each line in the file a separate record. The record separator can
be changed by setting the RS special variable.
3. The record is compared against each pattern specified by the awk command’s instructions.
The command instructions can specify that a specific field within the record be compared. By default,
fields are separated by white space (blanks or tabs). Each field is referred to by a field variable. The
first field in a record is assigned the $1 variable, the second field is assigned the $2 variable, and so
forth. The entire record is assigned to the $0 variable. The field separator can be changed by using the
-F flag on the command line or by setting the FS special variable. The FS special variable can be set to
the values of: blank, single character, or extended regular expression.
4. If the record matches a pattern, any actions associated with that pattern are performed on the record.
5. After the record is compared to each pattern, and all specified actions are performed, the next record
is read from input; the process is repeated until all records are read from the input file.
6. If multiple input files have been specified, the next file is then opened and the process repeated until
all input files have been read.
7. After the last record in the last file is read, the awk command executes any instructions specified to
occur after the input processing.
The END statement in the awk programming language allows the user to specify actions to be
performed after the last record is read. This is particularly useful for sending messages about what
work was accomplished by the awk command.
Alphabetical list of commands 5
The awk Command Programming Language
The awk command programming language consists of statements in the form:
Pattern { Action }
If a record matches the specified pattern, or contains a field that matches the pattern, the associated
action is then performed. A pattern can be specified without an action, in which case the entire line
containing the pattern is written to standard output. An action specified without a pattern is performed
for every input record.
Patterns
Four types of patterns are used in the awk command language syntax:
Regular Expressions
The extended regular expressions used by the awk command are similar to those used by the grep
command. The simplest form of an extended regular expression is a string of characters enclosed in
slashes. For an example, suppose a file named testfile had the following contents:
smawley, andy
smiley, allen
smith, alan
smithern, harry
smithhern, anne
smitters, alexis
Entering the following command line:
awk '/smi/' testfile
would print to standard output of all records that contained an occurrence of the string smi. In this
example, the program /smi/ for the awk command is a pattern with no action. The output is:
smiley, allen
smith, alan
smithern, harry
smithhern, anne
smitters, alexis
The following special characters are used to form extended regular expressions:
Character Function
+ Specifies that a string matches if one or more occurrences of the character or extended
regular expression that precedes the + (plus) are within the string. The command line:
awk '/smith+ern/' testfile
prints to standard output any record that contained a string with the characters smit,
followed by one or more h characters, and then ending with the characters ern. The output
in this example is:
smithern, harry
smithhern, anne
6 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
Character Function
? Specifies that a string matches if zero or one occurrences of the character or extended
regular expression that precedes the ? (question mark) are within the string. The command
line:
awk '/smith?/' testfile
prints to standard output of all records that contain the characters smit, followed by zero
or one instance of the h character. The output in this example is:
smith, alan
smithern, harry
smithhern, anne
smitters, alexis
| Specifies that a string matches if either of the strings separated by the | (vertical line) are
within the string. The command line:
awk '/allen
|
alan /' testfile
prints to standard output of all records that contained the string allen or alan. The output
in this example is:
smiley, allen
smith, alan
() Groups strings together in regular expressions. The command line:
awk '/a(ll)?(nn)?e/' testfile
prints to standard output of all records with the string ae or alle or anne or allnne. The
output in this example is:
smiley, allen
smithhern, anne
{m} Specifies that a string matches if exactly m occurrences of the pattern are within the string.
The command line:
awk '/l{2}/' testfile
prints to standard output
smiley, allen
{m,} Specifies that a string matches if at least m occurrences of the pattern are within the string.
The command line:
awk '/t{2,}/' testfile
prints to standard output:
smitters, alexis
{m, n} Specifies that a string matches if between m and n, inclusive, occurrences of the pattern are
within the string ( where m <= n). The command line:
awk '/er{1, 2}/' testfile
prints to standard output:
smithern, harry
smithern, anne
smitters, alexis
[String] Signifies that the regular expression matches any characters specified by the String variable
within the square brackets. The command line:
awk '/sm[a-h]/' testfile
prints to standard output of all records with the characters sm followed by any character in
alphabetical order from a to h. The output in this example is:
smawley, andy
Alphabetical list of commands 7
Character Function
[^ String] A ^ (caret) within the [ ] (square brackets) and at the beginning of the specified string
indicates that the regular expression does not match any characters within the square
brackets. Thus, the command line:
awk '/sm[^a-h]/' testfile
prints to standard output:
smiley, allen
smith, alan
smithern, harry
smithhern, anne
smitters, alexis
~,!~ Signifies a conditional statement that a specified variable matches (tilde) or does not match
(tilde, exclamation point) the regular expression. The command line:
awk '$1 ~ /n/' testfile
prints to standard output of all records whose first field contained the character n. The
output in this example is:
smithern, harry
smithhern, anne
^ Signifies the beginning of a field or record. The command line:
awk '$2 ~ /^h/' testfile
prints to standard output of all records with the character h as the first character of the
second field. The output in this example is:
smithern, harry
$ Signifies the end of a field or record. The command line:
awk '$2 ~ /y$/' testfile
prints to standard output of all records with the character y as the last character of the
second field. The output in this example is:
smawley, andy
smithern, harry
. (period) Signifies any one character except the terminal new-line character at the end of a space.
The command line:
awk '/a..e/' testfile
prints to standard output of all records with the characters a and e separated by two
characters. The output in this example is:
smawley, andy
smiley, allen
smithhern, anne
*(asterisk) Signifies zero or more of any characters. The command line:
awk '/a.*e/' testfile
prints to standard output of all records with the characters a and e separated by zero or
more characters. The output in this example is:
smawley, andy
smiley, allen
smithhern, anne
smitters, alexis
8 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
Character Function
\ (backslash) The escape character. When preceding any of the characters that have special meaning in
extended regular expressions, the escape character removes any special meaning for the
character. For example, the command line:
/a\/\//
would match the pattern a //, since the backslashes negate the usual meaning of the slash
as a delimiter of the regular expression. To specify the backslash itself as a character, use a
double backslash. See the following item on escape sequences for more information on the
backslash and its uses.
Recognized Escape Sequences
The awk command recognizes most of the escape sequences used in C language conventions, as well as
several that are used as special characters by the awk command itself. The escape sequences are:
Escape Sequence Character Represented
\ \ (double-quotation) mark
\/ / (slash) character
\ddd Character whose encoding is represented by a one-, two- or three-digit octal integer,
where d represents an octal digit
\\ \ (backslash) character
\a Alert character
\b Backspace character
\f Form-feed character
\n New-line character (see following note)
\r Carriage-return character
\t Tab character
\v Vertical tab.
Note: Except in the gsub, match, split, and sub built-in functions, the matching of extended regular
expressions is based on input records. Record-separator characters (the new-line character by default)
cannot be embedded in the expression, and no expression matches the record-separator character. If the
record separator is not the new-line character, then the new-line character can be matched. In the four
built-in functions specified, matching is based on text strings, and any character (including the record
separator) can be embedded in the pattern so that the pattern matches the appropriate character.
However, in all regular-expression matching with the awk command, the use of one or more NULL
characters in the pattern produces undefined results.
Relational Expressions
The relational operators < (less than), > (greater than), <= (less than or equal to), >= (greater than or
equal to), = = (equal to), and ! = (not equal to) can be used to form patterns. For example, the pattern:
$1<$4
matches records where the first field is less than the fourth field. The relational operators also work with
string values. For example:
$1 =! "q"
matches all records where the first field is not a q. String values can also be matched on collation values.
For example:
$1 >= "d"
Alphabetical list of commands 9
matches all records where the first field starts with a character that is a, b, c,ord. If no other information
is given, field variables are compared as string values.
Combinations of Patterns
Patterns can be combined using three options:
v Ranges are specified by two patterns separated with a , (comma). Actions are performed on every
record starting with the record that matches the first pattern, and continuing through and including the
record that matches the second pattern. For example:
/begin/,/end/
matches the record containing the string begin, and every record between it and the record containing
the string end, including the record containing the string end.
v Parentheses()grouppatterns together.
v The boolean operators || (or), && (and), and ! (not) combine patterns into expressions that match if
they evaluate true, otherwise they do not match. For example, the pattern:
$1 == "al" && $2 == "123"
matches records where the first field is al and the second field is 123.
BEGIN and END Patterns
Actions specified with the BEGIN pattern are performed before any input is read. Actions specified with
the END pattern are performed after all input has been read. Multiple BEGIN and END patterns are
allowed and processed in the order specified. An END pattern can precede a BEGIN pattern within the
program statements. If a program consists only of BEGIN statements, the actions are performed and no
input is read. If a program consists only of END statements, all the input is read prior to any actions
being taken.
Actions
There are several types of action statements:
Action Statements
Action statements are enclosed in { } (braces). If the statements are specified without a pattern, they are
performed on every record. Multiple actions can be specified within the braces, but must be separated by
new-line characters or ; (semicolons), and the statements are processed in the order they appear. Action
statements include:
Arithmetical Statements
The mathematical operators + (plus), - (minus), / (division), ^ (exponentiation), * (multiplication),
% (modulus) are used in the form:
Expression Operator Expression
Thus, the statement:
$2=$1^ 3
assigns the value of the first field raised to the third power to the second field.
Unary Statements
The unary - (minus) and unary + (plus) operate as in the C programming language:
+Expression or -Expression
Increment and Decrement Statements
The pre-increment and pre-decrement statements operate as in the C programming language:
++Variable or --Variable
10 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
The post-increment and post-decrement statements operate as in the C programming language:
Variable++ or Variable--
Assignment Statements
The assignment operators += (addition), -= (subtraction), /= (division), and *= (multiplication)
operate as in the C programming language, with the form:
Variable += Expression
Variable -= Expression
Variable /= Expression
Variable *= Expression
For example, the statement:
$1 *= $2
multiplies the field variable $1 by the field variable $2 and then assigns the new value to $1.
The assignment operators ^= (exponentiation) and %= (modulus) have the form:
Variable1^=Expression1
AND
Variable2%=Expression2
and they are equivalent to the C programming language statements:
Variable1=pow(Variable1, Expression1)
AND
Variable2=fmod(Variable2, Expression2)
where pow is the pow subroutine and fmod is the fmod subroutine.
String Concatenation Statements
String values can be concatenated by stating them side by side. For example:
$3=$1$2
assigns the concatenation of the strings in the field variables $1 and $2 to the field variable $3.
Built-In Functions
The awk command language uses arithmetic functions,string functions, and general functions. The close
Subroutine statement is necessary if you intend to write a file, then read it later in the same program.
Arithmetic Functions
The following arithmetic functions perform the same actions as the C language subroutines by the same
name:
Function Action
atan2( y, x ) Returns arctangent of y/x.
cos( x ) Returns cosine of x; x is in radians.
sin( x ) Returns sin of x; x is in radians.
exp( x ) Returns the exponential function of x.
log( x ) Returns the natural logarithm of x.
sqrt( x ) Returns the square root of x.
int( x ) Returns the value of x truncated to an integer.
rand( ) Returns a random number n,with0<=n <1.
srand( [Expr] ) Sets the seed value for the rand function to the value of the Expr parameter, or use the
time of day if the Expr parameter is omitted. The previous seed value is returned.
Alphabetical list of commands 11
String Functions
The string functions are:
Function Action
gsub( Ere, Repl,[In ] ) Performs exactly as the sub function, except
that all occurrences of the regular expression are
replaced.
sub( Ere, Repl,[In ] ) Replaces the first occurrence of the extended
regular expression specified by the Ere
parameter in the string specified by the In
parameter with the string specified by the Repl
parameter. The sub function returns the number
of substitutions. An & (ampersand) appearing
in the string specified by the Repl parameter is
replaced by the string in the In parameter that
matches the extended regular expression
specified by the Ere parameter. If no In
parameter is specified, the default value is the
entire record ( the $0 record variable).
index( String1, String2 ) Returns the position, numbering from 1, within
the string specified by the String1 parameter
where the string specified by the String2
parameter occurs. If the String2 parameter does
not occur in the String1 parameter, a 0 (zero) is
returned.
length [(String)] Returns the length, in characters, of the string
specified by the String parameter. If no String
parameter is given, the length of the entire
record (the $0 record variable) is returned.
blength [(String)] Returns the length, in bytes, of the string
specified by the String parameter. If no String
parameter is given, the length of the entire
record (the $0 record variable) is returned.
substr( String, M,[N ] ) Returns a substring with the number of
characters specified by the N parameter. The
substring is taken from the string specified by
the String parameter, starting with the character
in the position specified by the M parameter.
The M parameter is specified with the first
character in the String parameter as number 1.
If the N parameter is not specified, the length of
the substring will be from the position specified
by the M parameter until the end of the String
parameter.
match( String, Ere ) Returns the position, in characters, numbering
from 1, in the string specified by the String
parameter where the extended regular
expression specified by the Ere parameter
occurs, or else returns a 0 (zero) if the Ere
parameter does not occur. The RSTART special
variable is set to the return value. The
RLENGTH special variable is set to the length
of the matched string, or to -1 (negative one) if
no match is found.
12 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385
  • Page 386 386
  • Page 387 387
  • Page 388 388
  • Page 389 389
  • Page 390 390
  • Page 391 391
  • Page 392 392
  • Page 393 393
  • Page 394 394
  • Page 395 395
  • Page 396 396
  • Page 397 397
  • Page 398 398
  • Page 399 399
  • Page 400 400
  • Page 401 401
  • Page 402 402
  • Page 403 403
  • Page 404 404
  • Page 405 405
  • Page 406 406
  • Page 407 407
  • Page 408 408
  • Page 409 409
  • Page 410 410
  • Page 411 411
  • Page 412 412
  • Page 413 413
  • Page 414 414
  • Page 415 415
  • Page 416 416
  • Page 417 417
  • Page 418 418
  • Page 419 419
  • Page 420 420
  • Page 421 421
  • Page 422 422
  • Page 423 423
  • Page 424 424
  • Page 425 425
  • Page 426 426
  • Page 427 427
  • Page 428 428
  • Page 429 429
  • Page 430 430
  • Page 431 431
  • Page 432 432
  • Page 433 433
  • Page 434 434
  • Page 435 435
  • Page 436 436
  • Page 437 437
  • Page 438 438
  • Page 439 439
  • Page 440 440
  • Page 441 441
  • Page 442 442
  • Page 443 443
  • Page 444 444
  • Page 445 445
  • Page 446 446
  • Page 447 447
  • Page 448 448
  • Page 449 449
  • Page 450 450
  • Page 451 451
  • Page 452 452
  • Page 453 453
  • Page 454 454
  • Page 455 455
  • Page 456 456
  • Page 457 457
  • Page 458 458
  • Page 459 459
  • Page 460 460
  • Page 461 461
  • Page 462 462
  • Page 463 463

Bull Power6 - Serveur d'E-S virtuel et Virtual Computing Guide

Category
Software
Type
Virtual Computing Guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI