•/etc/security/limitsContains all
the ulimits, or users' system resource limitations
•/etc/security/passwdContains the AIX
user's password information
•/etc/security/userContains
the most important settings
•/usr/lib/security/mkuser.defaultContains
values used when creating user through mkuser
# getconf LOGIN_NAME_MAXTo verify the setting in AIX
5.3 and later
# lsattr -El sys0To
verify the setting in AIX 5.3 and later
# chdev -l sys0 -a max_logname=129To change the
value of sys0
# mkuser xanderTo
create a user with default settings
# finger xanderGives
the short information of user
# chuser core=1048576 xanderTo change
the User attribute
# chsh xanderTo
change the user login shell
# chfn xanderTo
change GECOS information
# lsuser -f xanderList
the user in stanza format
# passwd xanderTo
set or change password of user
# passwd -f xanderTo
change user GECOS using passwd command
# passwd -s xanderTo
change the user SHELL using passwd
# rmuser xanderRemove
the user
# rmuser –p xanderTo
remove fully user information
•/etc/groupContains
the basics of a group
•/etc/security/groupContains
extended attributes to the specified group
# mkgroup atctestTo
create a group
# mkgroup -a atcadminTo create an admin
group
# mkgroup adms=xander xangroupTo create a
group and add Xander as the administrator of the group
# chgroup id=204 users=xander,atc,amdc xangroupChange the group's GID and add users
# chgrpmem Another
way to modify a group's members is with chgrpmem
# chgrpmem xangroupList the group
information
# chgrpmem -m - atc xangroupRemove a
user from a group
# lsgroup xangroupList
the info of group
# lsgroup -f xangroupList info of
group in stanza fromat
# rmgroup atctestRemove
the group
•/etc/security/environContains the
environment attributes for users
•/etc/security/lastlogContains the
last login attributes for users
•/usr/lib/security/mkuser.sysCustomizes
new user accounts
•/etc/security/login.cfgContains system
default login parameters
•/etc/utmpContains
a record of users logged into the system
•/var/adm/wtmpContains
connect-time accounting records
•/etc/security/failedlogin Records all failed login
attempts
•/etc/motdContains
the message to be displayed every time user login
•/etc/environment Specifies
the basic environment for all processes.
•/etc/profile Specifies
additional environment settings for all users.
•$HOME/.profile Specifies
environment settings for a specific user.
# ps -efTo
display all processes
# ps -f -l -ujimTo
list processes owned by specific users
# ps -MTo
list all the 64-bit processes
# kill 1095To
stop a given process
# kill -kill 2098 1569To stop
several processes that ignore the default signal
# kill -kill 0To
stop all of your processes and log yourself off
# kill -9 -1To
stop all processes that you own
# fuser -u /etc/filesystemsList a process numbers
and user login names of processes
# fuser -k -x -u -c /dev/hd1To
terminate all of the processes using a given file system
# fuser -kxuc /homeTo terminate
all of the processes using a given file system
# fuser -d /usrTo
list all processes that are using a file that has been deleted from a given
file system
# fuser -xc /tmpList
open references within a specified file system
# find /home -type d -exec fuser -u {} \;Process is using a
directory within the file system as its current
working directory
# topas -i5 -n0 -p10To view the
top 10 processes
The svmon command captures and analyzes a snapshot
of virtual memory
The svmon command creates nine types of reports
# svmon -GGlobal
Report
# svmon -UUser
Report
# svmon -CCommand
Report
# svmon -WWorkload
Management Class Report
# svmon -TWorkload
Management Tier Report
# svmon -PProcess
Report
# svmon -SSegment
Report
# svmon -DDetailed
Report
# svmon -FFramed
Report
# aclget statusTo
display the access control information of status file
# aclput -i acldefs statusTo set the access control information
of status from acldefs
# aclget plans | aclput statusTo set
the access control information of status from plans
# acledit plansTo
edit the access control information of the plans
#chown -R john:build /tmp/srcTo
change the owner & group of all files in the directory
# chmod 644 textTo
use the absolute mode
#chgrp -R staff proposalsChange the group
ownership of the directory named proposals
of dir stuff
# at -f filename -t CCYYMMDDhhmmSS IncrementSubmit a job to be run at a later
time
# at now -f appl/program > /dev/null
2>&1To start at job
now
# atqList
the at jobs
# at -r root.1134169200.aRemove the at job
# ls /var/spool/cron/atjobsLocation of at jobs
# ls -l /var/spool/cron/crontabsLocation
of cron jobs
# crontab -lList
the all cron jobs
# crontab -eTo
edit crontab file
# crontab -v usernameLists the status
of the user's cron jobs
# crontab -r Remove
the crontab file
# crontab ~deploy/deploy.scheduleRuns the
crontab file under user deploy
•/var/adm/cron/logThe
cron daemon logs file
•/var/adm/cron/cron.denyDeny cron access to
user for cron schedular
•/var/adm/cron/cron.allowAllow cron access to
user for cron schedular
•/var/adm/cron/at.allowAllow cron access
to user for at schedular
•/var/adm/cron/at.denyDeny cron access
to user for at schedular
# telinitDirects
the actions of the init process
# telinit MGoes
into the maintainance mode
# telinit q Tell
the init command to reprocess the /etc/inittab
Normally, you do not need to restart srcmstr.
If the srcmstr daemon terminates abnormally, the respawn action specified in
the /etc/inittab restarts the srcmstrdaemon.
A command is a request to perform an operation or
run a program. A program or command that is actually running on the computer is
referred to as a process.
The common types of processes are:
Foreground and background processes
Processes that require a user to start them or to
interact with them are called foreground processes. Processes that are run
independently of a user are referred to as background processes. Programs and
commands run as foreground processes by default.
Daemon processes
Daemons are processes that run unattended. They
are constantly in the background and are available at all times. Daemons are
usually started when the system starts, and they run until the system stops. A
daemon process typically performs system services and is available at all times
to more than one task or user. Daemon processes are started by the root user or
root shell and can be stopped only by the root user. For example, the qdaemon
process provides access to system resources such as printers. Another common
daemon is the sendmail daemon.
Zombie processes
A zombie process is a dead process that is no
longer executing but is still recognized in the process table (in other words,
it has a PID number). It has no other system space allocated to it. Zombie
processes have been killed or have exited and continue to exist in the process
table until the parent process dies or the system is shut down and restarted.
Zombie processes display as <defunct> when listed by the ps command.
Ctrl-CTo
intrrupt the process
Ctrl-ZTo
stop process
# fg 589934To
bring the process in to the foreground
# find / -type f > dir.paths &Run
the find command in the background
# nohup find / -type f &To run
the find command and leave it running after you log off in Bg
0 Represents standard input (stdin)<
1 Represents standard output (stdout)> or >> (append)
2 Represents standard error (stderr)2> or 2>> (append)
2>&1Redirects stderr to stdout.
1>&2Redirects stdout to stderr
Performance Monitoring
# nice -10 fooAdd
10 to current nice value (Lower Priority)
# nice -n 10 fooAdd
10 to current nice value (Lower Priority)
# nice - -10 foo Subtract
10 from current value (Higher Priority)
# nice -n -10 foo Subtract
10 from current value (Higher Priority)
# renice -10 –p 563Add 10 to default nice
value (Lower Priority)
# renice –n 10 –p 563Add 10 to current nice value
(Lower Priority)
# renice - -10 –p 563Subtract 10 from default
nice value (Higher Priority)
# renice –n -10 –p 563Subtract 10 from current nice
value (Higher Priority)
# ps –eklLong listing of kernel
processes with priority
# ps –L 483445 –lIt
list the child the processes of parent process
# ps –kmo THREAD –p 16396It list the threads of particular
processes
# schedoTo
change the CPU usage priority decay rate
Context Switch : A
context switch is when one thread is taken off a CPU and another thread is
despatched onto the same CPU.
User
Mode : User mode is when
thread is executing its own application code or shared library code. Time spent
in user mode is reflected as %user time in output of commands such as vmstat,
topas, iostat, sar.
System Mode : System
Mode is when the CPU is executing code in the kernel. CPU time spent in kernel
mode is reflected as system time in output of vmstat, topas, iostat, sar
commands. Context switch time, system calls, device interrupts, NFS I/O, and
anything else in the kernel is considered as system time.
# time It
show the elapsed time in system and user mode
# vmstat 5 3
# vmstat -f To
display fork statistics
# vmstat -s To
display count of various events
# sar –P ALL 5 1All
CPU related usage
# sar –q 5 3Queue
details
# ps auxLocating
the dominant processes
# tprof –x sleep 60Reports
processor usages
# lparstat 2 3 System
wide CPU report
# sar –P ALL 2 2 Viewing
CPU statistic with SMT
# sar -d 1 2 Disk
I/O statistic
# smtctlTo
check SMT is enabled or not
# smtctl –m on –w nowTern on SMT
immediately
# smtctl –m on –w bootTern on SMT at next
reboot
# bindprocessor –qTo
check logical CPU
# iostatI/O
device statistics
# iostat -d hdisk2 2 Continuous
disk report
# netstat network
statistic
# netstat -rn Network
routing table
# netstat -rs Network
routing statistic
CPU bound A system is said to be CPU-bound if the total system (sy) and user
(us) CPU usage is approaching 100 percent. This would imply that idle time and
wait time for CPU are approaching zero.
Memory bound A system is memory-bound if some virtual memory is forced out to
disk, meaning the system is waiting on a relatively slow disk instead of
relatively fast RAM. This is indicated by a non-zero value in the page-in (pi)
and page-out (po) values.
Paging
rate is the
average number of page-ins and page-outs per CPU cycle.
Idle
time calculation:
Total CPU
Idle Time % = wait % + Idle Time %
Ex:
Average CPU
Idle Time percentage = ((99+1) + (97+2) + (95+4) + (99+1))/4 = 99.5%
Could you please describe the booting process of AIX ? this is the frequest question they have been asking for each interview and I used to say if you need all theory I would not be able to tell you but what i knew is .......
So finally decided to write a small post just for my reference, If you feel it's usfull use it :).
BOOT Process :
PHASE-I : ------------ unix4you # BIST - built in self test unix4you # POST - Power on self test unix4you # call rc.boot 1 script unix4you # Locate the boot LV unix4you # restbase command will be called to copy the partial ODM from BLV to RAMFS. unix4you # cfgmgr -f ( to configured the base devices) unix4you # bootinfo -b - to derimine the last boot disk unix4you # Locate the Boot disk
PHASE-II : ------------ unix4you # call rc.boot 2 script unix4you # ipl_varyon command will varyon the rootvg ( If fails LED 552,554,556 ) unix4you # fsck -f for root filesystem hd4. unix4you # Root filesystem will be mounted temparorily as /mnt in RAMFS. (if fails LED 557) unix4you # /usr will be verified using fsck -f and mounted. (If fails LED 518) unix4you # /var will be verified using fsck -f and mounted. copy core command will check for the previous dump in /dev/hd6 and the dump will be copied in to the /var/adm/ras. unix4you # Paging /dev/hd6 will be avtivated unix4you # mergedev process will be called and all /dev filesystems will be copied from RAMFS to disk. unix4you # ODM will be copied to the disk. unix4you # root filesystem will be mounted in rootvg. unix4you # /var /usr will be mounted on their ordinary mount points. unix4you # these boot messages will be copied in to the alog.
PHASE-III : ------------ unix4you # Rootvg is activated. unix4you # /etc/init will call the rc.boot file with argument 3 unix4you # /tmp will be mounted. unix4you # syncvg command will be invoked and the rootvg get synced. unix4you # cfgmgr is called with option -p2. if the system booted service mode then option -p3 unix4you # console is configured using cfgcon ( log file : /var/adm/ras/conslog) unix4you # savebase command will sync the ODM in BLV. unix4you # syncd daemon & errdemon started. unix4you # LED is turned off. unix4you # The execution of rc.boot is now completed. init will continue processing the next commands in /etc/inittab.