AIX for the System Administrator

AIX for the System Administrator

Glossary
Boot Process
Disks
Dump Space
Filesystems
Kernel
Networking
Paging and Swap Space
Password/Account Reset
Processes
Software Installation and Patches
System Information
System Monitoring
Tapeutil
Terminal Configuration
Troubleshooting --&gt see aix-troubleshooting.html
Users

Glossary

Term
Definition
Advanced Interactive Executive (AIX)
RS/6000 Unix Operating System
Authorized Program Analysis Report (APAR)
Used to identify a fix for a PMR.
Base Operating System (BOS)

Fileset

FragmentsAllows disk space to be divided into units that are smaller than the size of a logical block
High Availability Cluster Multiprocessor  ?? (HACMP)
AIX Clustering
I-Node128 bit structure that contains information about the file or directory such  as ownership, permissions, file type, number of links to the file, etc.
Logical BlockDisk block that contains file or directory data
Maintenance Level (ML)
Service updates necessary to upgrade the BOS to the current release level
ODN

Page
4KB unit of virtual memory than can be transferred between physical ram and disk paging space
Paging Space
Special logical volume used for holding inactive data that has been temporarily transferred out of physical ram.
Phsysical Volume ID (PVID)
Unique id that consists of a hash of the CPUID and the date.
Problem Management Record (PMR)
Tracking record used for customer problems.
Program Temporary Fix (PTF)
Temporary fix that will be incorporated into the next release of the product.  May be a single fix or multiple fixes associated with a single fileset.
Service Boot
Server is started with the key in the service position (as opposed to the key being in the normal position).
SuperblockDisk block that contains information about the entire file system.  It starts at byte offset 4096 and is 4096 bytes in size.
Swap Space
See Paging Space above.
System Management Interface Tool (SMIT)Menu driven system administration interface for AIX
Vpath
Similar to HP LUN?


Boot Process

Phases of the Boot Process:
  1. Read Only Storage Kernel Init Phase
    1. Motherboard is Checked
    2. Bootlist is found
    3. Boot image is read into memory
    4. Initialization starts
  2. Base Device Configuration Phase
    1. All devices are configured with cfgmgr command
  3. System Boot Phase
    1. Logical volumes are varied on
    2. Paging is started
    3. /etc/inittab is processed
Commands

alog - allows the administrator to view logs
alog -L  alog -o -t boot  
cfgmgr
last
bootlist
uptime
mpcfg
shutdown

How to boot the system if the Service Processor Firmware Menu is displayed:

Service Processor Firmware
         Main Menu

1.  Service Processor Setup Menu
2.  System Power Control Menu
3.  System Information Menu
4.  Language Selection
5.  Call In/Call Out
6.  Set System Name
99.  Exit Menu

Choose Option 2:  System Power Control menu, then select option to Power On

How to boot to the SMS Menu (to apply firmware updates)
  • Boot normally
  • Interrupt the boot when the systems displays memory and cpu information
  • <1> on Ascii terminals
  • on Graphics terminals
  • If you want to update firmware then you need to choose option 3, then put software in diskette drive and choose:
    • Option 6 for Update System Software
    • Option 7 for Update Service Processor
Startup Scripts
  • /etc/inittab
    • Indentifier:RunLevel:Action:Command
  • Inittab Commands
    • lsitab  --&gt lists records in /etc/inittab
    • mkitab  --&gt makes a new entry in /etc/inittab
    • chitab  --&gt changes an existing entry in /etc/inittab
    • rmitab  --&gt  removes an entry from /etc/inittab

Disks


lsdev -C -c disk  - shows available disks on the server

lsfs   
lspv  - shows disks and their LVM information or "none" if not part of LVM

dumpfs - shows superblock, i-node map and disk map information for the file system specified.

df -v - shows the number of i-nodes used and free.

istat - shows the last updated, last modified and last accessed times of a file.

ls -i - shows the i-node number assigned to a file

bosboot -a  --&gt creates a new bootimage

bootlist -m normal -o hdisk0 hdisk1  --&gt puts hdisk0 and hdisk1 on the bootlist

bootlist -m normal -o  --&gt displays the current bootlist

How to mount a cdrom
  • Make sure the cdrom is inserted
  • Make sure the cdrom drive is properly identified
    • lsdev -Cc cdrom
  • Mount the cdrom
    • mount -v cdrfs -r /dev/cd0 /cdrom

Dump Space

The system dump facility copies critical information to the dump device when a system crash occurs.  This information is critical for determing the cause of the crash.

sysdumpdev -l 
sysdumpdev -P -p /dev/hd9  
sysdumpdev -e  
smitty dump  
Procedure for manually peforming a system dump
  • Using Commands
    • sysdumpstart
    • smit dump
  • Using special key sequence
    • Key in SERVICE mode
    • or K
  • Using the reset button
    • Key in SERVICE mode
    • Press the reset button once
Procedure to verify a system dump
  • Find out the name of the dump file
    • sysdumpdev -L
  • Run the crash command
    • crash   or crash
      • crash will provide a ">" prompt, stat and quit are commands of crash
    • >stat
      • If the dump is successful, then you will see statistics of the dump
    • >quit
Procedure to generate a system dump using snap
  • snap -gfkDNcd
    • -g  -f   -k  -D  -N  -c  -d 

Filesystems

Additional information in the file aix-lvm.html.

  mount -t   --&gt mounts all filesystems in /etc/filesystems containing the t=type attribute

Copying files
  • cp
  • tar - limited to files smaller than 2 GB
  • cpio - limited to files smaller than 2 GB
  • pax

Argument list too long error
  • lsattr -E -l sys0 -a ncargs - List value of ARG/ENV
  • chdev -l sys0 -a ncargs=NewValue (range 6-128) - Modifies value of ARG/ENV.

Kernel

Changing from 32 bit kernel to 64 bit kernel
  • Change the link in the root directory
    • Existing link:  lrwxrwxrwx   1 root     system           21 Jun 12 09:59 unix -> /usr/lib/boot/unix_mp
    • Link to:  /usr/lib/boot/unix_64
  • Change the link in the /usr/lib/boot directory
    • Existing link:  lrwxrwxrwx   1 root     system           21 Jun 12 10:01 unix -> /usr/lib/boot/unix_mp
    • Link to:  /usr/lib/boot/unix_64


Networking

entstat -d en0  

Paging and Swap Space

Utilities to monitor paging space:
  • vmstat
  • topas
lsps -a  chps -s 16 hd6   chps -d 16 hd6  mkps  rmps  swapon  swapoff 
Total Paging Space = 512MB + (Physical Memory Size - 256MB) * 1.25


Processes and Services

/etc/inetd.conf - inetd configuration file
/etc/services - information about services, such as port number

Starting and stopping a process:
refresh -p
refresh -s

Changing the inetd configuration
  • Files
    • /etc/inetd.conf
    • /etc/services
  • Using smit - daemon is recycled automatically upon exit
  • Using vi
    • restart the inetd daemon so that the new configuration is read:
    • refresh -s inetd
  • Using chservices to edit /etc/services
    • chservices -c  --&gt changes entries
    • chservices -a  --&gt adds entries
    • chservices -d  --&gt deactivates entries

Software Installation and Patches

lslpp -l ""  
rebuild .toc file - "inutoc" 
root.oncwhst5:/# instfix -ciqk 5100-04_AIX_ML | grep ":-:"

root.oncwhst5:/# lslpp -l bos.iconv.ucs.com


Displaying the maintenance level and fixes that are installed
  • oslevel
  • oslevel -q
  • oslevel -r  
  • instfix -i | grep ML  instfix -ik    lppchk -v   lscfg -vp | grep alterable  

Procedure to upgrade the maintenance level of the os


System Information

prtconf|more  amount of ram - bootinfo -r or lsattr -El sys0 -a realmem
number of  processors - lscfg | grep proc or bindprocessor -q

oslevel  --&gt returns the major level of the OS (such as 5.0)
oslevel -r  --&gt  returns the detailed level of the OS, with sub level and patch level info (such as 5.1)
uname -a
uname -uM  --&gt type of machine and serial number

System Monitoring

topas = top on hp-ux

Tapeutil

To run the menu version type "tapeutil"
  • Open the correct device
    • /dev/rmt0 = tape drive
    • /dev/smc0 = tape library
  • "lsdev -Cc tape" will list the devices
  • Use the commands listed
    • 14 =Element Inventory
    • 17 = Load/Unload Medium

To manually use tapeutil
  • "tapeutil -f /dev/smc0 move 5 82"  --&gt will move tape from slot 5 to the tape drive
To manually remove a tape from the drive using tapeutil:
  • tapeutil -f /dev/rmt0 unload  --&gt
  • tapeutil -f /dev/smc0 move 82 5


Terminal Configuration

Autocompletion:  \

Troubleshooting

See aix-troubleshooting.html

Users

Commands:
mkuser  --&gt  utility the creates a new user
passwd  --&gt  change the user's password
chuser  --&gt  change the user's attributes
chuser minother=#   --&gt changes minother atttribute for a user
luser     --&gt  lists the attributes for a specific user account
lsuser -f   --&gt lists each attribute on it's own line
rmuser  --&gt  utility that removes a user
chsec  --&gt  change the user's security attributes
login 
who  --&gt  lists who is currently logged into the system
whoami (who am i)  --&gt displays information about yourself
dtconfig

Files:
/etc/security/environ  --&gt lists environment attributes for each user
/etc/security/lastlog  --&gt lists last login attributes for each user
/etc/security/limits   --&gt  lists process resource limits for each user
/etc/security/user  --&gt lists extended user attributes for  each user
/usr/lib/security/mkuser.default  --&gt lists default attributes for new users
/usr/lib/security/mkuser.sys  --&gt script. that sets up the user's environment
/etc/passwd  --&gt lists basic user attributes for each user
/etc/security/passwd  --&gt  contains password information for each user
/etc/security/login.cfg  --&gt  lists login security information for each user
/etc/utmp  --&gt contains users that are logged into the system, used by the "who" command
/var/adm/wtmp  --&gt  contains connect time information for users
/etc/security/failedlogin  --&gt contains unsuccessful login attempts
/etc/motd  --&gt  message of the day that is displayed when the user logs in.
/etc/environment  --&gt lists the default environment that new processes will use.
/etc/profile  --&gt  environment settings for all  users
$HOME/.profile  --&gt  environment settings for a specific user
/etc/group  --&gt  lists attributes for each group
/etc/security/group  --&gt  lists extended attributes for each group

Important /etc/security/user attributes to know about:

account_locked   --&gt  true or false
expires --&gt  Expiration time for a user account.  MMDDHHMMYY,  a value of 0 indicates no expiration
loginretires  --&gt  Number of invalid login attempts before a users is not allowed to login.  A value of 0 indicates this attribute is disabled.
maxage  --&gt Maximum number of weeks a password is valid, a value of 0 indicates unlimited
minage  --&gt  Minimum nuimber of weeks between password changes.

Procedure to add a new user
  • mkuser or
  • smitty mkuser

Procedure to change the password on a server

passwd

Note:  The account needs to be reset if when trying to log in the following message is received:

3004-303 There have been too many unsuccessful login attempts; please see
        the system administrator.

Procedure to reset the account:

1.  chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s N500620

2.  chuser "account_locked=false" N500620

Procedure to change the shell prompt:
  • Prompts
    • PS1 - normal system prompt
    • PS2 - prompt when system expects more input
    • PS3 - super-user prompt
  • export PS1="newprompt>"


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24403358/viewspace-670509/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24403358/viewspace-670509/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值