Sie sind auf Seite 1von 2

AIX QuickSheet Devices Users and Groups

Version: 1.2.3 List all devices on a system List all settings for root user in grepable format
Date: 8/17/7 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.*$//’
List all disk devices on a system (Some other devices are: adapter, Find the fsize value for user wfavorit
Filesystems driver, logical volume, processor) lsuser -a fsize wfavorit
Default rootvg filesystems lsdev -Cc disk Change the fsize value for user wfavorit
hd1 - /home List all customized (existing) device classes (-P for complete list) chuser fsize=-1 wfavorit
hd2 - /usr lsdev -C -r class
hd3 - /tmp Remove hdisk5 Networking
hd4 - / rmdev -dl hdisk5 • The examples here assume that the default TCP/IP configuration
hd5 - Boot logical volume Get device address of hdisk1 (rc.net) method is used. If the alternate method of using rc.bsdnet
hd6 - paging space getconf DISK DEVNAME hdisk1 or bootinfo -o hdisk1 is used then some of these examples may not apply.
hd8 - log device Get the size (in MB) of hdisk1 Determine if rc.bsdnet is used over rc.net
hd9var - /var getconf DISK SIZE hdisk1 or bootinfo -s hdisk1 lsattr -El inet0 -a bootup option
hd10opt - /opt 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
Create a log device on datavg VG swcons /console.out (Use swcons to change back.) ifconfig en0 192.168.1.3 netmask 255.255.255.0 alias
mklv -t jfs2log -y datalog1 datavg 1 To permanently add an IP address to the en1 interface
Format the log device just created Tasks chdev -l en1 -a netaddr=192.168.1.1 -a netmask=0xffffff00
logform /dev/datalog1 Change port type of (a 2Gb) HBA (4Gb may use different setting) Permanently add an alias to an interface
Format the log device associated with the fs on LV datalv1 rmdev -d -l fcnet0 chdev -l en0 -a alias4=192.168.1.3,255.255.255.0
logform /dev/datalv1 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
Change the maximum number of user processes to 2048 mklvcopy data01lv 2 lsattr -El ent0 -a media speed
chdev -l sys0 -a maxuproc=2048 syncvg -v datavg Set the ent0 link to Gig full duplex
Check to see if SMT is enabled lsvg -l datavg will now list 2 PPs for every LP (Auto Negotiation is another option)
smtctl mklv -c 2 -t jfs2 -y data02lv datavg 8 (2 Gig LV) chdev -l ent0 -a media speed=1000 Full Duplex -P
crfs -v jfs2 -d data02lv -m /data02 -A yes Turn off Interface Specific Network Options
mount -a no -p -o use isno=0
ODM Move a VG from hdisk1 to hdisk2 Get (long) statistics for the ent0 device (no -d is shorter)
PdDv, PdAt, PdCn - Predefined Databases entstat -d ent0
CuDv, CuAt, CuDep, CuDvDr, CuVPD - Customized Databases extendvg datavg hdisk2
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. topas Options
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 View statistics for disk I/O
alog -o -t console oslevel -rl 5300-05 topas -D
List all log types that alog knows List recommended MLs Show statistics related to micro-partitions in Power5 environment
alog -L oslevel -rq topas -L
Send a message to errlog List installed MLs All of the above commands are availible from within topas
errlogger "Your message here" instfix -i | grep AIX ML
Display the contents of the system error log List all filesets Performance Monitoring
errpt (Add -a or -A for varying levels of verbosity) lslpp -L Use mpstat -d to determine processor affinity on a system. Look for
• Errors listed from errpt can be limited by the -d S or -d H op- List all filesets in a grepable or awkable format s0 entries for the best affinity and lesser affinity in the higher fields.
tions. S is software and H is hardware. Error types are (P)ermanent, lslpp -Lc Get verbose disk stats for hdisk0 every 2 sec
(T)emporary, (I)nformational, or (U)nknown. Error classes are Find the package that contains the filemon utility iostat -D hdisk0 2
(H)ardware, (S)oftware, (O)perator, or (U)ndetermined. which fileset filemon Get extended vmstat info every 2 seconds
Clear all errors up until x days ago. Install the database (from CD) for which fileset while [ 1 ]; do vmstat -vs; sleep 2; clear; done
errclear x installp -ac -d /dev/cd0 bos.content list Get running CPU stats for system
List info on error ID FE2DEE00 (IDENTIFIER column in errpt output) Create a mksysb backup of the rootvg volume group mpstat 1
errpt -aDj FE2DEE00 mksysb -i /mnt/server1.mksysb.‘date +%m%d%y‘ Get time based summary totals of network usage by process
Put a “tail” on the error log Cleanup after a failed install netpmon to start statistics gathering, trcstop to finish and summarize.
errpt -c installp -C
List all errors that happened today Getting info about the system
errpt -s ‘date +%m%d0000%y‘ LVM Find the version of AIX that is running
To list all errors on hdisk0 Put a PVID on a disk oslevel
errpt -N hdisk0 chdev -l hdisk1 -a pv=yes List all attributes of system
To list details about the error log Remove a PVID from a disk getconf -a
/usr/lib/errdemon -l chdev -l hdisk1 -a pv=clear Find the type of kernel loaded (use -a to get all options)
To change the size of the error log to 2 MB List all PVs in a system (along) with VG membership getconf KERNEL BITMODE
/usr/lib/errdemon -s 2097152 lspv bootinfo and getconf can return much of the same information, getconf
syslog.conf line to send all messages to log file Create a VG called datavg using hdisk1 using 64 Meg PPs returns more and has the grepable -a option.
*.debug /var/log/messages mkvg -y datavg -s 64 hdisk1 Find the level of firmware on a system
syslog.conf line to send all messages to error log Create a LV on (previous) datavg that is 1 Gig in size invscout
*.debug errlog mklv -t jfs2 -y datalv datavg 16 List all attributes for the kernel “device”
Error log messages can be redirected to the syslog using the errnotify List all LVs on the datavg VG lsattr -El sys0
ODM class. lsvg -l datavg Print a “dump” of system information
List all PVs in the datavg VG prtconf
smitty FastPaths lsvg -p datavg
Find a smitty FastPath by walking through the smitty screens to get Take the datavg VG offline Display Error Codes
to the screen you wish. Then Hit F8. The dialog will tell you what varyoffvg datavg 214,2C5,2C6,2C7,302,303,305 - Memory errors
FastPath will get you to that screen. (F3 closes the dialog.) Remove the datavg VG from the ODM 152,287,289 - Power supply failure
lvm - LVM Menu exportvg datavg 447 - An error has occurred on an adapter
mkvg - Screen to create a VG Import the VG on hdisk5 as datavg 521 - init process has failed
configtcp - TCP/IP Configuration importvg -y datavg hdisk5 551,552,554,555,556,557 - Corrupt LVM, rootvg, or JFS log
eadap - Ethernet adapter section Vary-on the new datavg VG (can use importvg -n) 553 - inittab or /etc/environment corrupt
fcsdd - Fibre Channel adapter section varyonvg datavg 552,554,556 - Corrupt filesystem superblock
chgsys - Change / Show characteristics of OS List all VGs (known to the ODM) 521 through 539 - cfgmgr (and ODM) related errors
users - Manage users (including ulimits) lsvg 532,558 - Out of memory during boot process
devdrpci - PCI Hot Plug manger List all VGs that are on line 518 - Failed to mount /var or /usr
etherchannel - EtherChannel / Port Aggregation lsvg -o 615 - Failed to config paging device
Check to see if underlying disk in datavg has grown in size More information is availible in the “Diagnostic Information for Multiple
System Resource Controller chvg -g datavg Bus Systems” manual
Start the xntpd service Move a LV from one PV to another
startsrc -s xntpd migratepv -l datalv01 hdisk4 hdisk5 Additional Information
Stop the NFS related services Delete a VG by removing all PVs with the reducevg command. http://publib16.boulder.ibm.com/pseries/en US/infocenter/base
stopsrc -g nfs reducevg hdisk3 (-d removes any LVs that may be on that PV)
Refresh the named service About this QuickSheet
refresh -s named Created by: William Favorite (wfavorite@tablespace.net)
List all registered services on the system Memory / Swapfile Updates at: http://www.tablespace.net
lssrc -a Show status of ctrmc subsystem List size, summary, and paging activity by paging space Disclaimer: This document is a guide and it includes no express war-
lssrc -l -s ctrmc lsps -a ranties to the suitability, relevance, or compatibility of its contents with
List summary of all paging space any specific system. Research any and all commands that you inflict
Working with Packages lsps -s upon your command line.
List all files in bos.games fileset. List the total amount of physical RAM in system Distribution: The PDF version is free to redistribute as long as credit
lslpp -f bos.games lsattr -El sys0 -a realmem to the author and tablespace.net is retained in the printed and viewable
Create a new paging device on rootvg of 64 PPs versions. LATEXsource not distributed at this time.
mkps -a -s 64 -n rootvg

Das könnte Ihnen auch gefallen