AIX Overview
AIX Overview
AT&T at some point pulled out of the Multics project. Some of the
developers continued to work on it. In the 1970’s a project known as
Unics, which later changed to UNIX commenced.
The latest version of AIX, is AIX 6.1. This version was made
generally available by IBM in 2007. AIX version 7.1 is currently as
of, 2010, available via the IBM Open Beta release program.
AIX supports newest hardware offerings such as 10 gig ethernet adapters, and
8 gig fibre channel adapters.
AIX has advanced diagnostic applications for hardware and software errors.
AIX has a lot in common with other proprietary Unix operating systems.
Proprietary Unix operating systems typically differ with sysadmin tools, and
virtualization technology.
AIX comes with a journaled filesystem – JFS2. The older version JFS is still
shipped with AIX. JFS2 will allow multi terabyte files, and multi petabyte
filesystems.
AIX provides integrated security auditing features, allowing you to audit system
activity at a very granular level.
AIX provides an integrated accounting system, so that you can account for
user, and application usage of resources on the system. This is especially
useful in chargeback environments.
AIX comes with a backup utility known as mksysb – MaKe SYStem Backup.
This utility will allow you to create a bootable system backup which you will
use for system disaster recovery scenarios.
AIX comes with another backup utility, called backup. This command allows
you to backup at a file, and/or directory level. The counterpart to this command
is the restore command, which allows you to restore the files and/or directories
you backed up with the backup command.
AIX comes with it’s own software management subsystem, for software. It can
manage software inventory for both LPP format software, and RPM format
software.
Starting in AIX version 5.1, Linux affinity is integrated into the operating
system.
Media comes with AIX called, Linux Applications Toolbox for AIX. Contents
of media are also available for free download via the internet from IBM. This
media contains IBM certified Linux applications compiled to run on POWER
systems.
Linux’s origins are found in the MINX operating system project which was
a minimal Unix like operating system used for educational purposes, etc.
It was released in 1987. Linux actually started because Linus was
frustrated with the licensing of the MINIX operating system.
Up to 64 GB of memory/RAM
Up to 128 GB of memory/RAM
Up to 128 GB of memory/RAM
Up to 256 GB of memory/RAM
Up to 512 GB of memory/RAM
- Midrange class
- Up to 4 building blocks
Up to 512 GB of memory/RAM
- Midrange class
- Mainframe inspired
Up to 512 GB of memory/RAM
Up to 8 TB of memory/RAM
Up to 32 X 4 Gigahertz processors
8 core POWER7 processors – (Total 256 cores)
Turbo option:
128 POWER7 4.25 GHz processors
J43
Up to 64 GB of memory/RAM
PowerVM capabilities
Up to 128 GB of memory/RAM
PowerVM capabilities
Up to 256 GB of memory/RAM
PowerVM capabilities
320 system
590
RS/6000 43P
42T
RS/6000 B50
H80
S80
RS/6000 SP
The configuration of the ATS lab, The Innovation Center, we’ll be using in this
week’s class is as follows.
Each blade has 13 AIX LPARS created on them. AIX version 6.1 TL 6 SP 2.
Gvicaix01
Gvicaix02
Gvicaix03
Gvicaix04
Gvicaix05
Gvicaix06
Gvicaix07
The Instructor will now assign them. Every student will be assigned their own
LPAR.
AIX Basic System Administration 52
Our Lab
Gvicaix01 – 192.168.240.123
Gvicaix02 – 192.168.240.124
Gvicaix03 – 192.168.240.125
Gvicaix04 – 192.168.240.126
Gvicaix05 – 192.168.240.127
Gvicaix06 – 192.168.240.135
Gvicaix07 – 192.168.240.136
http://192.168.240.101
(For students on LPARS: Gvicaix01, thru Gvicaix05)
Or
http://192.168.240.102
(For students on LPARS: Gvicaix06, and Gvicaix07)
After you open it minimize the window, you will need it in later labs.
When you install the operating system, you are installing what’s referred to as
the BOS – Base Operating System.
On most systems the operating system installation will take about ~45 minutes
to ~1 hour to complete.
NOTE: Installation of the operating system will not be done in class as a lab, in the
interest of time.
- Migration
- Preservation
- Alt_disk_install method/cloning.
After the system boots, or anytime you connect to the system you
will be presented with a login screen which is known as the herald
message. This is prompting you for a login name which will identify
you as a valid user to the system.
AIX Version 6
Copyright IBM Corporation, 1982, 2009.
login:
By AIX BOS installation default the only user which is available to log
into is the user “root”. Root is the administrator of the system. It’s the
most powerful user-id on the system.
AIX Version 6
Copyright IBM Corporation, 1982, 2009.
login: root
*********************************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
**********************************************************************************************
ETC…
The Korn shell is the default in AIX. When you install the system,
and create regular users, they will be placed into the Korn shell in
their home directory automatically when they log into the system.
1. Program
2. Options
3. Arguments
Ex of a command:
# ls –l /home
ls = Command/program
-l = Option
/home = Argument
To set the password of the root user, or any user for that matter use
the passwd command.
# passwd
Changing password for "root"
root's New password:
Enter the new password again:
#
The password will not be visible as you are entering it. You will have to
confirm it, once it’s typed in. The system does this to prevent typos,
and for security reasons.
# exit
Connection closed – (Putty closes).
Open another connection to the system, and login as the root user
again:
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: root
root's Password:
Notice that the system now prompts you for a password because you
set it for the root user.
If you enter the wrong password, AIX will not tell you which one,
user id, or password was invalid, it will tell you that one of them is
incorrect. This is done for security reasons.
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: root
root's Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# ID
ksh: ID: not found
#
You can see the current month’s calendar with the following command:
# cal
September 2009
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
You can see the whole year calendar by feeding the command the
year. Note, doesn’t have to be the current year.
# cal 2009
2009
January February
Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
1 2 3 1 2 3 4 5 6 7
4 5 6 7 8 9 10 8 9 10 11 12 13 14
11 12 13 14 15 16 17 15 16 17 18 19 20 21
18 19 20 21 22 23 24 22 23 24 25 26 27 28
25 26 27 28 29 30 31
March April
Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7 1 2 3 4
8 9 10 11 12 13 14 5 6 7 8 9 10 11
15 16 17 18 19 20 21 12 13 14 15 16 17 18
22 23 24 25 26 27 28 19 20 21 22 23 24 25
29 30 31 26 27 28 29 30
# cal 8 2010
August 2010
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
# cal 10 2010
October 2010
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Let’s say you wanted to know the current date, and time. Use the
Unix date command
# date
Fri Sep 4 15:57:18 EDT 2009
#
Even though you just typed in the date command, you will also get the
current time as well. Note that time is military by defaut in Unix.
# bc
4+2
6
5*7
35
7-2
5
100 / 50
2
quit
#
Note, even though bc stands for basic calculator, it does have the
capability of doing more complex calculations other than just
arithmetic, as shown above.
Note: There are other text editors which are available in Unix such as
ed, emacs, etc. However, vi is more widely used.
# vi /file
~
~
~
~
~
~
~
~
~
~
“/file” [New file]
1. Once in the editor type in a to enter input mode.
2. Start entering text, ex – “This is the best Unix class I have ever been to. <ENTER> <ENTER> I would
recommend it to anyone.”
3. Now hit the Escape key to get out of input mode, and to enter command mode.
4. Type in the colon, and type in wq – ( w = write(save) q = quit vi ).
Note: On most terminals today, you can move around with the normal
keyboard arrows.
To view the contents of the file you just created with the vi text
editor, or any file on the system for that matter, use the cat
command, which is short for ConcATenate. This means concatenate
the bytes on disk.
# cat /file
This is the best Unix class I have ever been to.
# head -1 file
This is the best Unix class I have ever been to.
#
By default the head command will show you the first ten lines of a file.
# tail -2 file
I would recommend it to anyone.
By default the tail command will show you the last ten lines of a file.
Note: There is also a tail –f, which provides streaming output of the
last line of a file.
AIX Basic System Administration 98
Interacting with Unix
You can list the contents of a file with all of the lines in the file
numbered with the cat command with the –n argument.
# cat -n /file
1 This is the best Unix class I have ever been to.
2
3 I would recommend it to anyone.
#
# cat /file
This is the best Unix class I have ever been to.
# wc -c /file
82 /file
# wc -w /file
17 /file
# wc -l /file
3 /file
#
# cat /file
This is the best Unix class I have ever been to.
Iw
Iu
#
# cat /file
This is the best Unix class I have ever been to.
# grep is /file
This is the best Unix class I have ever been to.
#
# banner production
id Command
Purpose
Syntax
id [user]
id -G [-n ] [User]
id -g [-n l | [ -n r ] [User]
id -u [-n l | [ -n r ] [User]
Description
# cut
Usage: cut {-b <list> [-n] | -c <list> | -f <list> [-d <char>] [-s]} file ...
#
Note, the Unix cut command doesn’t do much without this pipe
symbol, or feeding a file to it.
Let’s say you wanted only to display the first three characters of the
date command output. You would have to use the cut command to
accomplish this. Let’s say you wanted to accomplish this with one
command. What you can do is execute the date command, then tie
it to the cut command with a Unix pipe.
# date
Fri Sep 4 20:36:48 EDT 2009
# who
root pts/0 Sep 4 20:19 (192.168.220.8)
# who | wc -l
1
# who | wc -c
58
# who | wc -w
6
#
# prtconf
System Model: IBM,9117-MMA
Machine Serial Number: 10118F0
Processor Type: PowerPC_POWER6
Number Of Processors: 8
Processor Clock Speed: 3504 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 5 gvicaix14
Memory Size: 2048 MB
Good Memory Size: 2048 MB
Platform Firmware level: Not Available
Firmware Version: IBM,EM340_041
Console Login: enable
Auto Restart: true
# prtconf | more
System Model: IBM,9117-MMA
Machine Serial Number: 10118F0
Processor Type: PowerPC_POWER6
Number Of Processors: 8
Processor Clock Speed: 3504 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 5 gvicaix14
Memory Size: 2048 MB
Good Memory Size: 2048 MB
Platform Firmware level: Not Available
Firmware Version: IBM,EM340_041
Console Login: enable
Auto Restart: true
Full Core: false
OUTPUT PAUSES WHEN IT FITS THE SCREEN, UNTIL YOU HIT THE <ENTER> KEY TO CONTINUE
TO THE NEXT PAGE.
Network Information
Host Name: gvicaix14
IP Address: 192.168.240.137
Sub Netmask: 255.255.255.0
Gateway: 192.168.240.1
Name Server:
Domain Name:
# export FNAME=justin
# echo $FNAME
justin
#
Note, variables are not discussed in depth in this course. They would
be discussed in more detail in a Unix shell scripting/programming
course.
One thing you can do with the pre-defined shell variables is change
the korn shell root prompt, from the default #, to unix>.
# echo $PS1
#
# export PS1="unix> "
unix>
unix>
unix>
unix>
Log out of the system via the exit command, and then login as root
again, by opening another Putty session. You will notice that the
prompt reset itself back to what it was originally. This behaivor is
discussed with more detail in the User Management section.
# pwd
/
#
This command stands for Present Working Directory. This will tell you
where exactly on the directory hierarchy/tree you currently are.
Notice how you are in “/”. This means you are at the top of the
directory tree. This is root’s home directory. Normally when you
create a regular user the default home directory will be
/home/user_name. Since this is the root user, /, is the home
directory.
# ls
.sh_history dev lost+found sbin u
.vi_history esa lpp smit.log unix
admin etc mnt smit.script usr
audit home opt smit.transaction var
bin image.data pconsole tftpboot
bosinst.data lib proc tmp
#
This is the root directory listing which is default after BOS installation.
# ls -F
.rhosts audit/ dev/ image.data mksysb/ proc/ smit.transaction unix@
.sh_history bin@ esa/ lib@ mnt/ sbin/ tftpboot/ usr/
.vi_history bosinst.data etc/ lost+found/ opt/ smit.log tmp/ var/
admin/ core home/ lpp/ pconsole/ smit.script u@
#
This command added / at the end of the objects which are directories.
Note, this command also shows the @ symbol at the end of certain directories.
This means these are links. Links mean that the directory, or file actually refers
to another file, or directory.
Let’s move to the /tmp directory. You change directories in Unix with
the cd command, and the name of the directory as the argument.
CD stands for Change Directory.
# pwd
/
# cd /tmp
# pwd
/tmp
#
Notice, how the output of the pwd command changes. Now you are in
the /tmp directory. You are no longer in the / directory.
# cd -
/
# pwd
/
# cd -
/tmp
# pwd
/tmp
#
# pwd
/tmp
# cd
# pwd
/
#
# cd /tmp
# pwd
/tmp
# mkdir dira
# cd dira
# pwd
/tmp/dira
# ls
#
Notice the new directory path, and how there are no files in this new
directory.
# pwd
/tmp/dira
# ls
#
# mkdir dirab
# touch filea fileb filec
# ls
dirab filea fileb filec
#
# ls -F
dirab/ filea fileb filec
#
There are two location types when it comes to directories and files.
# ls -l filea
-rw-r--r-- 1 root system 0 Dec 02 09:08 filea
Let’s say you wanted to create a file called testfile, but the fully qualified path of
this file was to be:
/tmp/testdir/testdir2/testdir3/testfile
# touch /tmp/testdir/testdir2/testdir3/testfile
touch: 0652-046 Cannot create /tmp/testdir/testdir2/testdir3/testfile.
#
You can’t because the directories don’t exist. Ok, no problem again, right? Let’s go
ahead and create the directories for this file:
# mkdir /tmp/testdir/testdir2/testdir3
mkdir: 0653-357 Cannot access directory /tmp/testdir/testdir2.
/tmp/testdir/testdir2: A file or directory in the path name does not exist.
#
# mkdir -p /tmp/testdir/testdir2/testdir3
# touch /tmp/testdir/testdir2/testdir3/testfile
# ls -ld /tmp/testdir/testdir2/testdir3
drwxr-xr-x 2 root system 256 Dec 02 08:56 /tmp/testdir/testdir2/testdir3
#
# ls -l /tmp/testdir/testdir2/testdir3
total 0
-rw-r--r-- 1 root system 0 Dec 02 08:56 testfile
# ls -l
total 16
drwxr-xr-x 3 root system 256 Sep 4 23:04 .
drwxrwxrwt 4 bin bin 4096 Sep 5 16:05 ..
drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab
-rw-r--r-- 1 root system 0 Sep 4 22:23 filea
-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb
-rw-r--r-- 1 root system 0 Sep 4 22:23 filec
# pwd
/tmp/dira
# cd ..
# pwd
/tmp
# cd ..
# pwd
/
# cd /tmp/dira
# ls
dirab filea fileb filec
# ls f*
filea fileb filec
# ls file[a-b]
filea fileb
# ls f????a
f????a not found
# ls f??e?
filea fileb filec
#
# ls -l
total 8
drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab
-rw-r--r-- 1 root system 0 Sep 4 22:23 filea
-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb
-rw-r--r-- 1 root system 0 Sep 4 22:23 filec
-rw-r--r-- 1 root system 29 Sep 4 22:35 filed
#
If you use double greater than sign >>, then that command’s output
will append to the end of the already existing file
# date >> filed
# cat filed
Fri Sep 4 22:35:16 EDT 2009
Fri Sep 4 22:37:33 EDT 2009
#
# cat filed
#
It’s a place to re-direct output you don’t want. Whatever you re-direct to it just
gets thrown away. It goes nowhere.
# ls -l /dev/null
crw-rw-rw- 1 root system 2, 2 Dec 03 13:12 /dev/null
# ls -l /dev/null
crw-rw-rw- 1 root system 2, 2 Dec 03 13:12 /dev/null
#
# cat filed
Fri Sep 4 22:54:07 EDT 2009
#
If you wanted to append to a file using tee, you would use the –a
option of the tee command.
# date | tee filed
Fri Sep 4 22:56:27 EDT 2009
# cat filed
Fri Sep 4 22:56:27 EDT 2009
#
# cat filed
Fri Sep 4 22:56:27 EDT 2009
Fri Sep 4 22:57:24 EDT 2009
#
# ls -l filed
-rw-r--r-- 1 root system 58 Sep 4 22:57 filed
# cp filed filee
# ls -l filed filee
-rw-r--r-- 1 root system 58 Sep 4 22:57 filed
-rw-r--r-- 1 root system 58 Sep 4 23:01 filee
# cat filed
Fri Sep 4 22:56:27 EDT 2009
Fri Sep 4 22:57:24 EDT 2009
# cat filee
Fri Sep 4 22:56:27 EDT 2009
Fri Sep 4 22:57:24 EDT 2009
#
# ls -l filed filee
-rw-r--r-- 1 root system 58 Sep 4 22:57 filed
-rw-r--r-- 1 root system 58 Sep 4 23:01 filee
# mv filed filee
# ls -l filed filee
filed not found
-rw-r--r-- 1 root system 58 Sep 4 22:57 filee
# ls -l
total 8
drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab
-rw-r--r-- 1 root system 0 Sep 4 22:23 filea
-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb
-rw-r--r-- 1 root system 0 Sep 4 22:23 filec
-rw-r--r-- 1 root system 58 Sep 4 22:57 filee
#
To remove a directory you use the rmdir command, which is short for ReMove
DIRectory:
# ls -ld dirab
drwxr-xr-x 2 root system 256 Nov 27 19:57 dirab
# rmdir dirab
# ls -ld dirab
ls: 0653-341 The file dirab does not exist.
#
# ls -l
total 0
-rw-r--r-- 1 root system 0 Sep 4 14:43 filea
-rw-r--r-- 1 root system 0 Sep 4 14:43 fileb
-rw-r--r-- 1 root system 0 Sep 4 14:43 filec
-rw-r--r-- 1 root system 58 Sep 4 23:01 filee
#
# rm filea
# ls -l
total 0
-rw-r--r-- 1 root system 0 Sep 4 14:43 fileb
-rw-r--r-- 1 root system 0 Sep 4 14:43 filec
# mkdir /tmp/testdir
# touch /tmp/testdir/file1
# touch /tmp/testdir/file2
# touch /tmp/testdir/file3
# ls -l /tmp/testdir
total 0
-rw-r--r-- 1 root system 0 Dec 02 08:44 file1
-rw-r--r-- 1 root system 0 Dec 02 08:44 file2
-rw-r--r-- 1 root system 0 Dec 02 08:44 file3
#
# rmdir /tmp/testdir
rmdir: 0653-611 Directory /tmp/testdir is not empty.
#
You were not able to do so, because this directory is not empty. You have two
options, you can delete everything in this directory manually, or you could issue
the following command:
# rm -r /tmp/testdir
# ls -ld /tmp/testdir
ls: 0653-341 The file /tmp/testdir does not exist.
#
# smitty users
# smitty shutdown
<F10>
AIX Basic System Administration 150
SMIT
You could use the SMIT <F9> key to exit out to an AIX command
shell prompt, temporarily, from within a SMIT menu.
# smitty
# smitty
Press <F9>
#
# exit
You can press <F1> at any point while in SMIT to view the help of
that particular SMIT menu screen
<F10>
AIX Basic System Administration 154
SMIT
Go to the change user attribute smitty window via it’s fastpath. Hit
<F4>. This will generate a pick list. Smit provides this as a easy way
to select the object, in this case user name, you would like to edit.
# smitty chuser
I prefer to use smit. It’s more productive than the command line. -
# smitty mkuser
USE YOUR FIRST NAME
The ! in the second field indicates that the password is in the shadow file.
The * in the second field indicates that the user can’t login.
# ls -l /etc/passwd
-rw-r--r-- 1 root security 484 Sep 5 21:38 /etc/passwd
# cat /etc/passwd
root:!:0:0::/:/usr/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
lp:*:11:11::/var/spool/lp:/bin/false
snapp:*:200:12:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd
nuucp:*:6:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
# ls -l /etc/security/passwd
-rw------- 1 root security 313 Sep 5 21:42 /etc/security/passwd
# cat /etc/security/passwd
root:
password = Fy0ubxgHHBrFM
lastupdate = 1252082327
flags =
daemon:
password = *
bin:
password = *
….
# ls -l /etc/group
-rw-r--r-- 1 root security 327 Sep 5 21:37 /etc/group
# cat /etc/group
system:!:0:root,pconsole
staff:!:1:justin
bin:!:2:root,bin
sys:!:3:root,bin,sys
adm:!:4:bin,adm
uucp:!:5:uucp,nuucp
mail:!:6:
security:!:7:root
cron:!:8:root
printq:!:9:lp
audit:!:10:root
ecs:!:28:
nobody:!:4294967294:nobody,lpd
usr:!:100:guest
perf:!:20:
shutdown:!:21:
lp:!:11:root,lp
snapp:!:12:snapp
pconsole:!:13:pconsole
# id justin
uid=202(justin) gid=1(staff)
# listusers
guest
justin
lp
nobody
pconsole
snapp snapp login user
#
After you create the user id, you as root will have to set that user id’s
login password
# passwd justin
Changing password for "justin"
justin's New password:
Re-enter justin's new password:
#
Connect to the system again, and login as newly created user justin
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: justin
justin's Password:
[compat]: You are required to change your password. Please choose a new one.
Also, notice that the same message of the day is displayed to this
user when they login.
After the user logs in notice the dollar-sign, $, shell prompt. This
shell prompt indicates that this user is a regular, non-root/admin
user.
The id command will verify that you are now logged in as user justin.
$ id
uid=202(justin) gid=1(staff)
$
Also notice the default user group. The user is automatically put in the
staff user group when created. This is for all non-admin users.
$ pwd
/home/justin
$
# ls -l /home/dba
total 13
drwxr-xr-x 2 chouer dba 512 Jan 10 2006 chouer
drwxr-xr-x 2 daifran dba 512 Jul 03 09:31 daifran
drwxr-xr-x 2 govindb dba 512 Jul 25 10:49 govindb
drwxr-xr-x 2 harishp dba 512 May 23 2005 harishp
drwxr-xr-x 2 heuveln dba 512 Jun 22 03:38 heuveln
drwxr-xr-x 2 jaschif dba 512 Jun 05 10:58 jaschif
drwxr-xr-x 2 lipaul dba 512 May 28 2005 lipaul
drwxr-xr-x 2 oracle dba 512 Jul 18 09:10 oracle
drwxr-xr-x 2 raghupm dba 512 Jun 25 15:53 raghupm
drwxr-xr-x 2 suhjos dba 512 Mar 28 2005 suhjos
drwxr-xr-x 2 witten dba 512 Apr 10 2006 witten
drwxr-xr-x 2 xiaodan dba 512 Dec 05 2005 xiaodan
drwxr-xr-x 2 zhengw dba 512 Sep 13 2005 zhengw
# ls -ld /home/appl
drwxrwxrwx 14 root appldev 512 Jul 31 11:27 /home/appl
# ls -l /home/appl
total 12
drwxr-xr-x 2 bastenp dstage 512 Jul 11 12:28 bastenp
drwxr-xr-x 2 flakew dstage 512 Jul 10 15:02 flakew
drwxr-xr-x 2 hendrik dstage 512 Jul 24 15:22 hendrik
drwxr-xr-x 4 kilcult dstage 512 Jul 18 11:43 kilkult
drwxr-xr-x 2 moserm dstage 512 Jul 10 15:14 moserm
drwxr-xr-x 2 mountj dstage 512 Jul 10 15:08 mountj
drwxr-xr-x 2 rathins dstage 512 Jul 10 15:05 rathens
drwxr-xr-x 3 rathins dstage 512 Jul 20 10:40 rathins
drwxr-xr-x 2 vanhoop dstage 512 Jul 30 08:02 vanhoop
drwxr-xr-x 2 werfad dstage 512 Jul 16 01:29 werfad
drwxr-xr-x 2 zagorob dstage 512 Jul 31 11:27 zagorob
drwxr-xr-x 2 zagorob dstage 512 Jul 31 11:25 zagorov
$ id
uid=206(justin) gid=1(staff)
$ passwd
Changing password for "justin"
justin's Old password:
justin's New password:
Re-enter justin's new password:
$
Now, log off of the system as user justin by typing in the exit
command, and then log into the system again as user root.
Let’s say that user justin calls you, the admin, and confesses to you
that they have forgotten their login password, and you have to reset
it now for them. You do that with the passwd justin command as you
did before, but notice the difference between when you set the
password as the user him/herself, and when you set the password
as the root user. Notice that when you reset it as the user
themselves you will be prompted for the old password, and then the
new one. This is done for security reasons, but when you set
someone else’s password as the root user, you are not required to
provide the current password. Root has the power to override this
extra security check, and this will also prove useful when resetting a
forgotten password for someone.
To determine who is currently logged into the system use the who
command
# who
root pts/0 Sep 5 21:25 (192.168.220.9)
#
The last command can assist you in determining the login history of
a user into the system.
# last root
root pts/0 192.168.220.9 Sep 05 21:25 still logged in
root pts/0 192.168.220.9 Sep 05 17:10 - 19:11 (02:00)
# echo "THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER." > /etc/nologin
# ls -l /etc/nologin
-rw-r--r-- 1 root system 55 Sep 5 22:42 /etc/nologin
# cat /etc/nologin
THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER.
#
Now, log out with exit, and attempt to login as user: justin:
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: justin
justin's Password:
THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER.
login:
AIX Version 6
Copyright IBM Corporation, 1982, 2010.
login: root
root's Password:
*******************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
Last unsuccessful login: Wed Dec 1 00:59:52 CST 2010 on /dev/pts/1 from gvicaix01
Last login: Thu Dec 2 08:39:45 CST 2010 on /dev/pts/0 from 192.168.250.8
# ls -l /etc/nologin
-rw-r--r-- 1 root system 55 Sep 5 22:42 /etc/nologin
# rm /etc/nologin
# ls -l /etc/nologin
/etc/nologin not found
#
Non-root logins are now re-enabled once again. Please note that rebooting the
system will automatically remove this file from the system as well.
# exit
Connection closed
AIX Version 6
Copyright IBM Corporation, 1982, 2010.
login: justin
justin's Password:
*******************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
1 unsuccessful login attempt since last login.
Last unsuccessful login: Thu Dec 2 10:21:24 CST 2010 on /dev/pts/1 from 192.168.250.8
Last login: Thu Dec 2 10:14:16 CST 2010 on /dev/pts/1 from loopback
$ exit
Connection closed
AIX Version 6
Copyright IBM Corporation, 1982, 2010.
login: root
justin's Password:
*******************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
1 unsuccessful login attempt since last login.
Last unsuccessful login: Thu Dec 2 10:21:24 CST 2010 on /dev/pts/1 from
192.168.250.8
Last login: Thu Dec 2 10:14:16 CST 2010 on /dev/pts/1 from loopback
# cat /etc/motd
***************************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
***************************************************************************************
#
# cat /etc/motd
Welcome to my AIX system
AIX Version 6
Copyright IBM Corporation, 1982, 2010.
login: root
root's Password:
Welcome to my AIX system
Last unsuccessful login: Fri Nov 26 19:48:33 CST 2010 on /dev/pts/0 from 192.168.220.54
Last login: Sat Nov 27 17:44:28 CST 2010 on /dev/pts/0 from 192.168.240.117
Log off of the system with exit, and log in as user justin again.
$ pwd
/home/justin
$ ls -l .hushlogin
.hushlogin not found
$ touch .hushlogin
$ ls -l .hushlogin
-rw-r--r-- 1 justin staff 0 Sep 5 22:58 .hushlogin
$
Now, that the file is created, log out, and then log back into the system
as that user, justin, again.
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: justin
justin's Password:
$ id
uid=202(justin) gid=1(staff)
$ pwd
/home/justin
$
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: root
Password:
Last unsuccessful login: Fri Nov 26 22:52:19 CST 2010 on /dev/pts/0 from 192.168.220.54
Last login: Sat Nov 27 16:19:57 CST 2010 on /dev/pts/1 from localhost
There is a file called /etc/security/login.cfg which controls the global login, not
user attributes of the system. To change the herald message you would change
the parameter in this file.
# cd /etc/security
# pwd
/etc/security
# ls -l login.cfg
-rw-r----- 1 root security 5548 Nov 27 16:20 login.cfg
Close your putty session, logging out of the system, and then log back into
the system as root:
Last unsuccessful login: Fri Nov 26 22:52:19 CST 2010 on /dev/pts/0 from 192.168.220.54
Last login: Sat Nov 27 16:19:57 CST 2010 on /dev/pts/1 from localhost
# cd /etc/security
# pwd
/etc/security
# ls –l login.cfg
-rw-r----- 1 root security 5637 Nov 27 16:36 login.cfg
Notice how they both display the user’s name. You can disable this in AIX, to
tighten the security more of your system.
# ls -l login.cfg
-rw-r----- 1 root security 5558 Nov 27 18:25 login.cfg
Close your putty session and then login again. Notice how the username is not
echoed.
Welcome to Company ABC's AIX computer system
Please enter your login name: User name is not displayed when typed.
****'s Password: User name in password prompt is hidden.
Welcome to my AIX system
Last unsuccessful login: Sat Nov 27 16:55:55 CST 2010 on /dev/pts/2 from 192.168.220.54
Last login: Sat Nov 27 18:29:17 CST 2010 on /dev/pts/7 from 192.168.220.54
# ls -l login.cfg
-rw-r----- 1 root security 5548 Nov 27 17:44 login.cfg
Logout, and then log back into the system again with putty as root:
To change the default GECOs, user’s real life information, use the
following command:
# finger justin
Login name: justin
Directory: /home/justin Shell: /usr/bin/ksh
No Plan.
# passwd -f justin
justin's current gecos:
""
Change (yes) or (no)? > yes
To?>Justin Richard Bleistein
# finger justin
Login name: justin In real life: Justin Richard Bleistein
Directory: /home/justin Shell: /usr/bin/ksh
No Plan.
$ id
uid=202(justin) gid=1(staff)
$ pwd
/home/justin
$ ls
$ ls -l
total 0
$ touch .classified
$ ls
$ ls -l
total 0
$ ls -a
. .. .classified .profile .sh_history
$ ls -la
total 16
drwxr-xr-x 2 justin staff 256 Sep 5 23:10 .
drwxr-xr-x 5 bin bin 256 Sep 5 21:37 ..
-rw-r--r-- 1 justin staff 0 Sep 5 23:10 .classified
-rwxr----- 1 justin staff 254 Sep 5 21:37 .profile
-rw------- 1 justin staff 582 Sep 5 23:10 .sh_history
$
You may also have noticed, that there are already two files in your
home directory with periods in front of them. These are special files
as well. They are put there automatically by the system, when the
user was created.
- .profile = This is a special file for the Korn shell. This is called an
initialization file for the shell. Any code in this file will be executed
automatically when you log into the system, starting this shell.
# ls -l /etc/security/user
-rw-r----- 1 root security 10551 Sep 6 00:51 /etc/security/user
#
…
default:
admin = false
login = true
su = true
daemon = true
rlogin = true
sugroups = ALL
admgroups =
ttys = ALL
auth1 = SYSTEM
auth2 = NONE
tpath = nosak
umask = 022
expires = 0
SYSTEM = "compat"
logintimes =
pwdwarntime = 0
account_locked = false
loginretries = 0
….
.
AIX Basic System Administration 203
AIX User Management
…
snapp:
admin = false
rlogin = false
su = false
SYSTEM = "NONE"
login = true
ttys = /dev/tty0
registry = files
dce_export = false
nuucp:
admin = false
pconsole:
admin = true
login = false
rcmds = deny
su = false
justin:
admin = false
justin:
admin = false
account_locked = true
AIX Version 5
Copyright IBM Corporation, 1982, 2007.
login: justin
justin's Password:
Your account has been locked; please see the system administrator.
login:
Now log back in as root unlock the user account with the chuser
command.
justin:
admin = false
account_locked = false
# id justin
uid=202(justin) gid=1(staff)
# rmuser -p justin
# id justin
User not found in /etc/passwd file
#
# lsgroup dba
Group "dba" does not exist.
# mkgroup dba
#
# tail -1 /etc/group
dba:!:202:
# lsgroup dba
dba id=202 admin=false users= registry=files
#
# lsgroup dba
dba id=202 admin=false users= registry=files
# rmgroup dba
# lsgroup dba
Group "dba" does not exist.
# tail -1 /etc/group
ipsec:!:200:
#
Go back to the previous slide # 208, and re-create the user group.
# id justin
uid=203(justin) gid=1(staff)
# tail -1 /etc/passwd
justin:*:204:202::/home/justin:/usr/bin/ksh
#
If you noticed, there are two group settings for a user in AIX. Primary
groups, and group set. When you create a file it is owned by the
user who created the file, and is put in the primary group of that
user. You could temporarily switch to any one of the secondary
groups listed in the group set if you needed to. More on this in the
security section.
Log off the system with exit, and login again as user justin.
$ id
uid=202(justin) gid=202(dba)
$ su root
root's Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
If you type in the whoami command, with no spaces, it will display the
user you su’d to, currently logged in as. If you type in the who am i
command with spaces, it will display the user you su’d from.
# whoami
root
# who am i
justin pts/0 Sep 7 22:09 (192.168.220.9)
#
Type in exit, to get back to user justin, and this time type in su without a username
argument:
# exit
$ id
uid=203(justin) gid=1(staff)
$ su
root's Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
$ su root
root's Password:
#
Now su from root to the user justin. Notice how you are not prompted for
justin’s password. This is because you are root.
# su justin
$ id
uid=206(justin) gid=202(dba)
$
Close the putty application, and then log into the system again, as user root.
# vi ~justin/.profile
…
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
HEY=YOU
echo "HELLO WELCOME TO USER JUSTIN. YOU SU'D WITH THE - ARGUMENT"
#
# su justin
$ id
uid=203(justin) gid=1(staff)
$ echo $HEY
$ exit
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# su - justin
HELLO WELCOME TO USER JUSTIN. YOU SU'D WITH THE – ARGUMENT
$ id
uid=203(justin) gid=1(staff)
$ echo $HEY
YOU
$ exit
#
Log out of the system, and then log back in as user justin. Then fail
at an attempt to su to root, and then succeed.
$ id
uid=202(justin) gid=202(dba)
$ su -
root's Password:
Cannot su to "root" : Authentication is denied.
$ su -
root's Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
# cd /var/adm
# pwd
/var/adm
# ls -l sulog
-rw------- 1 root system 420 Sep 11 10:33 sulog
# tail -2 sulog
SU 09/11 10:33 - pts/1 justin-root
SU 09/11 10:33 + pts/1 justin-root
#
# finger justin
Login name: justin In real life: Justin Richard Bleistein
Directory: /home/justin Shell: /usr/bin/ksh
No Plan.
# su - justin
$ id
uid=202(justin) gid=1(dba)
$ pwd
/home/justin
$ echo "Participating in the development of the software's memory structure" > .plan
$ ls -l .plan
-rw-r--r-- 1 justin dba 68 Nov 27 16:02 .plan
$ cat .plan
Participating in the development of the software's memory structure
$ exit
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# finger justin
Login name: justin In real life: Justin Richard Bleistein
Directory: /home/justin Shell: /usr/bin/ksh
Plan:
# finger justin
Login name: justin In real life: Justin Richard Bleistein
Directory: /home/justin Shell: /usr/bin/ksh
Plan:
# smitty users
<F10>
justin:
admin = false
account_locked = true
# usrck -n justin
3001-662 User justin is locked
However root can override this because root can still su to this account just fine:
# su - justin
$ id
uid=203(justin) gid=1(dba)
$
To unlock the account, go ahead and log back into the system as root again. This time let’s change this user’s attribute via
the command line rather than with smit.
justin:
admin = false
account_locked = false
#
# usrck –n justin
#
Now exit, and attempt to login as user justin again. This time you will succeed.
The default user’s Unix shell in AIX, is Korn. To change that you use the passwd
command. To determine which shell your user is currently set to, display the value
of the system variable $SHELL.
$ id
uid=202(justin) gid=1(dba
$ echo $SHELL
/usr/bin/ksh
$
To change the login shell, log out, and then log back in as the root user.
Once in as root, check the password file to see what shell user justin currently has
set as his default.
Log out, and then log back into the system again as user: justin. You will see how
the default shell of this user has changed from Korn, to Bourne:
$ id
uid=203(justin) gid=1(staff)
$ echo $SHELL
/usr/bin/bsh
$
There is also a chsh command, which will accomplish the same thing.
Every user who is authorized to use the cron scheduler, will have
their own cron table file.
The root user has a crontab setup by default. You can see what’s
scheduled to run via the cron scheduler, by using the command
crontab –l, while logged
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
# crontab –l
….
#0 3 * * * /usr/sbin/skulker
#45 2 * * 0 /usr/lib/spell/compress
#45 23 * * * ulimit 5000; /usr/lib/smdemon.cleanu > /dev/null
0 11 * * * /usr/bin/errclear -d S,O 30
0 12 * * * /usr/bin/errclear -d H 90
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
# SSA warning : Deleting the next two lines may cause errors in redundant
#SSA warning : hardware to go undetected.
01 5 * * * /usr/lpp/diagnostics/bin/run_ssa_ela 1>/dev/null 2>/dev/null
0 * * * * /usr/lpp/diagnostics/bin/run_ssa_healthcheck 1>/dev/null 2>/dev/null
# SSA warning : Deleting the next line may allow enclosure hardware errors to go undetected
0 2 3 2 0 /home/bob/program1
There are six fields in a crontab configuration. They are as follows, from left to
right.
In our example at the top of the page a program called program1 which resides
in the directory /home/bob, will run at 2am, on February 3rd, on Sunday.
You can also use an asterick, *, in a specific field to denote, run every
whatever.
The pound sign, #, will disable that job/program from running via cron.
Setting the EDITOR system variable to a specific editor will tell the
crontab editor which editor to use to edit the crontab.
# ls -l /usr/bin/vi
-r-xr-xr-x 5 bin bin 302706 Sep 7 22:41 /usr/bin/vi
# export EDITOR=/usr/bin/vi
# echo $EDITOR
/usr/bin/vi
# date
Fri Sep 11 10:40:18 EDT 2009
#
# crontab –e
…
45 10 * * * /usr/bin/sleep 60 &
# cd /var/adm/cron
# pwd
/var/adm/cron
# ls -l log
-rw-rw-r-- 1 bin bin 32059 Sep 11 11:00 log
# tail log
root : CMD ( /usr/lpp/diagnostics/bin/run_ssa_healthcheck 1>/dev/null 2>/de
v/null ) : PID ( 372876 ) : Fri Sep 11 10:00:00 2009
Cron Job with pid: 372876 Successful
root : CMD ( /usr/lpp/diagnostics/bin/run_ssa_encl_healthcheck 1>/dev/null
2>/dev/null ) : PID ( 372940 ) : Fri Sep 11 10:30:00 2009
Cron Job with pid: 372940 Successful
root : CMD ( /usr/bin/sleep 1000 & ) : PID ( 393470 ) : Fri Sep 11 10:45:00 2009
Cron Job with pid: 393470 Successful
# date
Fri Sep 11 11:09:59 EDT 2009
# at 11:11 today
sleep 60
job root.1252681860.a at Fri Sep 11 11:11:00 2009
# at -l
root.1252681860.a Fri Sep 11 11:11:00 2009
#
# at -l
#
# tail /var/adm/cron/log
root : CMD ( /usr/lpp/diagnostics/bin/run_ssa_encl_healthcheck 1>/dev/null
2>/dev/null ) : PID ( 372940 ) : Fri Sep 11 10:30:00 2009
Cron Job with pid: 372940 Successful
root : CMD ( /usr/bin/sleep 1000 & ) : PID ( 393470 ) : Fri Sep 11 10:45:00
2009
Cron Job with pid: 393470 Successful
root : CMD ( /usr/bin/errclear -d S,O 30 ) : PID ( 393258 ) : Fri Sep 11 11
:00:00 2009
root : CMD ( /usr/lpp/diagnostics/bin/run_ssa_healthcheck 1>/dev/null 2>/de
v/null ) : PID ( 405614 ) : Fri Sep 11 11:00:00 2009
Cron Job with pid: 405614 Successful
Cron Job with pid: 393258 Successful
root : CMD ( root.1252681860.a ) : PID ( 372838 ) : Fri Sep 11 11:11:00 2009
Cron Job with pid: 372838 Successful
#
Sudo is an Open Source tool you can install, which will allow a
regular user to gain root privilege with the regular user’s password.
AIX also has roles, RBAC, which can be used to easily to distribute
system privileges, and tasks to different users.
# shutdown
SHUTDOWN PROGRAM
Tue Apr 17 09:20:46 CDT 2007
See instructor
# shutdown -Fr
SHUTDOWN PROGRAM
Tue Apr 17 09:32:25 CDT 2007
# shutdown -k
SHUTDOWN PROGRAM
Tue Apr 17 09:39:16 CDT 2007
shutdown -k is finished.
The system is still up.
#
# ls -l /etc/rc.shutdown
ls: 0653-341 The file /etc/rc.shutdown does not exist.
# vi /etc/rc.shutdown
..
# cat /etc/rc.shutdown
#System shutdown script written by AIX system admins.
#This script will be automatically executed by AIX upon system shutdown
#via the shutdown AIX command.
#
#
echo "TEST... THE SHUTDOWN COMMAND HAS BEEN INVOKED ON THIS SYSTEM."
#
#
#End of script
# shutdown -Fr
SHUTDOWN PROGRAM
Tue Apr 17 08:35:55 CDT 2007
TEST... THE SHUTDOWN COMMAND HAS BEEN INVOKED ON THIS SYSTEM.
Note: The halt command can also shutdown a system, and the reboot
command can also restart the system.
AIX Basic System Administration 245
AIX System Startup and Shutdown
The file /etc/inittab, which stands for INITialization TABle, contains
programs to execute automatically on system reboot.
# lsitab -a
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power Failure Detection
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run/etc/firstboot
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
nimsh:2:wait:/usr/bin/startsrc -g nimclient -a "-c" >/dev/console 2>&1
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
nimclient:2:once:/usr/sbin/nimclient -S running > /dev/console 2>&1 # inform nim we're running
cons:0123456789:respawn:/usr/sbin/getty /dev/console
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
# lsitab sleep
sleep:2:once:/usr/bin/sleep 10000 2>&1
#
# shutdown -Fr
SHUTDOWN PROGRAM
Sat Sep 5 17:07:48 EDT 2009
Wait for 'Rebooting...' before stopping.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons
0513-004 The Subsystem or Group, nfsd, is currently inoperative.
0513-044 The biod Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-004 The Subsystem or Group, gssd, is currently inoperative.
0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
# uptime
05:11PM up 1 min, 1 user, load average: 0.49, 0.12, 0.04
# who -b
. system boot Sep 5 17:10
#
You can also determine the last time the system was rebooted with
the last command.
# last reboot
reboot ~ Sep 05 17:10
wtmp begins Sep 04 12:19
# last shutdown
shutdown pts/1 Sep 05 17:08
# lsitab sleep
sleep:2:once:/usr/bin/sleep 10000 2>&1
# rmitab sleep
# lsitab sleep
#
Note, you could also use the chitab command to change the contents
of an inittab entry.
$ more /etc/inittab
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
case "$1" in
stop)
echo "script 1 executed on shutdown" > /var/script1.shutdown.out;sleep 60;;
start)
echo "script 1 executed on startup" > /var/script1.startup.out;sleep 60;;
*)
echo "Invalid Option..";;
esac
case "$1" in
stop)
echo "script 2 executed on shutdown" > /var/script2.shutdown.out;sleep 60;;
start)
echo "script 2 executed on startup" > /var/script2.startup.out;sleep 60;;
*)
echo "Invalid Option..";;
esac
case "$1" in
stop)
echo "script 3 executed on shutdown" > /var/script3.shutdown.out;sleep 60;;
start)
echo "script 3 executed on startup" > /var/script3.startup.out;sleep 60;;
*)
echo "Invalid Option..";;
esac
# ln -s /etc/rc.d/init.d/script2.ksh S1script2.ksh
# ln -s /etc/rc.d/init.d/script1.ksh S2script1.ksh
# ln -s /etc/rc.d/init.d/script3.ksh S3script3.ksh
# ls -l
total 16
lrwxrwxrwx 1 root system 56 Nov 24 21:22 K71itcaTivoliCommonAgent0 -> /var/opt/tivoli/ep/runtime/nonstop/bin/nonstopservice.sh
lrwxrwxrwx 1 root system 25 Nov 25 22:29 K99dbrc.ksh -> /etc/rc.d/init.d/dbrc.ksh
-r-x------ 1 root system 2439 Nov 24 18:01 Kwpars
-rwxr-xr-x 1 root system 175 Nov 24 21:24 S00ct_boot
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S1script2.ksh -> /etc/rc.d/init.d/script2.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S2script1.ksh -> /etc/rc.d/init.d/script1.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S3script3.ksh -> /etc/rc.d/init.d/script3.ksh
lrwxrwxrwx 1 root system 56 Nov 24 21:22 S71itcaTivoliCommonAgent0 -> /var/opt/tivoli/ep/runtime/nonstop/bin/nonstopservice.sh
lrwxrwxrwx 1 root system 25 Nov 25 22:29 S99dbrc.ksh -> /etc/rc.d/init.d/dbrc.ksh
#
# ln -s /etc/rc.d/init.d/script3.ksh K1script3.ksh
# ln -s /etc/rc.d/init.d/script1.ksh K2script1.ksh
# ln -s /etc/rc.d/init.d/script2.ksh K3script2.ksh
# ls -l
total 16
lrwxrwxrwx 1 root system 28 Nov 25 23:20 K1script3.ksh -> /etc/rc.d/init.d/script3.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:20 K2script1.ksh -> /etc/rc.d/init.d/script1.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:20 K3script2.ksh -> /etc/rc.d/init.d/script2.ksh
lrwxrwxrwx 1 root system 56 Nov 24 21:22 K71itcaTivoliCommonAgent0 -/var/opt/tivoli/ep/runtime/nonstop/bin/nonstopservice.sh
lrwxrwxrwx 1 root system 25 Nov 25 22:29 K99dbrc.ksh -> /etc/rc.d/init.d/dbrc.ksh
-r-x------ 1 root system 2439 Nov 24 18:01 Kwpars
-rwxr-xr-x 1 root system 175 Nov 24 21:24 S00ct_boot
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S1script2.ksh -> /etc/rc.d/init.d/script2.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S2script1.ksh -> /etc/rc.d/init.d/script1.ksh
lrwxrwxrwx 1 root system 28 Nov 25 23:17 S3script3.ksh -> /etc/rc.d/init.d/script3.ksh
lrwxrwxrwx 1 root system 56 Nov 24 21:22 S71itcaTivoliCommonAgent0 ->
/var/opt/tivoli/ep/runtime/nonstop/bin/nonstopservice.sh
lrwxrwxrwx 1 root system 25 Nov 25 22:29 S99dbrc.ksh -> /etc/rc.d/init.d/dbrc.ksh
#
SHUTDOWN PROGRAM
Mon May 14 09:39:32 CDT 2007
# uptime
11:38PM up 9 mins, 1 user, load average: 1.46, 0.67, 0.30
# who -b
. system boot Nov 25 23:29
#
# rm /etc/rc.d/init.d/script*
# rm /etc/rc.d/rc2.d/*script*
# rm /var/*out
# ls –l /etc/rc.d/init.d/scrip*
ls: 0653-341 The file /etc/rc.d/init.d/script* does not exist.
# ls –l /etc/rc.d/rc2.d/*scrip*
ls: 0653-341 The file /etc/rc.d/rc2.d/*scri* does not exist.
# ls –l /var/*out
ls: 0653-341 The file /var/*out does not exist.
In the newest version of AIX 6.1, filesystems can be encrypted for security.
AIX comes with a user space quota system which you implement at the user,
and filesystem level to assist in enforcing space constraints.
There are snapshot utilities available in AIX, for quick backups of filesystem
data.
The filesystems above, since they are installed by default with the
operating system, are nick named “The BIG 8”.
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 11.62 1.92 84% 53567 11% /
/dev/hd2 13.12 9.95 25% 44923 2% /usr
/dev/hd9var 0.38 0.21 44% 18819 28% /var
/dev/hd3 3.38 3.37 1% 78 1% /tmp
/dev/hd1 30.00 3.68 88% 89546 10% /home
/dev/hd11admin 0.12 0.12 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 2.00 0.77 62% 33135 16% /opt
hd5 – The boot logical volume. Where the boot code resides.
hd6 – The default system dump device, and system paging space.
Note: When you install a system which is > 4 Gig of physical memory, the
system will automatically create the paging space device lg_dumplv to hold
system dumps.
hd8 – The default JFS or JFS2 log logical volumes. Where the logical volume
resides.
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Nov 26 19:34 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Nov 26 19:34 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Nov 26 19:34 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Nov 26 19:34 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Nov 26 19:35 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Nov 26 19:35 rw,log=/dev/hd8
/proc /proc procfs Nov 26 19:35 rw
/dev/hd10opt /opt jfs2 Nov 26 19:35 rw,log=/dev/hd8
#
On top of those LVs are Physical Partitions PPS. These are regions
of the logical volume divided into equal size.
On top of those PPs, are logical partitions LPS. These sit on top of
the PPs and can have one to many relationships with the their PPS.
On top of the LPs, sit the filesystems where directories, and files
actually reside.
LVM information resides in both the system’s ODM, and on the PV
itself.
AIX Basic System Administration 271
Logical Volume Manager
For the LVM information which resides on disk. All of the disks in a
vg know about other disks in the same vg. This is accomplished by a
special area on disk known as the VGDA – Volume Group
Descriptor Area.
If there is one disk in a vg, then there are two VGDAs on one disk.
If there are two disks in a vg, then there is one VGDA on one disk,
and two on the other.
If there are three, or more disks in a vg, then there is one VGDA per
disk.
The same goes for another meta data area of a disk drive in AIX.
This area is called the VGSA – Volume Group Status Area. This will
provide information regarding mirrored copies of data on disk.
To list the volume groups currently defined to the system type in the
lsvg command, which stands for LiSt Volume Group.
# lsvg
rootvg
To get more details about a volume group, such as total used space,
free space, etc, use the lsvg command with the volume group name as
the argument.
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 00c118f000004c00000001239778ea2f
VG STATE: active PP SIZE: 8 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 639 (5112 megabytes)
MAX LVs: 256 FREE PPs: 386 (3088 megabytes)
LVs: 9 USED PPs: 253 (2024 megabytes)
OPEN LVs: 8 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 16256 MAX PVs: 2
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
#
To list the disks which make up the volume group, type in the command lsvg
with the option –p, and the vg name.
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 639 386 125..05..00..128..128
#
To get more details about a physical volume type in lspv with the hdisk# name
as the argument.
# lspv hdisk0
PHYSICAL VOLUME: hdisk0 VOLUME GROUP: rootvg
PV IDENTIFIER: 00c118f097291ded VG IDENTIFIER 00c118f000004c00000001239778ea2f
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 8 megabyte(s) LOGICAL VOLUMES: 9
TOTAL PPs: 639 (5112 megabytes) VG DESCRIPTORS: 2
FREE PPs: 386 (3088 megabytes) HOT SPARE: no
USED PPs: 253 (2024 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 125..05..00..128..128
USED DISTRIBUTION: 03..123..127..00..00
#
To list the logical volumes which currently make up the volume group type in
the lsvg command with the option –l.
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 3 1 closed/syncd N/A
hd6 paging 64 64 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 3 3 1 open/syncd /
hd2 jfs2 161 161 1 open/syncd /usr
hd9var jfs2 2 2 1 open/syncd /var
hd3 jfs2 5 5 1 open/syncd /tmp
hd1 jfs2 2 2 1 open/syncd /home
hd10opt jfs2 12 12 1 open/syncd /opt
#
To list what logical volumes reside on a specific hard disk, use the
command lspv –l and use hdisk# as your argument.
# lspv -l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd6 64 64 00..64..00..00..00 N/A
hd8 1 1 00..00..01..00..00 N/A
hd4 3 3 00..00..03..00..00 /
hd2 161 161 00..49..112..00..00 /usr
hd9var 2 2 00..00..02..00..00 /var
hd3 5 5 00..00..05..00..00 /tmp
hd1 2 2 00..00..02..00..00 /home
hd10opt 12 12 00..10..02..00..00 /opt
hd5 3 3 03..00..00..00..00 N/A
#
To list the hard disks currently installed on the system which are, or
aren’t currently a member of a volume group type in the command
lspv for LiSt Physical Volume.
# lspv
hdisk0 00c118f097291ded rootvg active
hdisk1 00c118f005a9fabb None
hdisk2 00c118f09780218b None
#
Note, None next to the hard disk means that it is not currently a
member of a volume group.
Attempt to get detailed information off one of the hard disks which
are not a physical volume yet, meaning they are not members of a
volume group yet. You will receive an error.
# lspv hdisk1
0516-320 : Physical volume hdisk1 is not assigned to
a volume group.
#
You will have to make that hdisk a member of a vg, turn it into a
physical volume, before you can use it.
To determine the size of a hard disk on the system, use the bootinfo
command with the –s, for size, option.
# bootinfo –s hdisk1
10240
# bootinfo –s hdisk2
5120
# lsvg
rootvg
vg
# lspv
hdisk0 00c118f097291ded rootvg active
hdisk1 00c118f005a9fabb None
hdisk2 00c118f09780218b vg active
#
You must specify the size of an lv in LPs. Remember LPs live on top
of PPs, and are the same size. Let’s say that the vg was carved up
with PPs of all 4 meg each. That means if the disk is 5 gig in size,
the whole disk will be made up of 1262 PPs – (1262 * 4 = 5048). So
let’s say we wanted our logical volume and/or filesystem to be 2 gig,
then it would take 500 LPs to create that logical volume/filesystem –
(2000 / 4 = 500).
# smitty mklv
Now, do the reverse arithmetic operation to see how big this logical
volume is in meg – (Remember 1,000 meg = 1 gig).
# bc
500 * 4
2000
quit
#
# lsvg -l vg
vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
mylv1 jfs2 500 500 1 closed/syncd /myfs1
loglv00 jfs2log 1 1 1 closed/syncd N/A
# lsfs /myfs1
Name Nodename Mount Pt VFS Size Options Auto
Accounting
/dev/mylv1 -- /myfs1 jfs2 4096000 rw no
no
#
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Sep 09 00:27 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Sep 09 00:27 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Nov 26 19:35 rw,log=/dev/hd8
/proc /proc procfs Sep 09 00:28 rw
/dev/hd10opt /opt jfs2 Sep 09 00:28 rw,log=/dev/hd8
#
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Sep 09 00:27 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Sep 09 00:27 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Nov 26 19:35 rw,log=/dev/hd8
/proc /proc procfs Sep 09 00:28 rw
/dev/hd10opt /opt jfs2 Sep 09 00:28 rw,log=/dev/hd8
/dev/mylv1 /myfs1 jfs2 Sep 09 14:01 rw,log=/dev/loglv00
#
# reboot
Rebooting . . .
AIX Version 6
Copyright IBM Corporation, 1982, 2007.
login: root
….
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.02 0.01 64% 1686 45% /
/dev/hd2 1.26 0.07 95% 30013 61% /usr
/dev/hd9var 0.02 0.00 80% 440 34% /var
/dev/hd3 0.04 0.04 6% 20 1% /tmp
/dev/hd1 0.02 0.02 3% 7 1% /home
/dev/hd11admin 0.12 0.12 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 0.09 0.02 84% 1538 30% /opt
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Sep 09 14:04 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Sep 09 14:04 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Sep 09 14:04 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Sep 09 14:04 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Sep 09 14:04 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Nov 26 19:35 rw,log=/dev/hd8
/proc /proc procfs Sep 09 14:04 rw
/dev/hd10opt /opt jfs2 Sep 09 14:04 rw,log=/dev/hd8
#
# tail /etc/filesystems
vol = /opt
free = false
/myfs1:
dev = /dev/mylv1
vfs = jfs2
log = /dev/loglv00
mount = false
options = rw
account = false
#
Notice how there is the value of false, next to mount. This means that
the filesystem will not be mounted automatically on system reboot.
We can also see this via the lsfs command.
/myfs1:
dev = /dev/mylv1
vfs = jfs2
log = /dev/loglv00
mount = true
options = rw
account = false
#
# reboot
Rebooting . . .
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.02 0.01 64% 1684 45% /
/dev/hd2 1.26 0.07 95% 30013 61% /usr
/dev/hd9var 0.02 0.00 81% 439 34% /var
/dev/hd3 0.04 0.04 6% 20 1% /tmp
/dev/hd1 0.02 0.02 3% 7 1% /home
/dev/hd11admin 0.12 0.12 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 0.09 0.02 84% 1538 30% /opt
/dev/mylv1 1.95 1.95 1% 4 1% /myfs1
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Nov 26 19:35 rw,log=/dev/hd8
/proc /proc procfs Sep 09 14:17 rw
/dev/hd10opt /opt jfs2 Sep 09 14:17 rw,log=/dev/hd8
/dev/mylv1 /myfs1 jfs2 Sep 09 14:17 rw,log=/dev/loglv00
# ls -l
total 0
drwxr-xr-x 2 root system 256 Sep 9 13:56 lost+found
# df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/mylv1 1.95 1.95 1% 4 1% /myfs1
# cd /
# pwd
/
# umount /myfs1
# df -g /myfs1
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.02 0.01 64% 1686 45% /
# df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.02 0.01 64% 1686 45% /
# ls -l
total 0
# cd /
# mount /myfs1
# ls –l /myfs1
total 0
-rw-r--r-- 1 root system 0 Sep 9 14:20 file1
-rw-r--r-- 1 root system 0 Sep 9 14:20 file2
-rw-r--r-- 1 root system 0 Sep 9 14:20 file3
drwxr-xr-x 2 root system 256 Sep 9 13:56 lost+found
# umount /myfs1
# ls /myfs1
#
# rmfs -r /myfs1
rmlv: Logical volume mylv1 is removed.
# lsfs /myfs1
lsfs: No record matching '/myfs1' was found in /etc/filesystems.
# ls -ld /myfs1
/myfs1 not found
# lsvg -l vg
vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 closed/syncd N/A
#
# rmlv loglv00
Warning, all data contained on logical volume loglv00 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? yes
rmlv: Logical volume loglv00 is removed.
# lsvg -l vg
vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
#
Create another filesystem, this time allow AIX to create the logical
volume for you automatically – (Easier, but less control).
# smitty crfs
# mount /myfs1
# df -g /myfs1
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 1.95 1.95 1% 4 1% /myfs1
# lsvg -l vg
vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
fslv00 jfs2 500 500 1 open/syncd /myfs1
#
Note, when you create an enhanced, JFS2, filesystem and let AIX
create the lv, it will automatically select the name fslv##, as the
name of the lv.
When you create a JFS1 filesystem and let AIX create the lv, it will
automatically select the name lv##, as the name of the lv.
AIX Basic System Administration 312
Logical Volume Manager
Let’s say you wanted to increase the size of a filesystem by 1 gig.
You would first check the volume group to see if you had that much
space, and then perform the operation. If you didn’t have enough
space in the vg, then you would add a disk to the vg.
# df -m /myfs1
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 2000.00 1999.37 1% 4 1% /myfs1
# df -m /myfs1
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 2012.00 2011.37 1% 4 1% /myfs1
#
To reduce the size of a filesystem use the chfs command again, but
this time with the – operator.
# df -m /myfs1
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 2012.00 2011.37 1% 4 1% /myfs1
# df -m /myfs1
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 2004.00 2003.37 1% 4 1% /myfs1
#
# lsvg -o
vg
rootvg
# lsvg -l vg
vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
fslv00 jfs2 501 501 1 open/syncd /myfs1
# df -g /myfs1
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 1.96 1.96 1% 4 1% /myfs1
# umount /myfs1
# varyoffvg vg
# lsvg -o
rootvg
# lsvg
rootvg
vg
# exportvg vg
# lsvg
rootvg
# lsfs /myfs1
lsfs: No record matching '/myfs1' was found in /etc/filesystems.
#
To import the volume group again, either on the same, or different AIX
system, use the following.
# importvg -y vg hdisk2
vg
# mount all
mount: /dev/hd1 on /home: Device busy
mount: /proc on /proc: Device busy
mount: /dev/hd10opt on /opt: Device busy
# df -g /myfs1
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 1.96 1.96 1% 4 1% /myfs1
# umount /myfs1
# reducevg vg hdisk2
0516-016 ldeletepv: Cannot delete physical volume with allocated
partitions. Use either migratepv to move the partitions or
reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk2.
# reducevg -d vg hdisk2
0516-914 rmlv: Warning, all data belonging to logical volume
loglv00 on physical volume hdisk2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)?
yes
rmlv: Logical volume loglv00 is removed.
0516-914 rmlv: Warning, all data belonging to logical volume
fslv00 on physical volume hdisk2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)?
yes
rmlv: Logical volume fslv00 is removed.
ldeletepv: Volume Group deleted since it contains no physical volumes.
# lsvg
rootvg
#
# bootinfo -s hdisk1
10240
#
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 639 386 125..05..00..128..128
# lsvg rootvg | grep -i free
MAX LVs: 256 FREE PPs: 386 (3088 megabytes)
# lspv
hdisk0 00c118f097291ded rootvg active
hdisk1 00c118f005a9fabb None
hdisk2 00c118f09780218b None
# extendvg -f rootvg hdisk1
# lspv
hdisk0 00c118f097291ded rootvg active
hdisk1 00c118f005a9fabb rootvg active
hdisk2 00c118f09780218b None
# lsvg rootvg | grep -i free
MAX LVs: 256 FREE PPs: 1665 (13320 megabytes)
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 639 386 125..05..00..128..128
hdisk1 active 1279 1279 256..256..255..256..256
#
# lspv -l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd9var 2 2 00..00..02..00..00 /var
hd3 5 5 00..00..05..00..00 /tmp
hd1 2 2 00..00..02..00..00 /home
hd10opt 12 12 00..10..02..00..00 /opt
hd5 3 3 03..00..00..00..00 N/A
hd6 64 64 00..64..00..00..00 N/A
hd8 1 1 00..00..01..00..00 N/A
hd4 3 3 00..00..03..00..00 /
hd11admin 2 2 00..02..00..00..00 /admin
hd2 161 161 00..49..112..00..00 /usr
loglv01 1 1 00..01..00..00..00 N/A
# lspv -l hdisk1
#
# lspv -l hdisk0
#
# lspv -l hdisk1
hdisk1:
LV NAME LPs PPs DISTRIBUTION MOUNT
POINT
hd9var 2 2 00..00..02..00..00 /var
hd3 5 5 00..00..05..00..00 /tmp
hd1 2 2 00..00..02..00..00 /home
hd10opt 12 12 00..00..12..00..00 /opt
hd5 3 3 03..00..00..00..00 N/A
hd6 64 64 00..64..00..00..00 N/A
hd8 1 1 00..00..01..00..00 N/A
hd4 3 3 00..00..03..00..00 /
hd11admin 2 2 00..02..00..00..00 /admin
hd2 161 161 00..00..161..00..00 /usr
loglv01 1 1 00..01..00..00..00 N/A
#
# lspv -l hdisk0
# lspv -l hdisk1
hdisk1:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd9var 2 2 00..00..02..00..00 /var
hd3 5 5 00..00..05..00..00 /tmp
hd1 2 2 00..00..02..00..00 /home
hd10opt 12 12 00..00..12..00..00 /opt
hd5 3 3 03..00..00..00..00 N/A
hd6 64 64 00..64..00..00..00 N/A
hd8 1 1 00..00..01..00..00 N/A
hd4 3 3 00..00..03..00..00 /
hd11admin 2 2 00..02..00..00..00 /admin
hd2 161 161 00..00..161..00..00 /usr
loglv01 1 1 00..01..00..00..00 N/A
as root user to clear the boot record and avoid a potential boot
off an old boot image that may reside on the disk from which this
logical volume is moved/removed.
# chpv -c hdisk1
# bosboot -ad hdisk0
# lspv –l hdisk1
#
If you wanted to remove a disk from a volume group, you would use
the reducevg command.
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 639 386 125..05..00..128..128
hdisk1 active 1279 1279 256..256..255..256..256
# lspv
hdisk0 00c118f097291ded rootvg active
hdisk1 00c118f005a9fabb None
hdisk2 00c118f09780218b None
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 3 1 closed/syncd N/A
hd6 paging 64 64 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 3 3 1 open/syncd /
hd2 jfs2 161 161 1 open/syncd /usr
hd9var jfs2 2 2 1 open/syncd /var
hd3 jfs2 5 5 1 open/syncd /tmp
hd1 jfs2 2 2 1 open/syncd /home
hd11admin 2 2 00..02..00..00..00 /admin
hd10opt jfs2 12 12 1 open/syncd /opt
# bootlist -m normal -o
hdisk0 blv=hd5
# bootinfo -b
hdisk0
#
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 6 2 closed/syncd N/A
hd6 paging 64 128 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 3 6 2 open/syncd /
hd2 jfs2 161 322 2 open/syncd /usr
hd9var jfs2 2 4 2 open/syncd /var
hd3 jfs2 5 10 2 open/syncd /tmp
hd1 jfs2 2 4 2 open/syncd /home
hd11admin 2 2 00..02..00..00..00 /admin
hd10opt jfs2 12 24 2 open/syncd /opt
#
# reboot
Rebooting . . .
Now, change the bootlist, so hdisk1, where we mirrored to, will be the
disk the system boots off of during next reboot.
# bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5
SYSTEM REBOOTS…
# bootinfo -b
hdisk1
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.02 0.01 59% 1678 42% /
/dev/hd2 1.26 0.07 95% 30013 61% /usr
/dev/hd9var 0.02 0.00 80% 439 34% /var
/dev/hd3 0.04 0.04 6% 19 1% /tmp
/dev/hd1 0.02 0.02 3% 7 1% /home
/dev/hd11admin 0.12 0.12 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 0.09 0.02 84% 1538 30% /opt
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 6 2 closed/syncd N/A
hd6 paging 64 128 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 3 6 2 open/syncd /
hd2 jfs2 161 322 2 open/syncd /usr
hd9var jfs2 2 4 2 open/syncd /var
hd3 jfs2 5 10 2 open/syncd /tmp
hd1 jfs2 2 4 2 open/syncd /home
hd11admin 2 2 00..02..00..00..00 /admin
hd10opt jfs2 12 24 2 open/syncd /opt
# bootlist -m normal -o
hdisk1 blv=hd5
# reboot
Rebooting . . .
SYSTEM REBOOTS…
# bootinfo -b
hdisk0
#
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 6 2 closed/syncd N/A
hd6 paging 64 128 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 3 6 2 open/syncd /
hd2 jfs2 161 322 2 open/syncd /usr
hd9var jfs2 2 4 2 open/syncd /var
hd3 jfs2 5 10 2 open/syncd /tmp
hd1 jfs2 2 4 2 open/syncd /home
hd11admin jfs2 2 2 1 open/syncd /admin
hd10opt jfs2 12 24 2 open/syncd /opt
# unmirrorvg rootvg
0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run 'chpv -c <diskname>'
as root user to clear the boot record and avoid a potential boot
off an old boot image that may reside on the disk from which this
logical volume is moved/removed.
# chpv -c hdisk1
# bosboot -ad /dev/hdisk0
# bootlist -m normal -o
hdisk0 blv=hd5
Hdisk1
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 3 1 closed/syncd N/A
hd6 paging 64 64 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 3 3 1 open/syncd /
hd2 jfs2 161 161 1 open/syncd /usr
hd9var jfs2 2 2 1 open/syncd /var
hd3 jfs2 5 5 1 open/syncd /tmp
hd1 jfs2 2 2 1 open/syncd /home
hd11admin jfs2 2 2 1 open/syncd /admin
hd10opt jfs2 12 12 1 open/syncd /opt
#
Create a directory in /tmp called junk, and create multiple files, a subdirectory
and files under that subdirectory:
$ mkdir /tmp/junk
$ cd /tmp/junk
$ touch filea fileb filec filed filee
$ mkdir /tmp/junk/dira
$ touch /tmp/junk/dira/filef
$ touch /tmp/junk/dira/fileg
$ ls -l
total 24
drwxr-xr-x 2 justin staff 256 Nov 24 19:24 dira
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filea
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 fileb
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filec
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filed
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filee
$ ls -l dira
total 0
-rw-r--r-- 1 justin staff 0 Nov 24 19:23 filef
-rw-r--r-- 1 justin staff 0 Nov 24 19:24 fileg
$ rm -r /tmp/junk
$ ls -ld /tmp/junk
ls: 0653-341 The file /tmp/junk does not exist.
$
$ ls -ld /tmp/junk
drwxr-xr-x 3 justin staff 256 Nov 24 19:28 /tmp/junk
$ ls -lR /tmp/junk
total 24
drwxr-xr-x 2 justin staff 256 Nov 24 19:24 dira
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filea
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 fileb
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filec
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filed
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 filee
-rw-r--r-- 1 justin staff 10240 Nov 24 19:22 files.tar
/tmp/junk/dira:
total 0
-rw-r--r-- 1 justin staff 0 Nov 24 19:23 filef
-rw-r--r-- 1 justin staff 0 Nov 24 19:24 fileg
$ ls -l /tmp/junk/filea
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 /tmp/junk/filea
$ rm /tmp/junk/filea
$ ls -l /tmp/junk/filea
ls: 0653-341 The file /tmp/junk/filea does not exist.
$ ls -l /tmp/junk/filea
-rw-r--r-- 1 justin staff 0 Nov 24 19:22 /tmp/junk/filea
$
You can also use the tar command to move files, and subdirectories between
systems, etc.
Note, the native tar command in AIX can only crate tar-ball archives which are 8
gig in size. To get around this you can download a free version called gtar,
which can create tar-ball archives which are greater than 8 gig in size.
$ pwd
/tmp
$ ls -l files.tar
-rw-r--r-- 1 justin staff 20480 Nov 24 19:41 files.tar
$ compress files.tar
$ ls -l files.tar
ls: 0653-341 The file files.tar does not exist.
$ ls -l files.tar.Z
-rw-r--r-- 1 justin staff 886 Nov 24 19:41 files.tar.Z
$ ls -l files.tar.Z
-rw-r--r-- 1 justin staff 886 Nov 24 19:41 files.tar.Z
$ uncompress files.tar.Z
$ ls -l files.tar
-rw-r--r-- 1 justin staff 20480 Nov 24 19:41 files.tar
Note the uncompress command will automatically remove the .Z extension of a file it
uncompresses.
$ ls -l files.tar
-rw-r--r-- 1 justin staff 20480 Nov 24 19:41 files.tar
$ gzip files.tar
$ ls -l files.tar.gz
-rw-r--r-- 1 justin staff 379 Nov 24 19:41 files.tar.gz
The gzip command will append the file extension .gz to any files it compresses.
Note, the gzip command achieves a better compression ratio than the compress
command.
AIX Basic System Administration 344
AIX File Management
To uncompress any file you compressed with the gzip command, you use the
gunzip command:
$ ls -l files.tar.gz
-rw-r--r-- 1 justin staff 379 Nov 24 19:41 files.tar.gz
$ gunzip files.tar.gz
$ ls -l files.tar
-rw-r--r-- 1 justin staff 20480 Nov 24 19:41 files.tar
Notice how the gunzip command removes the .gz file extension from the file you
uncompressed.
AIX Basic System Administration 345
AIX File Management
The checksum of a file can serve as both a security measure and an integrity
check for files.
sum – Two numbers generated. One is a 16-bit checksum. The other is how
many 1024-byte blocks the file occupies.
cksum- Two numbers are generated. One is a 32-bit checksum, CRC – Cyclic
Redundancy Check. The other is the number of bytes the file occupies.
$ sum /tmp/files.tar
55502 20 /tmp/files.tar
$
$ cksum /tmp/files.tar
3203472726 20480 /tmp/files.tar
$
Previous: 55502 20
Previous: 3b527c471941b88b516e655a6b2e3476
$ csum /tmp/files.tar
2983325f6403aedddfe0b44a70dcffed /tmp/files.tar
$
$ file /tmp
/tmp: directory
$ file /tmp/files.tar
/tmp/files.tar: tar archive
$ file /usr/bin/cat
/usr/bin/cat: executable (RISC System/6000) or object module
$ file /tmp/junk/filea
/tmp/junk/filea: empty
$
$ file /etc/hosts
/etc/hosts: ascii text
$
Byte scale:
- 8 Bits = 1 Byte
- 1,000 Bytes = 1 Kilobyte
- 1,000 Kilobytes = 1 Megabyte
- 1,000 Megabytes = 1 Gigabyte
- 1,000 Gigabytes = 1 Terabyte
- 1,000 Terabytes = 1 Petabyte
- 1,000 Petabytes = 1 Exabyte
- 1,000 Exabytes = 1 Zettabyte
- 1,000 Zettabytes = 1 Yottabyte
# pwd
/tmp
# ls -l testfile
-rw-r--r-- 1 root system 10485760 Nov 29 11:12 testfile
# ls -l testfile2
-rw-r--r-- 1 root system 1048576000 Nov 29 11:17 testfile2
#
# du -m testfile
10.00 testfile
# du -g testfile2
0.98 testfile2
# du -m testfile2
1000.00 testfile2
#
# pwd
/tmp
# mkdir files
# cd files
# pwd
/tmp/files
# mv testfile files
# mv testfile2 files
# ls -l files
total 2068488
-rw-r--r-- 1 root system 10485760 Nov 29 11:23 testfile
-rw-r--r-- 1 root system 1048576000 Nov 29 11:23 testfile2
#
# du -m files
1010.00 files
# du -g files
0.99 files
# rm –r files
Paging space allows the system to address more memory then is actually
there.
If you have 20 gig of real memory/RAM, but also have 5 gig of paging space,
you can think of the system as having 25 gig of total memory.
When the amount of free physical memory/RAM in the system is low, programs or
data that have not been used recently are moved from real physical
memory/RAM to paging space on disk to release the real memory/RAM for other
activities.
By default AIX BOS installation creates a paging space logical volume called hd6 on
drive hdisk0, where you installed the operating system.
The default paging space size is determined during BOS installation, by the
following initial sizing rules:
Paging space is allocated in a round robin fashion via 4KB pages with multiple
paging spaces/lvs.
# lsps -s
Total Paging Space Percent Used
512MB 2%
#
You can dynamically increase the size of paging space with the
following command:
# lsvg rootvg | grep -i "pp size"
VG STATE: active PP SIZE: 64 megabyte(s)
# bc
1000 / 64
15
quit
# chps -s 15 hd6
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 1472MB 1 yes yes lv 0
#
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 1472MB 1 yes yes lv 0
# chps -d 15 hd6
shrinkps: Temporary paging space paging00 created.
shrinkps: Dump device moved to temporary paging space.
shrinkps: Paging space hd6 removed.
shrinkps: Paging space hd6 recreated with new size.
shrinkps: Resized and original paging space characteristics differ,
check the lslv command output.
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
# lsps -s
Total Paging Space Percent Used
512MB 2%
#
# smitty mkps
# lsps -s
Total Paging Space Percent Used
512MB 2%
#
Notice how the column Active, and Auto have the value of no for this newly
created paging space, paging00. To activate the paging space use the swapon
command:
# swapon /dev/paging00
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 1 yes no lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 1 yes no lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
# swapoff /dev/paging00
# lsps -s
Total Paging Space Percent Used
512MB 2%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 0 no no lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
# shutdown -Fr
SHUTDOWN PROGRAM
Sat Sep 5 17:07:48 EDT 2009
Wait for 'Rebooting...' before stopping.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons
0513-004 The Subsystem or Group, nfsd, is currently inoperative.
0513-044 The biod Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-004 The Subsystem or Group, gssd, is currently inoperative.
0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
When the system comes back up from its reboot, we will see that
the paging space we created, paging00, is not activated:
# uptime
10:10AM up 1 min, 1 user, load average: 0.06, 0.03, 0.01
# who -b
. system boot Nov 26 10:09
# lsps -s
Total Paging Space Percent Used
512MB 2%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 0 no no lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
# ls -l /etc/swapspaces
-rw-r--r-- 1 root system 502 Nov 26 09:59 /etc/swapspaces
# cat /etc/swapspaces
* /etc/swapspaces
*
* This file lists all the paging spaces that are automatically put into
* service on each system restart (the 'swapon -a' command executed from
* /etc/rc swaps on every device listed here).
*
* WARNING: Only paging space devices should be listed here.
*
* This file is modified by the chps, mkps and rmps commands and referenced
* by the lsps and swapon commands.
hd6:
dev = /dev/hd6
auto = yes
checksum_size = 0
paging00:
dev = /dev/paging00
auto = no
checksum_size = 0
hd6:
dev = /dev/hd6
auto = yes
checksum_size = 0
paging00:
dev = /dev/paging00
auto = yes
checksum_size = 0
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 0 no yes lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
You can manually enable all paging spaces with the command:
# swapon -a
0517-075 swapon: Paging device /dev/hd6 is already active.
swapon: Paging device /dev/paging00 activated.
#
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 1 yes yes lv 0
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
# shutdown -Fr
SHUTDOWN PROGRAM
Sat Sep 5 17:07:48 EDT 2009
Wait for 'Rebooting...' before stopping.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons
0513-004 The Subsystem or Group, nfsd, is currently inoperative.
0513-044 The biod Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-004 The Subsystem or Group, gssd, is currently inoperative.
0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
# uptime
10:28AM up 1 min, 1 user, load average: 0.46, 0.16, 0.06
# who -b
. system boot Nov 26 10:27
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 1 yes yes lv 0
hd6 hdisk0 rootvg 512MB 1 yes yes lv 0
#
# lsps -s
Total Paging Space Percent Used
1472MB 1%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk0 rootvg 960MB 1 yes yes lv 0
hd6 hdisk0 rootvg 512MB 1 yes yes lv 0
# swapoff /dev/paging00
# rmps paging00
rmlv: Logical volume paging00 is removed.
# lsps -s
Total Paging Space Percent Used
512MB 2%
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
#
When the system experiences a fatal error in it’s kernel, sometimes referred to
as a kernel panic, the system dump facility will copy the entire contents of
memory/RAM, kernel memory pages, to a special logical volume known as the
dump device.
When there is a fatal problem which would cause AIX not to function any
longer, the entire contents of the kernel will be dumped to this dump device.
After that the system will reboot itself, and return to service. You can then either
analyze the generated system dump yourself, or send it to IBM technical
support for analysis, as some analysis require in depth knowledge of AIX
internals, as well as access to it’s source code.
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump traditional
#
Due to the fact that our systems in this lab are all under 4 gig of memory/RAM, we
do not have a dedicated dump device for the running kernel to dump to. In the
event of a system dump/panic, it will dump to /dev/hd6, which is also the default
paging space logical volume device.
Note: A system dump in AIX version 6.1, and above will always result in a
compressed system dump. You cannot disable compression any longer.
Due to this, if the system were to dump it’s running kernel, due to an error, it will dump to
hd6. Now theoretically the system has no need for paging space at this point, because it is
in the process of crashing completely. That being the case it uses that space for the
running system’s kernel in memory which is currently failing.
After the system dumps the running kernel to the paging space LV, hd6, it will reboot itself.
During the system boot following a system dump, the system will copy the dump contained
in the logical volume to a file on disk, to clear the space for paging space. This directory is
called the copy directory.
If your copy directory does not have sufficient space for this copy, to hold the dump in hd6,
you will be asked, via the console, to copy the dump off of the paging space to an external
device to protect it. You need to protect it from when the system boots and paging space is
active, otherwise when paging space is initialized, and written to it will overwrite some of
the dump, or all of it, damaging it. Note, the system only prompts you for this copy during
system reboot, if the dump device is set to the paging space device.
# sysdumpdev -L
0453-019 No previous dumps recorded.
# sysdumpstart –p
After the system dumps the memory to the dump device, the system will
automatically reboot itself.
# uptime
10:06PM up 1 user, load average: 0.63, 0.20, 0.07
# who -b
. system boot Nov 26 22:05
# sysdumpdev -L
0453-039
# sysdumpstart –p
# uptime
10:13PM up 1 min, 2 users, load average: 0.66, 0.28, 0.11
# who -b
. system boot Nov 26 22:12
# sysdumpdev -L
0453-039
# cd /var/adm/ras
# pwd
/var/adm/ras
# df -m .
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd9var 448.00 114.32 75% 9859 27% /var
# du -m file
104.91 file
# df -m .
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd9var 448.00 9.41 98% 9860 73% /var
# sysdumpstart –p
# smitty crfs
# ls /dump
lost+found
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump traditional
# sysdumpdev -d /dump
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /dump
forced copy flag FALSE
always allow dump FALSE
dump compression ON
type of dump traditional
#
# sysdumpstart –p
# uptime
11:03PM up 1 min, 1 user, load average: 0.95, 0.32, 0.12
# who -b
. system boot Nov 26 23:01
# sysdumpdev -L
0453-039
Prior to you creating a dedicated dump device, you need to determine how
much space your would need if your system were to crash/dump right now.
You should run this command during your system’s most heaviest workload.
# sysdumpdev -e
0453-041 Estimated dump size in bytes: 189372825
#
# smitty mklv
# sysdumpdev -l
primary /dev/dumplv
secondary /dev/sysdumpnull
copy directory /dump
forced copy flag FALSE
always allow dump FALSE
dump compression ON
type of dump traditional
# sysdumpstart –p
# uptime
11:35PM up 1 user, load average: 0.43, 0.11, 0.04
# who -b
. system boot Nov 26 23:35
# sysdumpdev -L
0453-039
You or IBM support examine’s the dump with the kdb, Kernel DeBugger utility.
In version of AIX 4.3 and below the crash utility was used. In AIX version 5.1
and above the kdb utility is used.
# snap -a
Checking space requirement for general information.........
# date
Wed Dec 1 14:50:52 CST 2010
# cd /tmp/ibmsupt
# pwd
/tmp/ibmsupt
# ls
async dumpdata getRtasHeap kernel nfs printer sissas
tcpip wpars
XS25 client_collect filesys hacmp lang other
scraid sna testcase
artex dump general install lvm pcixscsi
script.log ssa wlm
#
# cd dump
# pwd
/tmp/ibmsupt/dump
# ls
autoload dump.BZ dump.snap errdead kdb kdb_64
livedumpdead mdmprpt.out minidump_last trcdead unix.Z
#
The kdb command has two arguments, when running on the system that did not
originally generate the system dump you are analyzing.
If you are analyzing the system dump on the system where the dump was
generated, then you will not need to explicitly specify the unix, kernel, file as an
argument when invoking it.
In this example, we’ll invoke it with the unix, kernel, file as if we were IBM/AIX
technical support.
# uncompress unix.Z
# dmpuncompress dump.BZ
-- replaced with dump
#
(0)> stat
SYSTEM_CONFIGURATION:
CHRP_SMP_PCI POWER_PC POWER_7 machine with 4 available CPU(s) (64-bit registers)
SYSTEM STATUS:
sysname... AIX
nodename.. gvicaix09
release... 1
version... 6
build date Oct 1 2010
build time 18:00:31
label..... 1040A_61L
machine... 000B158AD400
nid....... 0B158AD4
time of crash: Wed Dec 1 13:44:09 2010
age of system: 3 day, 23 hr., 4 min., 46 sec.
xmalloc debug: enabled
FRRs active... 0
FRRs started.. 0
CRASH INFORMATION:
CPU -1 CSA 03C372A8 at time of crash, error code for LEDs: 00000000
(0)>
0>
0> cpu 1
1>
Now the kdb prompt changes because we are now looking at CPU 1 – The
second CPU.
(1)> cpu 2
(2)> cpu 3
(3)> cpu 4
Invalid cpu 4 number
Notice how moving to CPU 4 errored. Why? Well let’s exit kdb and find out. Kdb
is exited with the exit command:
(3)> exit
#
# smtctl
(0)> status
CPU TID TSLOT PID PSLOT PROC_NAME
0 1860061 390 6000BE 96 sysdumpstart
1 180031 24 E001C 14 wait
2 190033 25 F001E 15 wait
3 1B0037 27 100020 16 wait
4-255 Disabled
(0)> vfs
GFS DATA TYPE FLAGS
(0)>
(0)> p 96
SLOT NAME STATE PID PPID ADSPACE CL #THS
NAME....... sysdumpstart
STATE...... stat :07 .... xstat :0000
FLAGS...... flag :00200001 LOAD EXECED
........... flag2 :00000000
........... flag3 :00000000
........... atomic :00000000
........... secflag:0001 ROOT
LINKS...... child :0000000000000000
........... siblings :0000000000000000
........... uidinfo :00000000022A2D68
........... ganchor :F1000F0A00018000 <pvproc+018000>
THREAD..... threadlist :F1000F0A10018600 <pvthread+018600>
DISPATCH... synch :FFFFFFFFFFFFFFFF
AACCT...... projid :00000000 ........... sprojid :00000000
........... subproj :0000000000000000
........... file id :0000000000000000 0000000000000000 00000000
........... kcid :00000000
........... flags :0000
# cd /
# umount /dump
# rmfs –r /dump
1. User mode
2. System mode
User mode means that the system is executing the source code of the program,
that a developer/programmer wrote.
System mode means that the system is executing what is known as a system
call. A system call is called on behalf of a user process. A system call is a pre-
defined “function”. System calls are functions that a programmer can call to
perform the services of the operating system. An example of a system call is
read(). When the processor sees that the running program code needs to read
a file on disk, the user program calls on the kernel to execute the read()
system call on it’s behalf because a system call has to run in the kernel’s
private/privilege area, and user programs cannot run there.
Each process has a name, a name which is usually the name of the program,
etc. A process is a name given to a program being executed by the operating
system
Every process has a unique ID which gets assigned to them when you
submit them to the system for execution. This ID is called the PID, Process
Identifier. This ID is used so you and the system can keep track of this
running process, and control it.
All process IDs, PID numbers, are even, with the exception of the init
process, PID 1.
The first user process ID, PID, number is 1. It is assigned to the init process
during the boot process.
AIX Basic System Administration 418
AIX System Process Management
The smallest unit of a process is a thread.
A process can be multi-threaded, meaning that it can run more than one software
instruction on multiple processors/CPUs simultaneously.
Every thread is assigned a unique ID known as the TID, Thread Identifier. There
numbers are odd.
Once per second, the recent processor usage values for all threads are
recalculated.
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Dec 01 - 0:00 /etc/init
root 655466 4653244 0 Dec 01 - 0:00 /usr/sbin/portmap
root 1507436 4653244 0 Dec 01 - 0:00 sendmail: accepting connect
root 1835106 4653244 0 Dec 01 - 0:00 /usr/sbin/nimesis -s
root 1966272 5570770 0 Dec 01 - 0:59 /var/opt/tivoli/ep/_jvm/jre
root 2031762 4653244 0 Dec 01 - 0:00 /usr/sbin/hostmibd
root 2162820 4653244 0 Dec 01 - 0:04 /usr/sbin/syslogd
root 2228378 4653244 0 Dec 01 - 0:00 /usr/sbin/tftpd -n
root 2293960 4653244 0 Dec 01 - 0:00 /opt/freeware/cimom/pegasus
root 2359386 1 0 Dec 01 - 0:00 /usr/ccs/bin/shlap64
root 2752610 4653244 0 Dec 01 - 0:00 /usr/sbin/aixmibd
root 2818188 4653244 0 Dec 01 - 0:00 /usr/sbin/snmpmibd
root 2949226 1 0 Dec 01 - 0:00 /opt/ibm/icc/cimom/bin/dirs
root 3014808 4653244 0 Dec 01 - 0:00 /usr/sbin/writesrv
root 3080392 1 0 Dec 01 - 0:00 /usr/sbin/uprintfd
pconsole 3145922 5701812 0 Dec 01 - 0:00 /bin/ksh /pconsole/lwi/bin/
root 3342462 4653244 0 Dec 01 - 0:00 /usr/sbin/inetd
root 3407994 4653244 0 Dec 01 - 0:00 /usr/sbin/snmpd
root 3473652 1 0 Dec 01 - 0:00 /usr/sbin/cron
root 3539112 1 1 Dec 01 - 0:31 /usr/sbin/getty /dev/consol
root 3604716 4653244 0 Dec 01 - 0:00 /usr/sbin/biod 6
# ps –elmo THREAD
To run a process in the foreground, like a regular command, simply just run it in
the shell by typing it in:
# sleep 5
#
The problem with the foreground is that you will have to wait until it completes
before you gain control of your terminal again. To throw something in the
background put an ampersand - & at the end of it. This way you can move on
to other things, while this is running.
# sleep 5 &
[1] 7405732
#
#
# jobs
[1] + Running sleep 1000 &
# jobs -l
[1] + 3735750 Running sleep 1000 &
You can take a job which is currently running in the background and move it to
the foreground
# fg 3735750
sleep 1000
# jobs -l
[1] + 3735750 Stopped (SIGTSTP) sleep 1000 &
#
# kill -9 3735750
Now look at the second number in the above ps –ef output, which is the third
column over. That is the PPID – Parent Process ID. This is the process who is
a parent of the process running – sleep. Sleep is the child to 2294014. Now
let’s see what 2294014 is?
It is the Korn shell process that you logging onto the system launched.
# kill -9 2294014
That will terminate your putty connection to the system because that is your login
session/Korn shell.
Log back into the system as root, and you will now see that sleep process has
been adopted by it’s grandparent – init PID 1.
Sometimes something funky happens and the child cannot be killed by the parent
or the grandparent. When this happens the child process becomes a zombie
when it’s done running. Now you cannot kill a zombie process because you
cannot kill a process that is already dead. The only way to get rid of zombies is to
reboot the system. A zombie has no negative impact on the system, it just takes
up a process slot, in the process table.
# ps -k | grep -i def
278720 0:00 <defunct>
405600 0:00 <defunct>
450610 0:00 <defunct>
520274 0:00 <defunct>
565278 0:00 <defunct>
684206 0:00 <defunct>
Note how you received the warning above that jobs are currently running under
your user name. Ignore that and type in exit a second time, maybe a third time
as well.
# exit
# exit
Connection Closed.
Note how the process died even though 10000 seconds isn’t up yet. You can
tell the system not to kill the process just because you as the user who started
it logged out of the system:
Log into the system again, and you will see this time that the process is still
running happily, and was adopted by root:
# ps -ef | grep -i sleep
root 6881364 1 0 14:23:19 - 0:00 sleep 10000
#
This command automatically creates a nohup.out file, just in case any output is
generated:
# ls -l nohup.out
-rw------- 1 root system 0 Dec 03 14:23 nohup.out
# date
Fri Dec 3 14:25:39 CST 2010
#
The algorithm for determining which thread should be run next is called a
scheduling policy.
9.) After 1 second, a clock click, (once every second), this is assuming nothing has
preempted the currently running thread, and this thread is taking more than 1
second to run, all of the threads in that CPU's run queue's priorities are re-
calculated, and that running thread gets thrown back into that CPU's run-queue
to attempt and keep processor affinity for re-dispatchment of it later. You see a
thread can only run for 1 second total which is known as a clock click, if it's not
interrupted before it gets to that 1 second. After 1 second all threads in that
CPU's run queue including that one are re-calculated, and another re-calculated
thread could now run on the CPU. This is to give everyone a chance to run on
the CPU. How does this work exactly with the priorities? Well every time a thread
is still running at every 10ms clock tick when the system wakes up a check, that
thread is penalized with it’s priority incrementing by one because of the CPU
usage penalty. That’s why at every clock click, we know there is a good chance
that our currently running thread will get switch back out to the run queue.
AIX Basic System Administration 438
AIX System Process Management
The procedure just discussed is known as an external interrupt, because the
running thread did not give up the processor/CPU voluntarily, it was an
involuntary forfit of the processor/CPU.
There are internal interrupts as well. This is when the user thread makes a
system call, for the kernel to do something on it's behalf. If the system sees
that this is an I/O operation which will require some time to complete, it still
wants to give other threads in the run queue who maybe ready to run now, a
chance to run. That being the case, the user thread interrupts itself by
making a system call for the kernel to run in system mode. The user thread
will then go back into the queue as a sleeping process, S, waiting for that I/O
to complete, while that I/O is running another thread can make use of that
CPU. When that I/O is done then that thread will be eligible to re-gain control
of a CPU, and run once again continuing it's run.
AIX Basic System Administration 439
AIX System Process Management
While a thread is running on a CPU, it will be interrupted always by the kernel, if
the kernel has to service a h/w request. After a h/w interrupt the kernel will
check the run-queue of that CPU, to see if any thread which is runnable has a
better priority then then one which was just interrupted by the h/w interrupt.
Only one CPU can make a system call to a kernel/access the kernel at one
time.
The one second clock click where all threads priorities are adjusted is referred
to as a major clock cycle.
3.) When a process is in the A state, one or more of it's threads are in the R state.
This means that they are ready to run.
- If a thread is waiting for an event or for an I/O (system call) the thread is said to
be sleeping, or in the S state.
- When the I/O is complete, the thread is awankened and placed in the ready-to-
run queue.
A process in the following which has a thread in one of the following states, is in
an A state:
R,S, Running, T
# ps -k
PID TTY TIME CMD
0 - 0:25 swapper
131076 - 3:26 wait
196614 - 0:00 sched
262152 - 0:00 lrud
327690 - 0:00 vmptacrt
393228 - 0:00 psmd
458766 - 0:00 vmmd
524304 - 0:00 memgrdd
589842 - 0:00 lsareapr
720918 - 0:00 devstatd
786456 - 0:00 pilegc
851994 - 0:01 xmgc
917532 - 2:55 wait
983070 - 0:00 netm
1048608 - 0:22 gil
1114146 - 0:00 wlmsched
1179684 - 0:00 armtrace_kproc
1376348 - 0:00 rtcmd
1572946 - 0:00 n4bg
1638454 - 0:00 vscsi_kproc
1703988 - 0:00 lvmbb
1769532 - 0:00 memp_rbd
1900622 - 0:00 rgsr
2097216 - 0:00 j2pg
Look under the disk space statistics in the command below, they are null,
noted by the -, hyphen. This is because this filesystem and it’s contents are
not really on disk.
# df -g /proc
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/proc - - - - - /proc
#
# ls /proc
0 1179684 1507394 1835120 2031736 2294014 262152 2883672 3145876 3408006 3670158
4128856 4390958 4653228 4915244 5242890 5439662 5701860 5898426 655418 851994 version
1 131076 1573002 1900602 2097262 2359376 2621520 2949278 327690 3473576 393228
4194452 4456666 4718792 4980908 524304 5505226 5767358 5963972 6881354 917532
1048608 1376330 1638454 196614 2162762 2424918 2752666 3014760 3276920 3539052 3932324
4260014 4522128 4784324 5112020 5308652 5570734 5832710 6160586 720918 983070
1114146 1441848 1769656 1966172 2228382 2490468 2818134 3080308 3342546 3604674 4063380
4325516 458766 4849896 5177588 5374126 5636284 589842 6226124 786456 sys
#
# ls -ld 7405648
dr-xr-xr-x 1 root system 0 Dec 03 13:03 7405648
# cd 7405648
# pwd
/proc/7405648
# ls -l
total 16
-rw------- 1 root system 0 Dec 03 13:03 as
-r-------- 1 root system 128 Dec 03 13:03 cred
--w------- 1 root system 0 Dec 03 13:03 ctl
lr-x------ 22 root system 0 Dec 03 10:14 cwd -> /
dr-x------ 1 root system 0 Dec 03 13:03 fd
dr-xr-xr-x 1 root system 0 Dec 03 13:03 lwp
-r-------- 1 root system 0 Dec 03 13:03 map
-r-------- 1 root system 0 Dec 03 13:03 mmap
dr-x------ 1 root system 0 Dec 03 13:03 object
-r--r--r-- 1 root system 448 Dec 03 13:03 psinfo
lr-x------ 22 root system 0 Dec 03 10:14 root -> /
-r-------- 1 root system 12288 Dec 03 13:03 sigact
-r-------- 1 root system 1520 Dec 03 13:03 status
-r--r--r-- 1 root system 0 Dec 03 13:03 sysent
# cd lwp
# pwd
/proc/7405648/lwp
# ls
5308459
# cd 5308459
# ls
lwpctl lwpsinfo lwpstatus
# ls -l
total 0
--w------- 1 root system 0 Dec 03 13:04 lwpctl
-r--r--r-- 1 root system 120 Dec 03 13:04 lwpsinfo
-r-------- 1 root system 1200 Dec 03 13:04 lwpstatus
# cd /
# ls -ld /proc/7405648
dr-xr-xr-x 1 root system 0 Dec 03 13:07 /proc/7405648
# kill -9 7405648
# ps -ef | grep -i sleep
[1] + Killed sleep 10000 &
# ls -ld /proc/7405648
ls: 0653-341 The file /proc/7405648 does not exist.
#
# lssrc -a
Subsystem Group PID Status
platform_agent 4587666 active
cimsys 2293960 active
snmpd tcpip 3407994 active
syslogd ras 2162820 active
portmap portmap 655466 active
sendmail mail 1507436 active
inetd tcpip 3342462 active
hostmibd tcpip 2031762 active
snmpmibd tcpip 2818188 active
aixmibd tcpip 2752610 active
nimesis nim 1835106 active
biod nfs 3604716 active
….
# lssrc –s inetd
Subsystem Group PID Status
inetd tcpip 3342462 active
# stopsrc -s inetd
0513-044 The /usr/sbin/inetd Subsystem was requested to stop.
# startsrc -s inetd
0513-059 The inetd Subsystem has been started. Subsystem PID is 2228386.
# lssrc -s inetd
Subsystem Group PID Status
inetd tcpip 2228386 active
#
# lssrc -g nfs
Subsystem Group PID Status
biod nfs 3604716 active
nfsd nfs 4980976 active
rpc.mountd nfs 5046464 active
rpc.statd nfs 5243054 active
rpc.lockd nfs 5308584 active
nfsrgyd nfs inoperative
gssd nfs inoperative
# stopsrc -g nfs
0513-044 The biod Subsystem was requested to stop.
0513-044 The nfsd Subsystem was requested to stop.
0513-044 The rpc.mountd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
# lssrc -g nfs
Subsystem Group PID Status
biod nfs inoperative
nfsd nfs inoperative
rpc.mountd nfs inoperative
nfsrgyd nfs inoperative
gssd nfs inoperative
rpc.lockd nfs inoperative
rpc.statd nfs inoperative
#
# startsrc -g nfs
0513-059 The biod Subsystem has been started. Subsystem PID is 5046476.
0513-059 The nfsd Subsystem has been started. Subsystem PID is 5243058.
0513-059 The rpc.mountd Subsystem has been started. Subsystem PID is 5308588.
0513-059 The nfsrgyd Subsystem has been started. Subsystem PID is 4980982.
0513-059 The gssd Subsystem has been started. Subsystem PID is 4456472.
0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 4980984.
0513-059 The rpc.statd Subsystem has been started. Subsystem PID is 3604718.
# lssrc -g nfs
Subsystem Group PID Status
biod nfs 5046476 active
nfsd nfs 5243058 active
rpc.mountd nfs 5308588 active
rpc.lockd nfs 4980984 active
rpc.statd nfs 3604718 active
nfsrgyd nfs inoperative
gssd nfs inoperative
#
# lssrc -s inetd
Subsystem Group PID Status
inetd tcpip 2228386 active
# refresh -s inetd
l0513-095 The request for subsystem refresh was completed successfully.
The special device files reside in the /dev directory, which is under
the root – hd4 partition/lv in the rootvg vg.
The special device files in the /dev directory maybe the access
points to these devices for the o/s commands, but the actual device
attributes are kept in the system’s ODM – Object Data Manager.
The ODM is very critical to the overall operation of the system. If the
ODM fails, or is removed from the system, that could render the
whole system unusable, and it could crash, and not be able to
reboot.
# ls /etc/objrepos
ATM_PVC DAVars PdAt config_lock
CDiagAtt DSMOptions PdAt.vc crypto_module
CDiagAtt.vc DSMOptions.vc PdAtXtd crypto_module.vc
CDiagDev DSMenu PdAtXtd.vc errnotify
Config_Rules FRUB PdCn history
CuAt FRUB_SRC PdDv history.vc
CuAt.vc FRUs PdDv.vc inventory
CuData FRUs_src PdPathAt inventory.vc
CuData.vc MenuGoal PdPathAt.vc lpp
# ls /usr/lib/objrepos
.sna.anynet.socksna.fail_install XINPUT.vc
CC crypto_module
CC.vc crypto_module.vc
DSMOptions fix
DSMOptions.vc fix.vc
DSMenu fix_lock
FONT history
FONT.vc history.vc
GAI inventory
…
# ls /dev
.SRC-unix hd11admin mem ptyp7 rhd3 sysdumpfile ttypb
IPL_rootvg hd2 null ptyp8 rhd4 sysdumpnull ttypc
SRC hd3 nuls ptyp9 rhd5 tty ttypd
__vg10 hd4 nvram ptypa rhd6 ttyp0 ttype
audit hd5 pmem ptypb rhd8 ttyp1 ttypf
clone hd6 ptc ptypc rhd9var ttyp2 urandom
console hd8 pts ptypd rhdisk0 ttyp3 vio0
echo hd9var ptyp0 ptype rootvg ttyp4 vscsi0
error hdisk0 ptyp1 ptypf sad ttyp5 vty0
errorctl ipl_blv ptyp2 random sfw0 ttyp6 xti
fscsi0 ipldevice ptyp3 rhd1 slog ttyp7 zero
fscsi1 iscsi0 ptyp4 rhd10opt spx ttyp8
hd1 kmem ptyp5 rhd11admin sysdump ttyp9
hd10opt log ptyp6 rhd2 sysdumpctl ttypa
#
# ls -l /dev
total 40
drwxrwx--- 2 root system 4096 Nov 30 23:50 .SRC-unix
crw-rw---- 1 root system 10, 0 Nov 24 22:50 IPL_rootvg
srwxrwxrwx 1 root system 0 Nov 30 10:39 SRC
crw------- 1 root system 10, 0 Nov 30 10:39 __vg10
cr--r----T 1 root system 8, 0 Nov 24 22:47 audit
crw-rw-rw- 1 root system 12, 0 Nov 24 22:47 clone
crw--w--w- 1 root system 4, 0 Nov 24 22:47 console
crw-rw-rw- 1 root system 12, 25 Nov 24 22:51 echo
crw--w--w- 1 root system 6, 0 Nov 30 15:00 error
crw------- 1 root system 6, 1 Nov 24 22:47 errorctl
crw-rw-rw- 1 root system 17, 0 Nov 24 22:47 fscsi0
crw-rw-rw- 1 root system 17, 1 Nov 24 22:47 fscsi1
brw-rw---- 1 root system 10, 8 Nov 24 22:49 hd1
brw-rw---- 1 root system 10, 9 Nov 24 22:49 hd10opt
brw-rw---- 1 root system 10, 10 Nov 24 22:49 hd11admin
brw-rw---- 1 root system 10, 5 Nov 24 22:49 hd2
brw-rw---- 1 root system 10, 7 Nov 24 22:49 hd3
…
# lsdev -Cc if
en0 Available Standard Ethernet Network Interface
en1 Defined Standard Ethernet Network Interface
et0 Defined IEEE 802.3 Ethernet Network Interface
et1 Defined IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
#
A true next to the device attribute indicates that this attribute can be
changed with the chdev –a attr=value –l device command. A false
next to the device attribute indicates that this attribute cannot be
changed.
# lsdev -Cc if
en0 Available Standard Ethernet Network Interface
en1 Defined Standard Ethernet Network Interface
et0 Defined IEEE 802.3 Ethernet Network Interface
et1 Defined IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
# lsattr -El en0
alias4 IPv4 Alias including Subnet Mask True
alias6 IPv6 Alias including Prefix Length True
arp on Address Resolution Protocol (ARP) True
authority Authorized Users True
broadcast Broadcast Address True
mtu 1500 Maximum IP Packet Size for This Device True
netaddr 192.168.240.123 Internet Address True
netaddr6 IPv6 Internet Address True
netmask 255.255.255.0 Subnet Mask True
prefixlen Prefix Length for IPv6 Internet Address True
remmtu 576 Maximum IP Packet Size for REMOTE Networks True
rfc1323 Enable/Disable TCP RFC 1323 Window Scaling True
security none Security Level True
state up Current Interface Status True
tcp_mssdflt Set TCP Maximum Segment Size True
tcp_nodelay Enable/Disable TCP_NODELAY Option True
tcp_recvspace Set Socket Buffer Space for Receiving True
tcp_sendspace Set Socket Buffer Space for Sending True
#
We have come across another issue above. We can modify this value, but not
when the device is in use. To correct this use the option –P. What is option
does is update the ODM database/registry, but not the running device driver. It
updates the ODM, so the next time you reboot the system, which will be when
the this device, hdisk0, is not in use again because the operating system will be
down.
# shutdown -Fr
SHUTDOWN PROGRAM
Wed Dec 1 01:32:58 CST 2010
Network Address.............C05076030A4A001C
ROS Level and ID............
Device Specific.(Z0)........
Device Specific.(Z1)........
Device Specific.(Z2)........
Device Specific.(Z3)........
Device Specific.(Z4)........
Device Specific.(Z5)........
Device Specific.(Z6)........
Device Specific.(Z7)........
Device Specific.(Z8)........C05076030A4A001C
Device Specific.(Z9)........
Hardware Location Code......U8406.70Y.06B159A-V9-C5-T1
It can also tell you what speed your NIC is set at, and how fast it is currently
running:
The attach attribute displays the status of the HBA connection to your SAN:
none = Status if the adapter is not connected to a SAN switch (cable is present,
but switch port is not configured.
al = Status if the adapter has no cable to a switch or you are directly attached to
a storage subsystem, “al” means Arbitrary Loop. In the latter case this Status is
acceptable for direct attachment when bypassing a SAN switch.
AIX Basic System Administration 488
Devices
# cfgmgr
# lsdev -Cc disk
hdisk0 Available Virtual SCSI Disk Drive
hdisk1 Available Virtual SCSI Disk Drive
hdisk2 Available Virtual SCSI Disk Drive
#
# smitty devices
# smitty chgdsk
The IBM system type, and model of each current p7 system are as
follows:
# lsmcode -c
The current permanent system firmware image is AA710_088
The current temporary system firmware image is AA710_088
The system is currently booted from the temporary firmware image.
#
When you upgrade the microcode/firmware of a system, you are upgrading the
flexible service processor/FSP’s code. There are two sides to the service
processor, the A – Permanent side, and the B – Temporary side. When you
apply microcode/firmware to the system it gets applied initially to the Temporary
side, while the current/old microcode/firmware remains on the Permanent side.
After you allow the system to run for, let’s say a few weeks, with the new
microcode/firmware then you commit it by copying the Temporary side/new level
it to the permanent side/old level. You can also reject the newly upgrade
microcode/firmware if it causes issues with the system, and that is copying the
Permanent side/old level over the Temporary side/new level.
Every IBM server has a four digit machine type such as 8406, and a model id such
as 70Y. To determine this for your system type in the following:
# uname -M
IBM,8406-70Y
#
Every IBM server has a unique serial number. To determine this for your system
type in the following:
# prtconf -m
Memory Size: 1024 MB
# bootinfo -r
1048576
# prtconf -s
Processor Clock Speed: 3000 MHz
#
# diag
<E NTER>
<ENTER>
<F10>
# errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
A6DF45AA 1201014310 I O RMCdaemon The daemon is started.
2BFA76F6 1201014110 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 1201014310 T O errdemon ERROR LOGGING TURNED ON
192AC071 1201013910 T O errdemon ERROR LOGGING TURNED OFF
A6DF45AA 1201013610 I O RMCdaemon The daemon is started.
2BFA76F6 1201013410 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 1201013610 T O errdemon ERROR LOGGING TURNED ON
192AC071 1201013310 T O errdemon ERROR LOGGING TURNED OFF
# errpt -a | more
---------------------------------------------------------------------------
LABEL: RMCD_INFO_0_ST
IDENTIFIER: A6DF45AA
Description
The daemon is started.
Probable Causes
The Resource Monitoring and Control daemon has been started.
User Causes
The startsrc -s ctrmc command has been executed or
the rmcctrl -s command has been executed.
Recommended Actions
Confirm that the daemon should be started.
# errclear 0
# errpt
#
A route will inform a packet which NIC to use and which router to go
to to get to where they have to get.
# hostname
gvicaix15
#
# uname -n
gvicaix15
#
# ifconfig -a
en0:
flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPR
T,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 192.168.240.138 netmask 0xffffff00 broadcast 192.168.240.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0:
flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT
>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
#
Notice there are two interfaces configured for AIX currently. En0,
which has our lab’s 192.168.240.X ip address configured on it, and
Lo0 which has the standard ip of 127.0.0.1 configured on it.
Lo0 is short for loopback. This is not a real NIC interface adapter.
This is an internal kernel virtual NIC device. All it does is provide a
way to troubleshoot the current system’s TCP/IP stack. It’s ip will
always be 127.0.0.1.. This is not just on Unix systems.
# ping 192.168.240.138
PING 192.168.240.138 (192.168.240.138): 56 data bytes
64 bytes from 192.168.240.138: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.240.138: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 192.168.240.138: icmp_seq=2 ttl=255 time=0 ms
64 bytes from 192.168.240.138: icmp_seq=3 ttl=255 time=0 ms
64 bytes from 192.168.240.138: icmp_seq=4 ttl=255 time=0 ms
^C
--- 192.168.240.138 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
#
# ping non_existing_hostname
^C
# ls -l /etc/hosts
-rw-rw-r-- 1 root system 1870 Sep 11 11:26 /etc/hosts
#
# tail /etc/hosts
# indicates the beginning of a comment; characters up to the end of the
# line are not interpreted by routines which search this file. Blank
# lines are allowed.
Open the /etc/hosts file with the vi editor, and populate this file as
follows. Just don’t insert an entry for your server – (This example is
on Gvicaix01, so that server is not included in the file below).
# cat /etc/hosts
…
# ping gvicaix02
PING gvicaix02 (192.168.240.102): 56 data bytes
64 bytes from 192.168.240.102: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.240.102: icmp_seq=1 ttl=255 time=0 ms
^C
--- gvicaix02 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
# ping system2
PING gvicaix02 (192.168.240.102): 56 data bytes
64 bytes from 192.168.240.102: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.240.102: icmp_seq=1 ttl=255 time=0 ms
^C
--- gvicaix02 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
#
# hostname
gvicaix14
# telnet gvicaix15
Trying...
Connected to gvicaix15.
Escape character is '^]'.
telnet (gvicaix15)
AIX Version 5
Copyright IBM Corporation, 1982, 2007.
login: root
….
# hostname
gvicaix15
# who
root pts/0 Sep 11 11:27 (gvicaix14)
# exit
Connection closed.
# hostname
gvicaix14
# hostname
gvicaix14
# ftp gvicaix15
Connected to gvicaix15.
220 gvicaix15 FTP server (Version 4.2 Sat Jun 16 07:20:05 CDT 2007) ready.
Name (gvicaix15:root): root
331 Password required for root.
Password:
230-Last unsuccessful login: Fri Sep 11 11:45:13 2009 on ftp from gvicaix14
230-Last login: Fri Sep 11 11:45:20 2009 on /dev/pts/0 from gvicaix14
230 User root logged in.
ftp> get
(remote-file) /etc/hosts
(local-file) /tmp/hosts
200 PORT command successful.
150 Opening data connection for /etc/hosts (1896 bytes).
226 Transfer complete.
1951 bytes received in 0.000987 seconds (1930 Kbytes/s)
local: /tmp/hosts remote: /etc/hosts
ftp> quit
221 Goodbye.
# ls -l /tmp/hosts
-rw-r--r-- 1 root system 1896 Sep 11 11:45 /tmp/hosts
Now, goto the target system, and verify the file was sent there.
# hostname
gvicaix15
# ls -l /tmp/passwd
-rw-r----- 1 root system 528 Sep 11 11:48 /tmp/passwd
#
# ls -l /etc/resolv.conf
/etc/resolv.conf not found
#
# nslookup www.ibm.com
Server:
^C#
# ls -l /etc/resolv.conf
-rw-r--r-- 1 root system 57 Sep 11 11:56 /etc/resolv.conf
# cat /etc/resolv.conf
domain theatsgroup.com
nameserver 192.168.240.150
# nslookup www.ibm.com
Server: atsicdc.ats.local
Address: 192.168.240.150
Non-authoritative answer:
Name: www.ibm.com.cs186.net
Address: 129.42.58.216
Aliases: www.ibm.com
# netstat -rn
Routing tables
Destination Gateway Flags Refs Use If Exp Groups
- rexec
- rsh
- rlogin
# passwd
Changing password for "root"
root's New password: <ENTER>
Re-enter root's new password: <ENTER>
# logins -p
root 0 system
# passwd
Changing password for "root"
root's New password:
Re-enter root's new password:
# logins -p
#
# lssrc -t telnet
Service Command Arguments Status
telnet /usr/sbin/telnetd telnetd -a active
# stopsrc -t telnet
0513-127 The telnet subserver was stopped successfully.
# lssrc -t telnet
Service Command Arguments Status
#
# telnet gvicaix15
Trying...
telnet: connect: Connection refused
#
# lssrc -t ftp
Service Command Arguments Status
ftp /usr/sbin/ftpd ftpd active
# stopsrc -t ftp
0513-127 The ftp subserver was stopped successfully.
# lssrc -t ftp
Service Command Arguments Status
#
# ftp loopback
ftp: connect: Connection refused
ftp> quit
#
Enable telnet, and ftp once again. The last two labs was just to
demonstrate how to disable those two services.
# lssrc -t telnet
Service Command Arguments Status
# startsrc -t telnet
0513-124 The telnet subserver has been started.
# lssrc -t telnet
Service Command Arguments Status
telnet /usr/sbin/telnetd telnetd -a active
#
# lssrc -t ftp
Service Command Arguments Status
# startsrc -t ftp
0513-124 The ftp subserver has been started.
# lssrc -t ftp
Service Command Arguments Status
ftp /usr/sbin/ftpd ftpd active
#
# smitty chuser
Open another putty session, and note how you can’t login as that
root user any longer remotely. Now, you would be able to login as
root from the system console.
AIX Version 5
Copyright IBM Corporation, 1982, 2007.
login: root
Remote logins are not allowed for this account.
login:
After you set this attribute, rlogin=false, note you will still be able to
su to the root user, from a normal user id. This is typically done to
enforce user accountability.
# smitty chuser
All of these settings, are set in the /etc/security/user config file. user
security
User ID
ADMINISTRATIVE USER?
Primary GROUP
Group SET
ADMINISTRATIVE GROUPS
ROLES
Another user can SU TO USER?
SU GROUPS
HOME directory
Initial PROGRAM
User INFORMATION
EXPIRATION date (MMDDhhmmyy)
Is this user ACCOUNT LOCKED?
ETC…
For this section which deals with Unix file, and directory
permissions, go ahead and create another user called justin2, which
is yourname2:
# mkuser justin2
# id justin2
uid=288(justin2) gid=202(staff)
# passwd justin2
Changing password for "justin2"
justin2's New password:
Enter the new password again:
# pwdadm -c justin2
#
When you create a file or directory in AIX, you user id owns the file,
and your primary group owns it as well.
Log in as the user you created back in the User Management section, and create an
empty file and directory:
$ id
uid=287(justin) gid=202(dba) groups=1(staff)
$ pwd
/home/justin
$ touch file
$ ls -l file
-rw-r--r-- 1 justin dba 0 Nov 05 23:32 file
$ mkdir dir
$ ls -ld dir
drwxr-xr-x 2 justin dba 256 Nov 05 23:32 dir
$
Delete:
$ id
uid=287(justin) gid=202(dba) groups=1(staff)
$ ls -l file
-rw-r--r-- 1 justin dba 0 Nov 05 23:32 file
$ rm file
$ ls -l file
ls: 0653-341 The file file does not exist.
$ ls -ld dir
drwxr-xr-x 2 justin dba 256 Nov 05 23:32 dir
$ rmdir dir
$ ls -ld dir
ls: 0653-341 The file dir does not exist.
Rename/move:
$ touch file
$ mkdir dir
$ ls -l file
-rw-r--r-- 1 justin dba 0 Nov 05 23:55 file
$ ls -ld dir
drwxr-xr-x 2 justin dba 256 Nov 05 23:55 dir
$ mv file file2
$ mv dir dir2
$ ls -l file2
-rw-r--r-- 1 justin dba 0 Nov 05 23:55 file2
$ ls -ld dir2
drwxr-xr-x 2 justin dba 256 Nov 05 23:55 dir2
$
$ cat file
data in file
$
By default all users on the system have read permission to this file.
Also, by default all users who are also members of user justin’s
primary group, dba, the group which owns this file, have read
permission to this file, meaning if you are logged into the system
who is a member of the same group who created a specific file, then
you will have permission to read that file, just as the owner does.
Now, open another putty session to your system, and login as user
justin2, the user you created at the start of this lab section. Once in,
attempt to read the file you just created as user justin in user justin’s
home directory, you will be able to, but attempt to write to this file as
user justin2 who doesn’t own the file, you won’t be able to:
$ id
uid=288(justin2) gid=1(staff)
$ ls -l /home/justin/file
-rw-r--r-- 1 justin dba 13 Nov 06 00:17 /home/justin/file
$ cat /home/justin/file
data in file
Switch user, with the Unix su command, to the root user of the
system and then change the owner of the /home/justin/file file to
justin2. You change the user ownership of a file with the chown
comand:
$ su –
root’s Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# ls -l /home/justin/file
-rw-r--r-- 1 justin dba 13 Nov 06 00:17 /home/justin/file
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# exit
$ id
uid=288(justin2) gid=1(staff)
$ ls -l /home/justin/file
-rw-r--r-- 1 justin2 dba 13 Nov 06 00:17 /home/justin/file
$ cat /home/justin/file
data in file
$ id
uid=287(justin) gid=202(dba) groups=1(staff)
$ touch filea
$ echo "data" > filea
$ cat filea
data
$ ls -l filea
-rw-r--r-- 1 justin dba 5 Nov 06 04:07 filea
$
These ten permission bits are grouped together into three permission bit sets, with three
permissions each: r, w, and x. There is a permission bit set for the following groups of users:
- There are also three basic permissions you can set for each group – r = Read, w = Write,
and x = eXecute.
Directory? Read? Write? Execute? Read? Write? Execute? Read? Write? Execute?
N Y Y N Y N N Y N N
User justin, the owner, has read, and write permission on filea.
Every user on the system who is in the dba group has read permission on filea.
Every user on the system who is not the owner or not in the dba group has read permission
on filea.
Go to the justin2 Putty session, and attempt to read the file, filea:
$ id
uid=288(justin2) gid=1(staff)
$ cat /home/justin/filea
data
$
Go back to the justin Putty session, and attempt to read the file, filea:
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ cat filea
data
$
$ cat filea
cat: 0652-050 Cannot open filea.
$
For the chmod command you use the following parameters to specify which
permission bit set you are setting, and which permission bit you are setting:
- You use the +, plus sign to grant, and the minus -, sign to revoke.
Go to your justin2 window and attempt to read the file. Note, even
though justin2 is not the owner, the third permission bit, other, has
the r – read set, this means justin2 can read the file even though
justin/owner cannot.
$ id
uid=288(justin2) gid=1(staff)
$ ls -l /home/justin/filea
--w-r--r-- 1 justin dba 5 Nov 06 04:07 /home/justin/filea
$ cat /home/justin/filea
data
$
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ ls -l filea
--w-r--r-- 1 justin dba 5 Nov 06 04:07 filea
$ vi filea
"filea" The file access permissions do not allow the specified action.
Note, you as the owner still have write permission to filea, so you can
re-direct output to that file, however since you as the owner do not
have read permission to that file you cannot edit the file with the vi
editor, because you need read permission to edit the file with an
editor which must read it.
AIX Basic System Administration 556
AIX Security
Now go to the justin2 window and cat the file, so you see that even
without read permission you were able to append to this file as user
justin with the shell re-direction of the date command output:
$ id
uid=288(justin2) gid=1(staff)
$ cat /home/justin/filea
data
Sat Nov 6 13:15:04 EDT 2010
$
$ ls -l /home/justin/filea
--w-r--r-- 1 justin dba 34 Nov 06 13:15 /home/justin/filea
$
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ ls -l filea
--w-r--r-- 1 justin dba 34 Nov 06 13:15 filea
$ ls -l filea
--w-r--rw- 1 justin dba 34 Nov 06 13:15 filea
$
Now in the justin2 window you should be able to write/append to this file, because justin2 now
not being the owner or in the dba group has permission to write to this file. This is also
known as “world writable”:
$ id
uid=288(justin2) gid=1(staff)
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ ls -l filea
--w-r--rw- 1 justin dba 63 Nov 06 13:25 filea
$ vi filea
Use ESC+dd three times to delete all three lines within vi. Insert the following
comands/lines to the file. This is a simple shell script:
#!/usr/bin/ksh
echo “Hello”
sleep 3
echo “This is a simple shell script in Unix”
$ ls -l filea
-rw-r--rw- 1 justin dba 82 Nov 06 13:30 filea
$ filea
ksh: filea: 0403-006 Execute permission denied.
$
To be able to run/execute this file go ahead and give the owner of the
file execute permission to it.
$ chmod u+x filea
$ ls -l filea
-rwxr--rw- 1 justin dba 82 Nov 06 13:30 filea
$ filea
Hello
$ id
uid=204(justin2) gid=1(staff)
$ /home/justin/filea
ksh: /home/justin/filea: 0403-006 Execute permission denied.
$
Note, only the owner of a file, or directory can change the permission
of a file or directory. Back in the justin window:
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ chmod o+x filea
$ ls -l filea
-rwxr--rwx 1 justin dba 84 Nov 20 13:17 filea
$
$ id
uid=204(justin2) gid=1(staff)
$ /home/justin/filea
Hello
This is a simple shell script in Unix
$
- Read permission is required if a user wishes to view the contents of a directory, like
with the ls command.
- Write permission is required if a user wishes to create a file or sub-directory in a
directory, or delete a file or sub-directory in a directory.
- Execute permission is required if a user wishes to move to a directory with the cd
command.
$ ls -ld dir2
drwxr-xr-x 2 justin dba 256 Nov 06 14:41 dir2
$ chmod u-r dir2
$ ls -ld dir2
d-wxr-xr-x 2 justin dba 256 Nov 06 14:41 dir2
$
Notice now, how you cannot even view the contents of the directory, let alone cd to it:
$ ls dir2
ls: dir2: The file access permissions do not allow the specified action.
$ ls -l dir2
ls: dir2: The file access permissions do not allow the specified action.
total 0
With the chmod command you can also specify multiple permissions for a permission bit
set at once. So now let’s give read, and execute permission only to the owner back for
the dir2 directory:
$ pwd
/home/justin
$ cd dir2
$ pwd
/home/justin/dir2
$ ls
$ touch filea fileb filec
$ ls -l
total 0
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 filea
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 fileb
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 filec
$
$ cd
$ pwd
/home/justin
$ ls -ld dir2
drwxr-xr-x 2 justin dba 256 Nov 06 14:41 dir2
$ ls dir2
filea fileb filec
$ cd dir2
ksh: dir2: Permission denied.
Now, revoke the write permission from this directory for the owner:
$ ls dir2
filea fileb filec
$ ls -l dir2
total 0
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 filea
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 fileb
-rw-r--r-- 1 justin dba 0 Nov 06 14:41 filec
$ cd dir2
$ pwd
/home/justin/dir2
$ touch filed
touch: 0652-046 Cannot create filed.
$
$ mkdir dir2b
mkdir: 0653-357 Cannot access directory ..
.: The file access permissions do not allow the specified action.
$
$ cd
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ mkdir dirb
$ ls -ld dirb
drwxr-xr-x 2 justin dba 256 Nov 16 12:28 dirb
$
Now you go into that directory, and create a file called: filea, and a sub-directory called dirc:
$ cd dirb
$ pwd
/home/justin/dirb
$ touch filea
$ ls -l filea
-rw-r--r-- 1 justin dba 0 Nov 16 12:29 filea
$ mkdir dirc
$ ls -ld dirc
drwxr-xr-x 2 justin dba 256 Nov 16 13:15 dirc
$
$ cd /home/justin/dirb
$ ls -l filea
-rw-r--r-- 1 justin dba 82 Nov 06 13:30 filea
$ rm filea
rm: Remove filea? y
rm: 0653-609 Cannot remove filea.
The file access permissions do not allow the specified action.
$ rmdir dirc
rmdir: 0653-609 Cannot remove dirc.
The file access permissions do not allow the specified action.
$
$ id
uid=287(justin) gid=2978(dba) groups=1(staff)
$ cd
$ ls -ld dirb
drwxr-xr-x 2 justin dba 256 Nov 16 12:29 dirb
$ id
uid=288(justin2) gid=1(staff)
$ cd /home/justin/dirb
$ ls -l
drwxr-xr-x 2 justin dba 256 Nov 16 12:38 dirb
-rw-r--r-- 1 justin dba 0 Nov 16 12:29 filea
$ rm filea
rm: Remove filea? y
$ ls -l filea
ls: 0653-341 The file filea does not exist.
$ rmdir dirc
$ ls –l dirc
ls: 0653-341 The file dirb does not exist.
You are able to do it, even though you, justin2, do not own this file,
but justin does. You can because as long as the directory has write
permission on it for a permission bit set, anyone in that set can
delete from that directory, even if they do not own the file.
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ ls -ld dirb
drwxr-xrwx 2 justin dba 256 Nov 20 13:25 dirb
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd dirb
$ touch filea
$ mkdir dirc
$ ls -l
total 0
drwxr-xr-x 2 justin dba 256 Nov 20 13:28 dirc
-rw-r--r-- 1 justin dba 0 Nov 20 13:28 filea
$
$ id
uid=204(justin2) gid=1(staff)
$ cd /home/justin/dirb
$ ls -l
total 0
drwxr-xr-x 2 justin dba 256 Nov 20 13:28 dirc
-rw-r--r-- 1 justin dba 0 Nov 20 13:28 filea
$ rmdir dirc
rmdir: 0653-609 Cannot remove dirc.
Operation not permitted.
$ rm filea
rm: Remove filea? y
rm: 0653-609 Cannot remove filea.
Operation not permitted.
$ touch fileb
$ mkdir dird
$ ls -l
total 0
drwxr-xr-x 2 justin dba 256 Nov 20 13:28 dirc
drwxr-xr-x 2 justin2 staff 256 Nov 20 13:29 dird
-rw-r--r-- 1 justin dba 0 Nov 20 13:28 filea
-rw-r--r-- 1 justin2 staff 0 Nov 20 13:29 fileb
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd
$ cd dirb
$ ls -l
total 0
drwxr-xr-x 2 justin dba 256 Nov 20 13:28 dirc
drwxr-xr-x 2 justin2 staff 256 Nov 20 13:29 dird
-rw-r--r-- 1 justin dba 0 Nov 20 13:28 filea
-rw-r--r-- 1 justin2 staff 0 Nov 20 13:29 fileb
$ rm fileb
rm: Remove fileb? y
$ rmdir dird
rm:dir: A file or directory in the path name does not exist.
rm: 0653-603 Cannot remove directory dird.
$ rmdir dird
$ ls -l
total 0
drwxr-xr-x 2 justin dba 256 Nov 20 13:28 dirc
-rw-r--r-- 1 justin dba 0 Nov 20 13:28 filea
$
ANSWER!!!
To correct this you use a user who will never use this directory, or who is the
project manager, of the project which is using this common directory/repository
for multiple user’s files, and directories. We can see an example of this, by
default, on all already installed AIX system. This is seen in a filesystem,
directory called /tmp. This filesystem, directory is created automatically when
the operating system is installed, and look at it’s permissions:
$ ls -ld /tmp
drwxrwxrwt 7 bin bin 4096 Nov 20 13:37 /tmp
$
As you can see this filesystem, directory has the sticky bit set.
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd /tmp
$ pwd
/tmp
$ touch filea
$ mkdir dira
$ ls -l filea
-rw-r--r-- 1 justin dba 0 Nov 20 13:39 filea
$ ls -ld dira
drwxr-xr-x 2 justin dba 256 Nov 20 13:39 dira
$
$ id
uid=204(justin2) gid=1(staff)
$ cd /tmp
$ pwd
/tmp
$ touch fileb
$ mkdir dirb
$ ls -l fileb
-rw-r--r-- 1 justin2 staff 0 Nov 20 13:41 fileb
$ ls -ld dirb
drwxr-xr-x 2 justin2 staff 256 Nov 20 13:41 dirb
$
While logged in as justin2, attempt to delete filea and dira created by user justin:
$ rm filea
rm: Remove filea? y
rm: 0653-609 Cannot remove filea.
Operation not permitted.
$ rmdir dira
rmdir: 0653-609 Cannot remove dira.
Operation not permitted.
$
Now as user justin attempt to delete the file, and directory you
created as user justin2:
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd /tmp
$ pwd
/tmp
$ rm fileb
rm: Remove fileb? y
rm: 0653-609 Cannot remove fileb.
Operation not permitted.
$ rmdir dirb
rmdir: 0653-609 Cannot remove dirb.
Operation not permitted.
$
As user justin delete the file and directory you, justin, created:
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd /tmp
$ rm filea
$ rmdir dira
$ ls -l filea
ls: 0653-341 The file filea does not exist.
$ ls -ld dira
ls: 0653-341 The file dira does not exist.
$
$ pwd
/home/justin
$ ls -ld dir2
dr-xr-xr-x 2 justin dba 256 Nov 06 14:41 dir2
Above we simultaneously revoked the read, write and execute permissions from
the group and others/world permission bit set for this directory.
Now all permission sets owner, group, and other/world have read write access
to the file.
$ chmod a= filea
$ ls -l filea
---------- 1 justin staff 82 Nov 06 13:30 filea
$
The chmod command has the following numerical representation for file
permissions in Unix:
Each permission bit set gets one number, three total for each permission bit set:
owner, group, and other/world. See upcoming examples for an elaboration on
this statement.
$ ls -l filea
--w------- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
------x--- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
------x--- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
-----w---- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
----r----- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
---------x 1 justin staff 82 Nov 06 13:30 filea
Example, first clear out all permission for filea, which would be cleared using 0,
since 0 means no permissions, and we do that for all three permission bit sets:
$ ls -l filea
-------r-- 1 justin staff 82 Nov 06 13:30 filea
Now in this example we want the owner of filea to have read(4) permission, the group to
have execute(1) permission, and others/world to have write(2) permission:
$ chmod 412 filea
$ ls -l filea
-r----x-w- 1 justin staff 82 Nov 06 13:30 filea
$
Lets say you wanted each permission group set to have multiple
permission, for instance, you wanted the owner of the file to have
read(4), write(2), and execute(1) permission:
How do you set multiple permission bits to a permission set with the chmod
command using numbers?
ANYONE???
AIX Basic System Administration 591
AIX Security
You sum all of the desired permission bit numerical values up and
then just apply that number to the command.
Owner – 4 + 2 + 1 = 7
Group – 0 + 0 + 0 = 0
Other/world – 0 + 0 + 0 = 0
Directory? Read? Write? Execute? Read? Write? Execute? Read? Write? Execute?
4 2 1 0 0 0 0 0 0
$ ls -l filea
---------- 1 justin staff 82 Nov 06 13:30 filea
To understand how those numbers: 1 for execute, 2 for write, and 4 for read, are
assigned, we must think binary – (1’s and 0’s).
To illustrate and example let us say that you wanted a file to have the following
permission set:
That is owner: read, write, execute. Group: read, execute, and Others/world: read,
and write.
To determine which number represents which permission you use a binary chart.
You put a 1 under each permission bit set, and a 0 under each – (hypen), which
means no permission bit set here.
Remember our desired permission set for a file: -rwx r-x rw-
Directory? Read? Write? Execute? Read? Write? Execute? Read? Write? Execute?
0 1 1 1 1 0 1 1 1 0
Owner: -rwx
4 2 1
1 1 1
Group: r-x
4 2 1
1 0 1
4 2 1
1 1 0
Q.E.D.
$ chmod 000 filea
$ ls -l filea
---------- 1 justin staff 82 Nov 06 13:30 filea
$ ls -l filea
-rwxr--rw- 1 justin dba 82 Nov 06 13:30 filea
$
Notice how the second permission bit set does not have an x, so that means
anyone in the same group cannot run this shell script, so let’s give the group
permission bit execute permission:
$ chmod g+x filea
$ ls -l filea
-rwxr-xrw- 1 justin dba 82 Nov 06 13:30 filea
$
$ /home/justin/filea
ksh: /home/justin/filea: 0403-006 Execute permission denied.
$
This failed because we gave the group execute permission, and user justin2 is not in the
dba group, which is the owner group of the /home/justin/filea shell script. To correct this
we can either put user justin2 into the dba group, change the world/other execute
permission, or change the shell script’s group ownership to staff, so justin2 can execute
it. We do this by becoming the root user, and then using the Unix chgrp command:
$ su -
root's Password:
# id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
# ls -l /home/justin/filea
-rwxr-xrw- 1 justin dba 82 Nov 06 13:30 /home/justin/filea
# ls -l /home/justin/filea
-rwxr-xrw- 1 justin staff 82 Nov 06 13:30 /home/justin/filea
Type in exit, to get back to user justin2, and then attempt to execute that shell
script again. Now the execution attempt will succeed.
# exit
$ id
uid=288(justin2) gid=1(staff)
$ ls -l /home/justin/filea
-rwxr-xrw- 1 justin staff 82 Nov 06 13:30 /home/justin/filea
$ /home/justin/filea
Hello
The umask determines what the default permissions of a file and/or directory
will be in Unix.
When you create a file, it’s default permission is rw for the owner, r only for
the group, and r only for everyone else/world.
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ cd
$ pwd
/home/justin
$ touch filed
$ ls -l filed
-rw-r--r-- 1 justin dba 0 Nov 20 13:53 filed
$
$ mkdir dird
$ ls -ld dird
drwxr-xr-x 2 justin dba 256 Nov 20 13:55 dird
$
Check the current umask value. The following umask value is the default for all
users:
$ umask
022
$
$ umask u=r,g=w,o=rw
$ umask
0351
$ umask -S
u=r,g=w,o=rw
$ touch filee
$ ls -l filee
-r---w-rw- 1 justin dba 0 Nov 20 14:22 filee
$ mkdir dire
$ ls -ld dire
dr---w-rw- 2 justin dba 256 Nov 20 14:22 dire
$
$ umask
0351
Go to the user justin2’s window and check the umask. Notice how it
is the default Unix umask value, 022. That is because the umask
setting is per user shell session:
$ id
uid=204(justin2) gid=1(staff)
$ umask
022
$ touch filee
$ ls -l filee
-rw-r--r-- 1 justin2 staff 0 Nov 20 14:28 filee
$ mkdir dire
$ ls -ld dire
drwxr-xr-x 2 justin2 staff 256 Nov 20 14:28 dire
$
$ umask
022
$
The umask command works with numbers just as the chmod command does, as
we have seen earlier, but the difference is the umask command actually
subtracts the numbers from 7 – Every permission set (rwx).
Default umask:
Group: 7(rwx) – 2 = 5
4(r)=on, w(2)=off, x(1)=on – x for directories only.
Other: 7(rwx) – 2 = 5
4(r)=on, w(2)=off, x(1)=on – x for directories only.
$ id
uid=203(justin) gid=204(dba) groups=1(staff)
$ umask
0351
$
Other: 7(rwx) – 1 = 6
4(r)=on, w(2)=on, x(1)=off – x for directories only.
$ ls -l filee
-r---w-rw- 1 justin dba 0 Nov 20 14:22 filee
$ ls -ld dire
dr---w-rw- 2 justin dba 256 Nov 20 14:22 dire
$
Directory? Read? Write? Execute? Read? Write? Execute? Read? Write? Execute?
4 0 0 0 2 0 4 2 0
U=4+0+0=4+3=7
G=0+2+0=2+5=7
O=4+2+0=6+1=7
AIX Basic System Administration 608
AIX Security
One more example, set the umask to 552 – 7-5 = 2(w), 7-5 = 2(w),
7-2 = 5(rx):
$ umask 552
$ umask
0552
$ umask -S
u=w,g=w,o=rx
$ touch filef
$ ls -l filef
--w--w-r-- 1 justin dba 0 Nov 20 15:20 filef
$ mkdir dirf
$ ls -ld dirf
d-w--w-r-x 2 justin dba 256 Nov 20 15:20 dirf
$
The execute permission is never set for a file by default, and it is set
for a directory.
An AIX Technology Level, formally known as Maintenance Levels, provide support for new features
and hardware. They are released twice a year, and are supported for two years by IBM. Technology
Levels are cumulative, and also contain past Service packs.
An AIX Service Pack provides fixes to AIX operating system problems. It is used to address problems
between Technology Levels. Service packs are cumulative.
APARs – Authorized Program Analysis Report. Is a report of an operating system problem either
discovered by customers in the field, or by IBM development themselves. APARs are wrapped up in
Service packs, which are wrapped up in Technology Levels, which are ultimately wrapped in up newer
AIX versions, and levels.
PTFs = Program Temporary Fixes are what you download between service packs to fix known
problems with the operating system which may affect a large number of customers – i.e. problem is
with base code of AIX.
e-Fixes, are usually developed by IBM for a particular customer. They usually don’t address common
problems. If they do, they are usually emergency fixes which can’t wait for service packs, like security
advisories, etc..
The AIX installp command is used to install IBM, and IBM supported software format, LPP, in AIX.
Goto a directory where I have staged some software, for this class. It’s in a standard
location for staging software on AIX systems at /usr/sys/inst.images
# cd /usr/sys/inst.images
# smitty installp
Once the preview goes through ok, then press <F3> to move back
to the previous smit menu.
# lppchk -v
# lslpp -l tivoli.tsm.devices.aix5.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
tivoli.tsm.devices.aix5.rte
5.3.0.0 COMMITTED IBM Tivoli Storage Manager
Device Support runtime
Path: /etc/objrepos
tivoli.tsm.devices.aix5.rte
5.3.0.0 COMMITTED IBM Tivoli Storage Manager
Device Support runtime
#
If you wanted to learn the date, and time a fileset was installed, use
the –h option to the lslpp command.
# date
Sat Sep 12 16:32:22 CDT 2009
# lslpp -h tivoli.tsm.devices.aix5.rte
Fileset Level Action Status Date Time
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
tivoli.tsm.devices.aix5.rte
5.3.0.0 COMMIT COMPLETE 09/12/09 16:29:58
Path: /etc/objrepos
tivoli.tsm.devices.aix5.rte
5.3.0.0 COMMIT COMPLETE 09/12/09 16:29:59
#
Note, if there was a problem with the upgrade and you have to go back
to the base, then you would perform a REJECT of the 5.3.3.2 level,
to revert back to the 5.3.0.0 base level.
Now, an lslpp command will verify that the fileset has been deinstalled.
# installp -C
# lslpp -l tivoli.tsm.devices.aix5.rte
lslpp: Fileset tivoli.tsm.devices.aix5.rte not installed.
#
1. Disk I/O
2. Memory – Virtual memory
3. RAS – Reliability, Availability, Serviceability.
4. Networking
5. NFS
6. Processor/CPU
# sar 1 3
# netstat 1
input (en0) output input (Total) output
packets errs packets errs colls packets errs packets errs colls
3382 0 1635 0 0 4782 0 3035 0 0
2 0 1 0 0 2 0 1 0 0
1 0 1 0 0 1 0 1 0 0
2 0 2 0 0 2 0 2 0 0
^C#
# svmon
size inuse free pin virtual mmode
memory 262144 220832 41312 65822 168666 Ded
pg space 131072 1325
# topas
?
# ioo -a
aio_active = 0
aio_maxreqs = 65536
aio_maxservers = 30
aio_minservers = 3
aio_server_inactivity = 300
j2_atimeUpdateSymlink = 0
j2_dynamicBufferPreallocation = 16
j2_inodeCacheSize = 400
j2_maxPageReadAhead = 128
j2_maxRandomWrite = 0
j2_metadataCacheSize = 400
j2_minPageReadAhead = 2
j2_nPagesPerWriteBehindCluster = 32
j2_nRandomCluster = 0
j2_syncPageCount = 0
j2_syncPageLimit = 16
lvm_bufcnt = 9
maxpgahead = 8
maxrandwrt = 0
numclust = 1
numfsbufs = 196
pd_npages = 65536
posix_aio_active = 0
…
# schedo -a
affinity_lim = 7
big_tick_size = 1
ded_cpu_donate_thresh = 80
fixed_pri_global = 0
force_grq = 0
maxspin = 16384
pacefork = 10
proc_disk_stats = 1
sched_D = 16
sched_R = 16
tb_balance_S0 = 2
tb_balance_S1 = 2
tb_threshold = 100
timeslice = 1
vpm_fold_policy = 1
vpm_xvcpus = 0
#
# no -a
arpqsize = 12
arpt_killc = 20
arptab_bsiz = 7
arptab_nb = 149
bcastping = 0
clean_partial_conns = 0
delayack = 0
delayackports = {}
dgd_packets_lost = 3
dgd_ping_time = 5
dgd_retry_time = 5
directed_broadcast = 0
fasttimo = 200
icmp6_errmsg_rate = 10
icmpaddressmask = 0
ie5_old_multicast_mapping = 0
ifsize = 256
igmpv2_deliver = 0
ip6_defttl = 64
ip6_prune = 1
ip6forwarding = 0
ip6srcrouteforward = 1
# nfso -a
client_delegation = 1
nfs_max_read_size = 65536
nfs_max_write_size = 65536
nfs_rfc1323 = 1
nfs_securenfs_authtimeout = 0
nfs_server_base_priority = 0
nfs_server_clread = 1
nfs_use_reserved_ports = 0
nfs_v3_server_readdirplus = 1
nfs_v4_fail_over_timeout = 0
portcheck = 0
server_delegation = 1
utf8_validation = 1
#
# raso -a
biostat = 0
kern_heap_noexec = 0
kernel_noexec = 1
mbuf_heap_noexec = 0
mtrc_commonbufsize = 547
mtrc_enabled = 1
mtrc_rarebufsize = 27
tprof_cyc_mult = 1
tprof_evt_mult = 1
tprof_evt_system = 1
tprof_inst_threshold = 1000
#
# shutdown -Fr
SHUTDOWN PROGRAM
Sat Sep 5 17:07:48 EDT 2009
Wait for 'Rebooting...' before stopping.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons
0513-004 The Subsystem or Group, nfsd, is currently inoperative.
0513-044 The biod Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-004 The Subsystem or Group, gssd, is currently inoperative.
0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
Notice how it reverted back to it’s default value 1088, rather than keep the modified
value of 2000 persistent.
Change it again:
# vmo -o maxfree=2000
Setting maxfree to 2000
# vmo -L maxfree
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
maxfree 2000 1088 1088 16 209715 4KB pages D
minfree
memory_frames
--------------------------------------------------------------------------------
#
As you can see it says it appended this value to the nextboot file. The file it is
referring to is a file in the directory /etc/tunables. There are three configuration
files in that directory which allow you to set these performance parameters to
non-default values upon all subsequent system reboots.
# cd /etc/tunables
# pwd
/etc/tunables
# ls -l
total 56
-rw-rw-r-- 1 root system 18950 Dec 03 10:06 lastboot
-rw-r--r-- 1 root system 433 Dec 03 10:06 lastboot.log
-rw-r--r-- 1 root system 437 Dec 03 10:10 nextboot
#
# tail nextboot
# COPYRIGHT International Business Machines Corp. 2002
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# IBM_PROLOG_END_TAG
vmo:
maxfree = "2000"
# shutdown -Fr
SHUTDOWN PROGRAM
Sat Sep 5 17:07:48 EDT 2009
Wait for 'Rebooting...' before stopping.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons
0513-004 The Subsystem or Group, nfsd, is currently inoperative.
0513-044 The biod Subsystem was requested to stop.
0513-044 The rpc.lockd Subsystem was requested to stop.
0513-044 The rpc.statd Subsystem was requested to stop.
0513-004 The Subsystem or Group, gssd, is currently inoperative.
0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative.
# uptime
10:16AM up 1 min, 1 user, load average: 1.47, 0.35, 0.12
# vmo -o maxfree
maxfree = 2000
# cd /etc/tunables
# pwd
/etc/tunables
# ls -l
total 56
-rw-rw-r-- 1 root system 18919 Dec 03 10:15 lastboot
-rw-r--r-- 1 root system 457 Dec 03 10:15 lastboot.log
-rw-r--r-- 1 root system 437 Dec 03 10:10 nextboot
#
- The lastboot file provides a backup of how your tuning performance parameters
looked prior to your change.
- The lastboot.log file provides a log of what was changed from a performance tuning
parameter perspective during last system reboot.
AIX Basic System Administration 653
AIX System Performance Tuning
There are other performance parameters known as restricted tunables, they
should only be tuned under the instruction of IBM AIX technical support.
# vmo -aF
ame_cpus_per_pool = n/a
ame_maxfree_mem = n/a
ame_min_ucpool_size = n/a
ame_minfree_mem = n/a
ams_loan_policy = n/a
enhanced_affinity_affin_time = 1
enhanced_affinity_vmpool_limit = 10
force_relalias_lite = 0
kernel_heap_psize = 65536
lgpg_regions = 0
lgpg_size = 0
….
##Restricted tunables
ame_sys_memview = n/a
cpu_scale_memp = 8
data_stagger_interval = 161
defps = 1
enhanced_affinity_attach_limit = 100
enhanced_affinity_balance = 100
enhanced_affinity_private = 40
enhanced_memory_affinity = 0
esid_allocator = 0
…
##Restricted tunables
aio_fastpath = 1
aio_fsfastpath = 1
aio_kprocprio = 39
aio_multitidsusp = 1
aio_sample_rate = 5
aio_samples_per_cycle = 6
j2_maxUsableMaxTransfer = 512
j2_nBufferPerPagerDevice = 512
…
# schedo -aF
affinity_lim = 7
big_tick_size = 1
ded_cpu_donate_thresh = 80
fixed_pri_global = 0
force_grq = 0
maxspin = 16384
pacefork = 10
proc_disk_stats = 1
sched_D = 16
sched_R = 16
tb_balance_S0 = 2
tb_balance_S1 = 2
tb_threshold = 100
timeslice = 1
vpm_fold_policy = 1
vpm_xvcpus = 0
##Restricted tunables
%usDelta = 100
allowMCMmigrate = 0
clk_transition = 12
fast_locks = n/a
hotlocks_enable = 0
idle_migration_barrier = 4
intr_stealing = 0
…
##Restricted tunables
extendednetstats = 0
inet_stack_size = 16
net_malloc_police = 16384
netm_affinity = 0
pseintrstack = 24576
use_isno = 1
…
# raso -aF
biostat = 0
kern_heap_noexec = 0
kernel_noexec = 1
mbuf_heap_noexec = 0
mtrc_commonbufsize = 547
mtrc_enabled = 1
mtrc_rarebufsize = 27
tprof_cyc_mult = 1
tprof_evt_mult = 1
tprof_evt_system = 1
tprof_inst_threshold = 1000
##Restricted tunables
recovery_action = 1
recovery_average_threshold = 5
recovery_debugger = 0
recovery_framework = 0
#
# smitty tuning
<F10>
AIX Basic System Administration 662
AIX System Performance Tuning
To get to the smit interface of the restricted tunable parameters:
# smitty tuningDev
Hardware virtualization
IBM POWER systems support LPARs, and each can support the following
operating systems on the same physical IBM POWER system:
- Resources such as PCI adapters, CPUs and memory are allocated on a per
LPAR basis.
Every LPAR on the system will have the same serial number,
because it is the same physical system.
When a system first ships from IBM, by default, it’s a standalone system. The
Power Hypervisor is active and there is only one LPAR which is named after
the serial number of the system itself, and that LPAR owns every resource on
the system, i.e. memory, CPUs, and I/O slots. This is known as a full system
partition.
When a POWER system does not have an HMC attached to it, that
system is known as a standalone system.
* There are exceptions to this statement. Please refer to the IVM – Integrated Virtualization Manager section for details.
You can connect two HMCs to one managed system for redundancy, by
connecting the second HMC to the second integrated/on-board port
labeled – HMC2.
The HMC can connect to the managed system via a private, or public
network connection.
There are currently two HMC models which are shipped with IBM
POWER systems, when ordered. A deskside, and rack mountable
system:
7042-CR4
7042-CR5
7042-CR6
7042-C06
7042-C07
7042-C08
The IBM factory default login credentials of the HMC are as follows:
Login: hscroot
Password: abc1234
There is very, very limited root access to the Linux operating system on the
HMC. IBM technical support will have to assist you in gaining “real” Linux root
access, if needed.
Each edition offers specific limitations, or additional features, as relative to one another.
After you staisfy at least the minimum 1/10th processor/CPU requirement for an
LPAR, you can then go even more granular in processor/CPU slicing, and carve
it up in 1/100th units.
Lower end systems must purchase at least the PowerVM Express Edition to
utilize the IVM.
The IVM is not supported on POWER systems – 770, 780, and 795. They must
have an HMC for LPARs.
Encrypted Filesystems.
Trusted AIX.
Performance tools.
IBM Education:
1-800-IBM-TEACH
IBM Redbooks:
http://www.redbooks.ibm.com
http://www.ibm.com/systems/p
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp