Вы находитесь на странице: 1из 3

AIX QuickSheet chdev -l sys0 -a maxuproc=2048

Check to see if SMT is


Devices
Version: enabled smtctl List all devices on a system
2.0.0 Directory containing tunables settings lsdev
Date: 8/28/9 /etc/tunables/ List all disk devices on a system (See next item for a list of classes)
Filesystem lsdev -Cc disk
ODM List all customized (existing) device classes (-P for complete list)
s lsdev -C -r class
hd1 /home Query CuDv for a speci c item
odmget -q name=hdisk0 Remove hdisk5 rmdev
hd2 /usr CuDv -dl hdisk5
hd3 /tmp Query CuDv using the \like" syntax Get device address of hdisk1
hd4 / root odmget -q "name like hdisk?" CuDv getconf DISK DEVNAME hdisk1 (or) bootinfo -o hdisk1
hd5 BLV (Boot Logical Volume) Query CuDv using a complex query Get the size (in MB) of hdisk1
hd6 Paging space odmget -q "name like hdisk? and parent like vscsi?" CuDv getconf DISK SIZE /dev/hdisk1 (or) bootinfo -s hdisk1
hd8 JFS2 log List all disks belonging to scsi0
hd9var /var lsdev -Cc disk -p scsi0
hd10opt /opt Find the slot of a PCI Ethernet adapter
hd11admin /admin New in 6.1 lsslot -c pci -l ent0
livedump /var/adm/ras/livedump New in 6.1 TL3 Find the (virtual) location of an Ethernet adapter lscfg
-l ent1
/proc procfs pseudo lesystem
Find the location codes of all devices in the system
lscfg
Remove mount point entry and the LV for /mymount List all MPIO paths for hdisk0
rmfs /mymount (Add -r to remove mount point) lspath -l hdisk0
Grow the /var lesystem by 1 Gig Find the WWN of the fcs0 HBA adapter lscfg
chfs -a size=+1G /var -vl fcs0 | grep Network
Grow the /var lesystem to 1 Gig chfs Temporarily change console output to /console.out swcons
-a size=1G /var /console.out ! (Use swcons to change back.)
Find the le usage on a lesystem du Get statistics and extended information on fcs0
-smx / fcstat fcs0
List lesystems in a grep-able format
lsfs Tasks
Get extended information about the /home lesystem lsfs Change port type of HBA (This may vary by HBA vendor)
-q /home rmdev -d -l fcnet0
Create a log device on datavg VG rmdev -d -l fscsi0
mklv -t jfs2log -y datalog1 datavg 1 chdev -l fcs0 -a link type=pt2pt cfgmgr
Format the log device just created Mirroring rootvg to hdisk1
logform /dev/datalog1 extendvg rootvg hdisk1
mirrorvg rootvg bosboot -ad
Kernel Tuning hdisk0 bosboot -ad hdisk1
no is used in the following examples. vmo, no, nfso, ioo, raso, and bootlist -m normal hdisk0 hdisk1
schedo all use similar syntax. lvmo uses di erent syntax. Mount a CD/DVD ROM to /mnt
Reset all networking tunables to the default values mount -rv cdrfs /dev/cd0 /mnt ! (for a CD) mount -v udfs -o
no -D (Changed values will be listed) ro /dev/cd0 /mnt ! (for a DVD)
List all networking tunables ,! Note the two di erent types of read-only ags. Either is Ok.
no -a
Set a tunable temporarily (until reboot) no Create a VG, LV, and FS, mirror, and create mirrored LV
-o use isno=1 mkvg -s 256 -y datavg hdisk1 (PP size is 1/4 Gig) mklv -t
jfs2log -y dataloglv datavg 1
Set a tunable at next reboot logform /dev/dataloglv
no -r -o use isno=1
Set current value of tunable as well as reboot mklv -t jfs2 -y data01lv datavg 8 ! (2 Gig LV) crfs -v jfs2 -d
no -p -o use isno=1 data01lv -m /data01 -A yes extendvg datavg hdisk2
List all settings, defaults, min, max, and next boot values mklvcopy dataloglv 2 ! (Note use of mirrorvg in next example)
no -L mklvcopy data01lv 2
List all sys0 tunables syncvg -v datavg
lsattr -El sys0 lsvg -l datavg will now list 2 PPs for every LP
Get information on the minperm% vmo tunable mklv -c 2 -t jfs2 -y data02lv datavg 8 ! (2 Gig LV) crfs -v jfs2 -d
vmo -h minperm% data02lv -m /data02 -A yes
Change the maximum number of user processes to 2048 mount -a
Move a VG from hdisk1 to hdisk2 netstat -anf inet
extendvg datavg hdisk2 mirrorvg Networking List all LISTENing TCP ports
datavg hdisk2 The entX is the physical device. It is associated with physical layer netstat -na | grep LISTEN
,! Wait for mirrors to synchronize settings such as link speed, and duplex. enX and etX determine the Remove all TCP/IP con guration from a host
unmirrorvg datavg hdisk1 reducevg frame type run on entX . IP addresses are con gured on enX rmtcpip
datavg hdisk1 (Standard Ethernet) or etX (802.3). Typically only enX is used.
Flush the netcd DNS cache netcdctrl
Find the free space on PV hdisk1 The examples here assume that the default TCP/IP con guration -t dns -e hosts -f
lspv hdisk1 ! (Look for \FREE PPs") (rc.net) method is used. If the alternate method of using rc.bsdnet is Hostname lookup order is determined using /etc/irs.conf,
used then some of these examples may not apply.
Determine if rc.bsdnet is used over rc.net /etc/netsvc.conf and then $NSORDER. irs.conf and $NSORDER
lsattr -El inet0 -a bootup option are typically not used.
TCP/IP related daemon startup script IP packets can be captured using iptrace / ipreport or tcpdump
/etc/rc.tcpip
To view the route table
netstat -r
To view the route table from the ODM DB
lsattr -EHl inet0 -a route
Temporarily add a default route
route add default 192.168.1.1
Temporarily add an address to an interface
ifconfig en0 192.168.1.2 netmask 255.255.255.0
Temporarily add an alias to an interface
ifconfig en0 192.168.1.3 netmask 255.255.255.0 alias
To permanently add an IP address to the en1 interface
chdev -l en1 -a netaddr=192.168.1.1 -a netmask=0xffffff00
Permanently add an alias to an interface
chdev -l en0 -a alias4=192.168.1.3,255.255.255.0
Remove a permanently added alias from an interface
chdev -l en0 -a delalias4=192.168.1.3,255.255.255.0
List ODM (next boot) IP con guration for interface
lsattr -El en0
Permanently set the hostname
chdev -l inet0 -a hostname=bombay
List networking devices
lsdev -Cc tcpip
List Network Interfaces
lsdev -Cc if
List attributes of inet0
lsattr -Ehl inet0
List (physical layer) attributes of ent0
lsattr -El ent0
List (networking layer) attributes of en0
lsattr -El en0
Set (desired) speed is found through the entX device
lsattr -El ent0 -a media speed
Find actual (negotiated) speed, duplex, and link
entstat -d ent0
,! The interface must be up (ifconfig en0 up) for stats to be valid Set
the ent0 link to Gig full duplex
chdev -l ent0 -a media speed=1000 Full Duplex -P ,!
Auto Negotiation is another option
Turn o Interface Speci c Network Options
no -p -o use isno=0
Get (long) statistics for the ent0 device (remove -d for shorter results)
entstat -d ent0 (or) netstat -v ent0
,! The results of entstat vary by device type. Virtual, physical, and
IVE (LHEA) devices all produce di erent results.
List all open, and in use TCP and UDP ports
Error Logging lvm - LVM Menu Create a new paging device on rootvg of 64 PPs
- Screen to create a mkps -a -s 64 -n rootvg
Error logging is provided through: alog, errlog and syslog. alog
- boot, console messages, NIM, others mkvg VG Extend the existing paging space by 8 PPs
configtcp - TCP/IP Con guration chps -s 8 hd6
errlog - hardware, kernel, and some apps
syslog - Internet dameons, and apps eadap - Ethernet adapter section
fcsdd - Fibre Channel adapter section NFS
Display the contents of the boot log
alog -o -t boot chgsys - Change / Show characteristics of OS List all exported le systems
users - Manage users (including ulimits) exportfs
Display the contents of the console log
alog -o -t console devdrpci - PCI Hot Plug manger Refresh exports after editing /etc/exports
exportfs -av
List all log types that alog knows etherchannel - EtherChannel / Port Aggregation
alog -L Temporarily export the /proj directory, allowing root access by server1
exportfs -i -o rw root=server1 /proj
Display the contents of the system error log System Resource Controller (un)share(all) are symlinks to exportfs for Unix compatibility.
errpt (Add -a or -A for varying levels of verbosity) Most SRC based services are started from /etc/rc.tcpip
Clear all errors up until x days ago. [mk|rm|ch]nfs are provided to maintain /etc/exports
Start the xntpd service
errclear x
startsrc -s xntpd Getting info about the system
List info on error ID FE2DEE00 (IDENTIFIER column in errpt output) Stop the NFS related services
errpt -aDj FE2DEE00 Find the OS, (ML/)TL (-r), and service pack version / date (-s)
Put a \tail" on the error log stopsrc -g nfs oslevel -r (or) oslevel -s
errpt -c Refresh the named service List all attributes of system
List all errors that happened today refresh -s named getconf -a
errpt -s `date +%m%d0000%y` List all registered services on the system Find the type of kernel loaded (use -a to get all options)
To list all errors on hdisk0 lssrc -a getconf KERNEL BITMODE
errpt -N hdisk0 Show status of ctrmc subsystem ,! bootinfo and getconf can return much of the same information,
To list details about the error log lssrc -l -s ctrmc getconf returns more and has the grepable -a option.
/usr/lib/errdemon -l Find the level of rmware on a system
To change the size of the error log to 2 MB Performance Monitoring (yDenotes trace based tools.) invscout (or) lscfg -pv
/usr/lib/errdemon -s 2097152 syslog.conf line to CPU List all attributes for the kernel \device"
send all messages to log le mpstat, topas -P, w, lparstat, ps, iostat -tT 1, tprofy, curty lsattr -El sys0
*.debug /var/log/messages Memory Print a \dump" of system information
prtconf
,! AIX uses *.debug for all, not *.* vmstat, svmon, ps -o fields , topas, ipcs -m
Network I/O Get all page sizes supported on this system
pagesize -a
[ent|tok|fddi|atm]stat, netstat, netpmony, topas -E
LVM Disk I/O Users and Groups
Put a PVID on a disk iostat, fcstat, lvmstat, filemony, fileplace, topas -D List all settings for root user in grepable format
chdev -l hdisk1 -a pv=yes Application lsuser -f root
,! PVIDs are automatically placed on a disk when added to a VG truss, probevue, tprofy, svmon -P pid , ps -o fields -p pid topas List just the user names
Remove a PVID from a disk lsuser -a id ALL | sed 's/ id.*$//'
chdev -l hdisk1 -a pv=clear The ~ character toggles to nmon-mode in topas Find the fsize value for user wfavorit
List all PVs in a system (along) with VG membership Other lsuser -a fsize wfavorit
lspv Check for disk stat history collection Change the fsize value for user wfavorit
Create a VG called datavg using hdisk1 using 64 Meg PPs lsattr -HEl sys0 -a iostat chuser fsize=-1 wfavorit
mkvg -y datavg -s 64 hdisk1 Enable historical disk statistic collection (/usr)/bin/sh and (/usr)/bin/ksh are the same le. Use bsh for the
Create a LV on (previous) datavg that is 1 Gig in size chdev -l sys0 -a iostat=true Bourne shell.
mklv -t jfs2 -y datalv datavg 16
List all LVs on the datavg VG Working with Packages Additional Information
lsvg -l datavg http://publib.boulder.ibm.com/infocenter/systems/scope/aix
List all les in bos.games leset.
List all PVs in the datavg VG lslpp -f bos.games http://www.redbooks.ibm.com/portals/unix
lsvg -p datavg Display error codes can be found in the \Diagnostic Information for
Find out what leset \fortune" belongs to.
Take the datavg VG o ine lslpp -w /usr/games/fortune Multiple Bus Systems" manual
varyoffvg datavg
List packages that are above the current OS level
Remove the datavg VG from the ODM oslevel -g About this QuickSheet
exportvg datavg Created by: William Favorite (wfavorite@tablespace.net)
Find packages below a speci ed (ML/)TL
Import the VG on hdisk5 as datavg oslevel -rl 5300-05 Updates at: http://www.tablespace.net/quicksheet/
importvg -y datavg hdisk5
List all lesets Disclaimer: This document is a guide and it includes no express war-
Vary-on the new datavg VG (can use importvg -n) lslpp -L ranties to the suitability, relevance, or compatibility of its contents with
varyonvg datavg any speci c system. Research any and all commands that you in ict
List all lesets in a grepable or awkable format
List all VGs (known to the ODM) lslpp -Lc upon your command line.
lsvg
Find the package that contains the lemon utility Distribution: The PDF version is free to redistribute as long as credit to
List all VGs that are on line which fileset filemon the author and tablespace.net is retained in the printed and viewable
lsvg -o
Check to see if underlying disk in datavg has grown in size
Install the database (from CD/DVD) for which fileset versions. LATEXsource not distributed at this time.
installp -ac -d /dev/cd0 bos.content list
chvg -g datavg
Create a mksysb backup of the rootvg volume group
Move a LV from one PV to another mksysb -i /mnt/server1.mksysb.`date +%m%d%y`
migratepv -l datalv01 hdisk4 hdisk5
Cleanup after a failed install
Delete a VG by removing all PVs with the reducevg command. installp -C
reducevg hdisk3 (-d removes any LVs that may be on that PV)
Note: See additional examples in \tasks" section. Memory / Swap le
smitty FastPaths List size, summary, and paging activity by paging space
lsps -a
Find a smitty FastPath by walking through the smitty screens to List summary of all paging space
get to the screen you The dialog will tell lsps -s
wish. Then Hit F8. you List the total amount of physical RAM in system
get you to that (F3 th dialog. lsattr -El sys0 -a realmem
what FastPath will screen. closes e )