For my own references
Commands for memory
shows how much RAM does my machine has (as root)bootinfo –rshows how much RAM does my machine have (as non root)
lsattr –E –l sys0 –a realmem
Simulates a system with various sizes of memory for performance testing of applications.
To set the memory size to 512 MBrmss -c 512To reset the memory size to the original one
rmss -r
Commands for Disk / file system
Shows all diskslsdev -CcdiskGives info about the disk manufacture type
lscfg -vp -l hdisk0 | grep MachineDisplays disk size (even if no volume group is assigned)
bootinfo –s hdisk0Displays information about a physical volume within a volume group (Display PP's used, location on disk, mount point)
lspv -p hdisk0List of Filesystem items of jfs2 file system type.
lsfs -v jfs2List the parameter the filesystem of jfs2 file system type
lsfs -q -v jfs2
From here, we can see if e.g. /backup was or is a big_filesystem_enabled one. Important for the 2GB File limit.
Displays all exported volumesshowmount –eShow who's got my file systems mounted over IP !
showmount -aShows all mounted filesystems (nfs+local)
mountSynchronize the device configuration database (ODM) with the logical volume manager information for rootvg
synclvodm -vP rootvgRedfined VG definition in ODM
redefinevg rootvgReads logical volumes info from disk
lqueryvg -p hdisk0 –AvtIncreases /var FS by about 100MB (each unit is 512 bytes)
chfs -a size=+200000 /varMounts all FS stated in /etc/filesystems
mount allUnmounts a FS
umount /mnt/Identifies processes using a file or file structure
fuser –c /dataVolumes/testReleases a CD that will not unmount by sending SIGKILL signal to each local process. Must be root.
fuser -k /dev/cd0Shows when the file was last created/modified/accessed
istatReports input/output statistics for logical partitions, logical volumes and volume groups every 2 seconds
lvmstat –v hd2 2Enable / Disable LVM statistic collection
lvmstat -e hd2 lvmstat -d hd2
Commands for Network
Displays en0 driver paramslsattr -El en0Displays ent0 Hardware params
lsattr -El ent0Display specific device specified by logical name ent0
lscfg -v -l ent0Display firmware device tree for the corresponding node to the ent0 device
lscfg -vp -lent0Displays en0 driver params
ifconfig en0Displays network interfaces setting
netstat -iDisplay all interface information - host:addr:mask:_rawname:nameserv:domain:gateway:cost:activedgd:type:start
for i in `lsdev | grep en | grep "Standard Ethernet" | awk '{print $1}'`; do echo Checking $i;mktcpip -S $i; doneDisplays all IP oriented processes status
lssrc –g tcpipDisplay any communication errors on ent2
entstat -drt ent2 |grep –i errorResets all the statistics back to their initial values.
entstat -rShows a local arp cache
arp -aShows IP statistics
netstat -ptcpShows UDP statistics
netstat -pudpShow network buffer cache statistic
netstat -cShow network statistic for each protocol
netstat -sShows statistics recorded by the memory management routines
netstat -mTrace en2 every 3 seconds
netstat -I en2 3Ping with displaying the routing info
ping -R -c 1 myserverDisplay routing info
netstat -rnShows the state of all configured interfaces
netstat -inDisplay routing info with full hostnames
netstat -rTrace all hobs (interconnections=routers) to the destination IP
traceroute 149.115.39.1
Monitors activity and reports statistics on network I/O and network-related CPU usage.
To startnetpmon -o netpmon.outTo Stop
trcstopDisplays a fully qualified domain name of a host
namerslv -s | grep domain | awk '{ print $2 }'Shows the status of a remote host on the local network
rup myserver
Commands for Tape Device
Displays tape paramslsattr -El rmt0all information about a tape drive
lscfg -vp -l rmt0Shows all tapes lsdev -Cctape
Commands for NFS
Resets NFS stats without rebootnfsstat –zTo stop / start NFS services on a client
stopsrc –g NFS startsrc –g NFSMount an NFS filesystem
mount hostname:/filesystem /mount-pointExports a directory to NFS clients
mknfsexp -d /directoryMounts a directory from an NFS server
mknfsmntChanges the configuration of the system to stop running NFS daemons
rmnfsConfigures the system to run NFS
mknfsUn-exports a filesystem
exportfs -u (filesystem)Lists all exported filesystems
exportfsExports all directories listed in /etc/exports file
exportfs -a
Commands for Devices
Displays system type, firmware, etc driver paramslsattr -El sys0Lists all system HW config (NVRAM)
lscfg –vList all scsi devices
lsdev –CsscsiList all pci devices
lsdev –CspciList all scsi adapters
lsparent –Ck scsiList fiberchannel devices
lsdevfcConfigures devices
cfgmgrThis is similar to devfsadm in Solaris Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output.
cfgmgr -v -l device –vName Specifies the named device to configure along with its children.
cfgmgr -v -l deviceIf you only turned on a disk tower at e.g. scsi2 cfgmgr -v -l scsi2 will only configure this with detailed output.
Commands for Graphic adapter
To check which graphic adapter is installed.lsdispList all information about a adapter
lscfg -vp -l mga0
Commands for boot
Change the default bootlistbootlist -m normal cd0 rmt0 hdisk0
Commands for Firmwares
Display the system firmware level and service processorlsmcode -cDisplay the adapter microcode levels for a RAID adapter scraid0
lsmcode -r -d scraid0Display the microcode level for all supported devices
lsmcode -A
Commands for System Information
Get machine ID/usr/bin/uname -mGet platform type
/usr/bin/uname -MDetermines the system serial number
lsattr -El sys0 -a systemid | awk '{print $2}' | awk -F, '{print $2}'Displays current AIX level
oslevelDisplays current AIX maintenance level
oslevel -rList filesets at levels later than maintenance level !!!
oslevel -gList all information about a processors
lscfg -vp -l proc0 (1,2,3)List all information about memory modules installed
lscfg -vp -l mem0 |pgDetermines the system Firmware level
lscfg –vp|grep ROM|grep -v CDCheck last system dump status
sysdumpdev -LCheck system dump device settings
sysdumpdev -lList contents of the package
lslpp -f Upd_Timna_DTM.objShows create/modify/access file info
istatDisplay system boot log
alog -o -t boot | moreIdentifies the users currently logged in
whoShows recent 5 lines
last –5Shows username ‘root’ login/logout record
last rootDisplays local system statistics in interactive mode and records system statistics in recording mode
nmonThe nmon command provides the following views in interactive mode:
* System resource view (using the r key) * Process view (using the t and u keys) * AIO processes view (using the A key) * Processor usage small view (using the c key) * Processor usage large view (using the C key) * Shared-processor logical partition view (using the p key) * NFS panel (using the N key) * Network interface view (using the n key) * WLM view (using the W key) * Disk busy map (using the o key) * Disk groups (using the g key) * ESS vpath statistics view (using the e key) * JFS view (using the j key) * Kernel statistics (using the k key) * Long term processor averages view (using the l key) * Large page analysis (using the L key) * Paging space (using the P key) * Volume group statistics (using the V key) * Disk statistics (using the D key) * Disk statistics with graph (using the d key) * Memory and paging statistics (using the m key) * Adapter I/O statistics (using the a key) * Shared Ethernet adapter statistics (using the O key) * Verbose checks OK/Warn/Danger view (using the v key) * Detailed Page Statistics (using the M key) * Fibre channel adapter statistics (using the ^ key)
Reports selected local and remote system statistics
topasMonitors system 10 top processes with 2 seconds
monitor -top 10 -s 2Displays disks activity every 2 seconds refresh interval
iostat 2Displays the adapter and disk throughput report every 2 seconds
iostat –a 2Monitors virtual memory statistics every 2 seconds
vmstat 2Show all CPU’s activity on an SMP machine 2 times separated by 2 seconds.
Each row is for 1 logical processor.
'U' row is for system-wide Unused capacity.
Last line is for system-wide statistics.
sar –P ALL 2 2Monitors real and virtual memory
svmon –i 2Shows top 10 memory usage by process
ps auxw | sort –r +3 |head –10Shows top 10 CPU usage by process
ps auxw | sort –r +2 |head –10Traces FS,LV,disks,files activity of a “find” command into a logfile (filemon.out). Must be preceded by a trcstop command.
filemon –O all –o filemon.out ; find / -name core ; trcstopTraces CPU activity of a “find” command Several logfile are created. Must be preceded by a trcstop command.
tprof –x find / -name core ; trcstopShows the DNS server name and address
nslookup hostnameTrace CPU activity for next 30 seconds. Results in file sleep.tprof
tprof -ske -x "sleep 30"
Commands for paging.
Paging space settings.lsps -a
Commands for user accounts
Environment setings - show user ulimitenv ulimitShows all user parameters (max .file size,etc)
lsuser –f rootLists login users and their programs.
w
Commands to browse errlog
Generates a report of logged errors. Default commanderrptAll details
errpt -aModerate details
errpt -AEliminates double entries
errpt –DBrowse the errlog in detail for all errors within a timeframe
errpt -a -s 0604090601 -e 0605090901where date format is mmddhhmmyy Generates a report of resource names specified by the ResourceNameList variable (SYSPROC)
errpt -a -N SYSPROC |moreBrowse the errlog by the identifier
errpt -j 5DFED6F1>h4>Misc Find all files containing "10.10.10.13" IP address
ksh find / -type f|xargs grep "10.10.10.13" 2> /dev/nullCompresses the files while keeps the original
compress -c file > file.ZReturns full path of program (Similar to 'which' command in Solaris / Linux. Also available in AIX)
whereis
No comments:
Post a Comment