Sei sulla pagina 1di 2

AIX QuickSheet Devices Users and Groups

Version: 1.3.0 List all devices on a system List all settings for root user in grepable format
Date: 7/1/8 lsdev lsuser -f root
Device states are: Undefined; Supported Device, Defined; Not usable List just the user names
(once seen), Available; Usable lsuser -a id ALL | sed ’s/ id.*$//’
Filesystems List all disk devices on a system (Some other devices are: adapter, Find the fsize value for user wfavorit
Default rootvg filesystems driver, logical volume, processor) lsuser -a fsize wfavorit
hd1 - /home lsdev -Cc disk Change the fsize value for user wfavorit
hd2 - /usr List all customized (existing) device classes (-P for complete list) chuser fsize=-1 wfavorit
hd3 - /tmp lsdev -C -r class
hd4 - / Remove hdisk5 Networking
hd5 - Boot logical volume rmdev -dl hdisk5 • The examples here assume that the default TCP/IP configuration
hd6 - paging space Get device address of hdisk1 (rc.net) method is used. If the alternate method of using rc.bsdnet
hd8 - log device getconf DISK DEVNAME hdisk1 or bootinfo -o hdisk1 is used then some of these examples may not apply.
hd9var - /var Get the size (in MB) of hdisk1 Determine if rc.bsdnet is used over rc.net
hd10opt - /opt getconf DISK SIZE hdisk1 or bootinfo -s hdisk1 lsattr -El inet0 -a bootup option
hd11admin - /admin Find the slot of a PCI Ethernet adapter TCP/IP related daemon startup script
Remove mount point entry and the LV for /mymount lsslot -c pci -l ent0 /etc/rc.tcpip
rmfs /mymount (Add -r to remove mount point) Find the (virtual) location of an Ethernet adapter To view the route table
Grow the /var filesystem by 1 Gig lscfg -l ent1 netstat -r
chfs -a size=+1G /var Find the location codes of all devices in the system To view the route table from the ODM DB
Grow the /var filesystem to 1 Gig lscfg lsattr -EHl inet0 -a route
chfs -a size=1G /var List all MPIO paths for hdisk0 Temporarily add a default route
Find the file usage on a filesystem lspath -l hdisk0 route add default 192.168.1.1
du -smx / Find the WWN of the fcs0 HBA adapter Temporarily add an address to an interface
List filesystems in a grep-able format lscfg -vl fcs0 | grep Network ifconfig en0 192.168.1.2 netmask 255.255.255.0
lsfs Temporarily change console output to /console.out Temporarily add an alias to an interface
Get extended information about the /home filesystem swcons /console.out (Use swcons to change back.) ifconfig en0 192.168.1.3 netmask 255.255.255.0 alias
lsfs -q /home To permanently add an IP address to the en1 interface
Create a log device on datavg VG Tasks chdev -l en1 -a netaddr=192.168.1.1 -a netmask=0xffffff00
mklv -t jfs2log -y datalog1 datavg 1 Change port type of (a 2Gb) HBA (4Gb may use different setting) Permanently add an alias to an interface
Format the log device just created rmdev -d -l fcnet0 chdev -l en0 -a alias4=192.168.1.3,255.255.255.0
logform /dev/datalog1 rmdev -d -l fscsi0 Remove a permanently added alias from an interface
chdev -l fcs0 -a link type=pt2pt chdev -l en0 -a delalias4=192.168.1.3,255.255.255.0
Kernel Tuning cfgmgr List ODM (next boot) IP configuration for interface
no is used in the following examples. vmo, no, nfso, ioo, raso, and Mirroring rootvg to hdisk1 lsattr -El en0
schedo all use similar syntax. extendvg rootvg hdisk1 Permanently set the hostname
Reset all networking tunables to the default values mirrorvg rootvg chdev -l inet0 -a hostname=www.tablesace.net
no -D (Changed values will be listed) bosboot -ad hdisk0 Turn on routing by putting this in rc.net
List all networking tunables bosboot -ad hdisk1 no -o ipforwarding=1
no -a bootlist -m normal hdisk0 hdisk1 List networking devices
Set a tunable temporarily (until reboot) Mount a CD ROM to /mnt lsdev -Cc tcpip
no -o use isno=1 mount -rv cdrfs /dev/cd0 /mnt List Network Interfaces
Set a tunable at next reboot Create a VG, LV, and FS, mirror, and create mirrored LV lsdev -Cc if
no -r -o use isno=1 mkvg -s 256 -y datavg hdisk1 (PP size is 1/4 Gig) List attributes of inet0
Set current value of tunable as well as reboot mklv -t jfs2log -y dataloglv datavg 1 lsattr -Ehl inet0
no -p -o use isno=1 logform /dev/dataloglv List (physical layer) attributes of ent0
List all settings, defaults, min, max, and next boot values mklv -t jfs2 -y data01lv datavg 8 (2 Gig LV) lsattr -El ent0
no -L crfs -v jfs2 -d data01lv -m /data01 -A yes List (networking layer) attributes of en0
List all sys0 tunables extendvg datavg hdisk2 lsattr -El en0
lsattr -El sys0 mklvcopy dataloglv 2 (Note use of mirrorvg in next example) Speed is found through the entX device
Get information on the minperm% vmo tunable mklvcopy data01lv 2 lsattr -El ent0 -a media speed
vmo -h minperm% syncvg -v datavg Set the ent0 link to Gig full duplex
Change the maximum number of user processes to 2048 lsvg -l datavg will now list 2 PPs for every LP (Auto Negotiation is another option)
chdev -l sys0 -a maxuproc=2048 mklv -c 2 -t jfs2 -y data02lv datavg 8 (2 Gig LV) chdev -l ent0 -a media speed=1000 Full Duplex -P
Check to see if SMT is enabled crfs -v jfs2 -d data02lv -m /data02 -A yes Turn off Interface Specific Network Options
smtctl mount -a no -p -o use isno=0
Move a VG from hdisk1 to hdisk2 Get (long) statistics for the ent0 device (no -d is shorter)
extendvg datavg hdisk2 entstat -d ent0
ODM mirrorvg datavg hdisk2 List all open, and in use TCP and UDP ports
Query CuDv for a specific item netstat -anf inet
odmget -q name=hdisk0 CuDv unmirrorvg datavg hdisk1
reducevg datavg hdisk1 List all LISTENing TCP ports
Query CuDv using the “like” syntax netstat -na | grep LISTEN
odmget -q "name like hdisk?" CuDv Find the free space on PV hdisk1
lspv hdisk1 (Look for “FREE PPs”) Remove all TCP/IP configuration from a host
Query CuDv using a complex query rmtcpip
odmget -q "name like hdisk? and parent like vscsi?" CuDv IP packets can be captured using iptrace / ipreport or tcpdump
Error Logging Find out what fileset “fortune” belongs to. Performance Monitoring
Error logging is provided through: alog, errlog and syslog. lslpp -w /usr/games/fortune Make topas look like top
Display the contents of the boot log List packages that are above the current OS level topas -P
alog -o -t boot oslevel -g View statistics from other partitions
Display the contents of the console log Find packages below a specified ML topas -C
alog -o -t console oslevel -rl 5300-05 View statistics for disk I/O
List all log types that alog knows List installed MLs topas -D
alog -L instfix -i | grep AIX ML Show statistics related to micro-partitions in Power5 environment
Send a message to errlog List all filesets topas -L
errlogger "Your message here" lslpp -L • All of the above commands are availible from within topas
Display the contents of the system error log List all filesets in a grepable or awkable format • Use mpstat -d to determine processor affinity on a system. Look for
errpt (Add -a or -A for varying levels of verbosity) lslpp -Lc s0 entries for the best affinity and lesser affinity in the higher fields.
• Errors listed from errpt can be limited by the -d S or -d H op- Find the package that contains the filemon utility Get verbose disk stats for hdisk0 every 2 sec
tions. S is software and H is hardware. Error types are (P)ermanent, which fileset filemon iostat -D hdisk0 2
(T)emporary, (I)nformational, or (U)nknown. Error classes are Install the database (from CD) for which fileset Get extended vmstat info every 2 seconds
(H)ardware, (S)oftware, (O)perator, or (U)ndetermined. installp -ac -d /dev/cd0 bos.content list while [ 1 ]; do vmstat -vs; sleep 2; clear; done
Clear all errors up until x days ago. Create a mksysb backup of the rootvg volume group Get running CPU stats for system
errclear x mksysb -i /mnt/server1.mksysb.‘date +%m%d%y‘ mpstat 1
List info on error ID FE2DEE00 (IDENTIFIER column in errpt output) Cleanup after a failed install Get time based summary totals of network usage by process
errpt -aDj FE2DEE00 installp -C netpmon to start statistics gathering, trcstop to finish and summarize.
Put a “tail” on the error log
errpt -c LVM Getting info about the system
List all errors that happened today Put a PVID on a disk Find the version of AIX that is running
errpt -s ‘date +%m%d0000%y‘ chdev -l hdisk1 -a pv=yes oslevel
To list all errors on hdisk0 Remove a PVID from a disk Find the ML/TL or service pack version
errpt -N hdisk0 chdev -l hdisk1 -a pv=clear oslevel -r –or– oslevel -s
To list details about the error log List all PVs in a system (along) with VG membership List all attributes of system
/usr/lib/errdemon -l lspv getconf -a
To change the size of the error log to 2 MB Create a VG called datavg using hdisk1 using 64 Meg PPs Find the type of kernel loaded (use -a to get all options)
/usr/lib/errdemon -s 2097152 mkvg -y datavg -s 64 hdisk1 getconf KERNEL BITMODE
syslog.conf line to send all messages to log file Create a LV on (previous) datavg that is 1 Gig in size bootinfo and getconf can return much of the same information, getconf
*.debug /var/log/messages mklv -t jfs2 -y datalv datavg 16 returns more and has the grepable -a option.
syslog.conf line to send all messages to error log List all LVs on the datavg VG Find the level of firmware on a system
*.debug errlog lsvg -l datavg invscout
Error log messages can be redirected to the syslog using the errnotify List all PVs in the datavg VG List all attributes for the kernel “device”
ODM class. lsvg -p datavg lsattr -El sys0
Take the datavg VG offline Print a “dump” of system information
smitty FastPaths varyoffvg datavg prtconf
• Find a smitty FastPath by walking through the smitty screens to get Remove the datavg VG from the ODM
to the screen you wish. Then Hit F8. The dialog will tell you what exportvg datavg Display Error Codes
FastPath will get you to that screen. (F3 closes the dialog.) Import the VG on hdisk5 as datavg 214,2C5,2C6,2C7,302,303,305 - Memory errors
lvm - LVM Menu importvg -y datavg hdisk5 152,287,289 - Power supply failure
mkvg - Screen to create a VG Vary-on the new datavg VG (can use importvg -n) 521 - init process has failed
configtcp - TCP/IP Configuration varyonvg datavg 551,552,554,555,556,557 - Corrupt LVM, rootvg, or JFS log
eadap - Ethernet adapter section List all VGs (known to the ODM) 553 - inittab or /etc/environment corrupt
fcsdd - Fibre Channel adapter section lsvg 552,554,556 - Corrupt filesystem superblock
chgsys - Change / Show characteristics of OS List all VGs that are on line 521 through 539 - cfgmgr (and ODM) related errors
users - Manage users (including ulimits) lsvg -o 532,558 - Out of memory during boot process
devdrpci - PCI Hot Plug manger Check to see if underlying disk in datavg has grown in size 518 - Failed to mount /var or /usr
etherchannel - EtherChannel / Port Aggregation chvg -g datavg 615 - Failed to config paging device
Move a LV from one PV to another More information is availible in the “Diagnostic Information for Multiple
System Resource Controller migratepv -l datalv01 hdisk4 hdisk5 Bus Systems” manual
Start the xntpd service Delete a VG by removing all PVs with the reducevg command.
startsrc -s xntpd reducevg hdisk3 (-d removes any LVs that may be on that PV) Additional Information
Stop the NFS related services http://publib16.boulder.ibm.com/pseries/en US/infocenter/base
stopsrc -g nfs
Refresh the named service Memory / Swapfile About this QuickSheet
refresh -s named List size, summary, and paging activity by paging space Created by: William Favorite (wfavorite@tablespace.net)
List all registered services on the system lsps -a Updates at: http://www.tablespace.net
lssrc -a List summary of all paging space Disclaimer: This document is a guide and it includes no express war-
Show status of ctrmc subsystem lsps -s ranties to the suitability, relevance, or compatibility of its contents with
lssrc -l -s ctrmc List the total amount of physical RAM in system any specific system. Research any and all commands that you inflict
lsattr -El sys0 -a realmem upon your command line.
Working with Packages Extend the existing paging space by 8 PPs Distribution: The PDF version is free to redistribute as long as credit
List all files in bos.games fileset. chps -s 8 hd6 to the author and tablespace.net is retained in the printed and viewable
lslpp -f bos.games versions. LATEXsource not distributed at this time.

Potrebbero piacerti anche