You are on page 1of 14

BASIC COMMANDS IN UNIX

System Configuration Commands ls = list -a lists all entries in the directory (also hidden ones) -c uses the time of last of modification -l displays the mode, number of links, owner, group, size... -r lists all subdirectories recursively -s gives space used in a 1024-Byte Unit -d lists just the directories -t shows you the latest in time -i lists current file-number (f. ex. by this you can look for hardlinks) -R lists all subdirectories recursively lsconf = lists the machine configuration ls -la |more > <FILE> = reads the data into a file and save AIX: lslpp -L = displays the latest information about installed filesets or fileset updates lslpp -h <DRIVER*> = shows driver information AIX: instfix -i = displays whether fixes or keywords are installed instfix -i |grep ML = shows current Maintenance Level instfix -ik <APAR> = searches for the current package emgr -p -e xxx.epkg.Z = preview or emgr -e xxx.epkg.Z = installs interim fix emgr -l = lists all ifixes in system with status ps = current process status (shows your own running processes) -e prints information to standard output about all processes -f generates a full listing -a processes started on a terminal server -k shows all active kernel processes aux processes of CPU Units ps -ef |grep <STRING> = shows you the process of string ps -ef |grep ttyd = checks the processes running on the modem f. ex. ps -ef |grep olli |more > olli.proc = all listing processes of olli will stored in the file olli.proc du -sk; ps -ef; ps -ef |grep ttyd = executes one command to another rm = remove AIX: del -r deletes all files in directories and subdirectories -i asks you for the deleting-action rm -r xyz = also deletes files with unknown characters in it rmnfsexp -d /test = deletes the exported test-directory cd = changes to your home directory mkdir = make directory (for generating a new directory) -p creates a new directory-path (f. ex. mkdir -p /test1/test2/test3 ) rmdir = remove directory (for deleting the chosen directory) mkfifo -m 777 = make first-in, first-out (creates a pipe with all permissions for all) mkcd -L -d /dev/cd1 -e -M /dvdback -C /dvdstruc -I /dvdfin = creates a mksysb to DVD-RAM with device cd1 and excludes files in /etc/exclude.rootvg AIX: lslicense = lists all fixed licenses and shows the floating license status chlicense -u 8 -f off = sets the fixed licenses to 8 and floating licenses to status off

> core = makes a file named core

AIX: touch core

mv = move (for moving or renaming files or directories) pwd = print working directory (to show you the active directory) tail -1 <FILE> = shows you the last sentence of a file -f = youll see the latest actually online changes in this file cp = copy -r -p copies files or directories copies the directory-tree does not change any permission

cp /usr/test1 /tmp/test1; mv /tmp/test1 /var/test1 = the ; concatenates one command to another rdist -c /usr/local/bin/file <TARGETHOST> = copies/synchronize file to equal path on remote machine time compress * = compresses all files in the actually directory (time shows duration of process) uncompress ./nelle = uncompress the file nelle ln -s <SOURCE> <TARGET> = to make a softlink from one file to another (Symbolic Link) ln <SOURCE> <TARGET> = hardlink pointer to file ID (just within the same filesystem) vmstat = virtual memory statistics -s = displays number of paging events since system start -i = interrupts by device since system start -t = (time) time-stamp included -I = displays an I/O oriented view -v |grep <FS> = I/O blocked 1 refresh-time in seconds 10 number of threads waiting interruptibly (f. ex. vmstat 3 10 = every third second for ten times) swapon = specifies file for paging and swapping -s displays the total amount of allocated swap space -a activates a new swap-partition AIX: chps -s <BLOCKS> hd6 = changes a paging space on hd6 mkps = makes a rmps = removes a lsps -a = shows active paging space lsps -s = allocated and reserved paging space

|grep onelle searches a file for patterns, f. ex. onelle |grep -v onelle displays all lines not matching the specified pattern |grep -E <STRING1>|<STRING2> will specify each pattern as an extended regular expression (ERE) AIX: fgrep xyz *.sh = searches for the string xyz in all files ends with .sh in the current directory fgrep -l xyz *.csh = searches for all files in the current directory ends with .csh and displays all those contains xyz |more or |pg displays each site (paging) strings <FILE> reads printable strings with 4 or more printable characters lpc... = line printer control program ... stat displays the status of daemons and queues on the local machine lpq -l = displays information about a Print-Job of each printer lpr -<PRINTER> <FILE> = prints current file AIX: enq <FILE> AIX: enq -A

lprm -<PRINTER> <JOB> <USER> = deletes data out of the queue AIX: startsrc -s lpd = starts the Printer Daemon; stopsrc -s lpd = stops the Printer Daemon startsrc -s <SUBSYSTEM> starts a subsystem lssrc -a = to get the status of subsystems/-groups and the subserver shutdown +<TIME/MIN> -r now = to shutdown the machine and make a reboot (interrupt in power-connect) init 6 = the same like shutdown -r now (down to Runlevel 0) shutdown -v = system halted shutdown -F = quick shutdown (users should be log off) For starting applications automatically the configuration files are: /etc/rc.net ; /etc/inttab who -r = shows the latest started Runlevel and that before id = displays the system identifications of a specified user (real ID) kill -9 <PROCESSID> = to kill a running process kill -kill <PROCESSID> <PROCESSID> <PROCESSID> = kills several Process IDs (Signal 9) find = searches for a file-name in a path f. ex. find /baan4/bse IBM -print = searches and lists the file IBM find ./ -name inf1 -print = searches for the filename inf1 in the actual directory find ./ -name *inf1 -print = searches for contents with string inf1 in the actual directory find / -size +250c -print = shows you a list of files in root, which are bigger than 250 Bytes find / -xdev -user <USER> = lists all files in root for the current user without those in extended filesystems find . -group <GID> = finds all files by groupid ; find . -user <UID> = finds all files by userid find . -name * |cpio -pdmuv /tmp = copies files (without linkcontents) 1:1 from current directory to /tmp !! = recalls the last command sort = sorts files (tables!) F. ex. sort +0 -1 <FILE> = the first table-field always is 0 and is sorted (+) ; the second table-field (1) isnt so (-) man = manual menu for help /pattern = searches for pattern from up to down, f. ex. in a textfile ?pattern = searches for pattern from down to up sh -users.txt = starts the shell-script users date or date +%d. %m. %Y. %H %M = shows current date and time date -n <mmddHHMMYYYY> = sets the date on this machine to a new one AIX: export DISPLAY=<HOSTNAME>:0.0 = displays graphical sessions to your current host /usr/sbin/mknfsexp -d <DIRECTORY> -t rw -B = exports a directory for another host with read/write /usr/sbin/chnfsexp -d <DIRECTORY> -t r -B = changes the export-parameters for a directory to just read /usr/sbin/mount -t nfs baancluster:/dump /dump = mounting of file system dump from a member in a cluster (-t = special file system type) AIX: mount -n saphir_d /usr/sap/trans /usr/sap/trans = mounting of file system /usr/sap/trans from a remote host saphir_d

mount -t -r cdfs -o noversion /dev/disk/cdrom0c /mnt = mounting the CDROM-drive (-r = special file system; -o = specifies a list of comma-separated arguments) mount -v cifs -n <HOSTNAME>/<USER>/<PASSWORD> -o wrkgrp=<WORKGROUP>,uid=3222, fmode=755 /<DIRECTORY> /<DIRECTORY2> = mounts via cifs directory to directory2 umount /dump = unmount the dump file system umount -a = unmounts all file systems which arent busy The configuration files are: /etc/filesystems mklv -t jfslog -y loglv00 newvg <VG> = creates a JFS logging device on a newly created VG logform /dev/loglv00 = formats the VG logfile env = environment-settings of the system The configuration files are: /.profile ; /etc/environment AIX: locale -a = lists the locales for computer programmes hostname = shows current hostname wc & <FILE> (Word Count) = listing of lines, words and Bytes of a file (& = executing in the background) csplit <FILE> = splits a file for different arguments in at least two segments clear = clears current window cat <FILE> = same like more cat <FILE1> <FILE2> = adds content file2 to file1 cat $<FILE1> + $<FILE2> = displays the addition of file1 to file2 (Arithmetic Operation) file /usr/local/bin/*.EXE = program-information of an executable sum <FILE1> = calculates checksum of file1 istat <FILE2> = shows all attributes of file2 cal <YEAR> = shows the calendar of the current year which = to find an executable file in a path nice <NUMBER> <COMMAND> = set a defined user-process ID (priority) f. ex. nice --20 /usr/local/bin/master_AIX_error_daemon renice <NUMBER> <PROCESSNUMBER> = change a user-process ID on a running process alias dir=ls -l = sets the alias dir to the command ls -l unalias dir = to set it back again set <VARIABLE> = set a variable to the environment unset <VARIABLE> = to set it back again lpr -print <FILE1> <FILE2> sdiff <FILE1> <FILE2> = compares between the current files csplit <STRING> = cuts the current string of the rest nohup (no hangup) = for going on in executing after closing a X-Session AIX: oslevel (Operating-System-Level) = shows the current OS oslevel -qs = lists Maintenance Levels (s=Service Packs) oslevel -g = lists all filesets

oslevel -rl 4330- 07 = lists installed filesets of AIX 4.3.3 Maintenance Level 7 AIX: prtconf = Port Configurations lsmcode -A = firmware release of all adapters rootdump /dev/rmt0 = backs up the system on tape AIX: mksysb -i /dev/rmt0 (included the image.data.file in /var/adm/ras) mksysb -v (verbose) = lists files as they backed up mksysb -V = verifies a tape backup, verify the file header of each file on the backup and reports read errors AIX: listvgbackup |\ awk 'BEGIN{size=0} {size += $1; printf "%12d\t%s\n",$1,$2} END {printf "total size = %d",size}' = lists all contents of your system backup tape with its sizes also the total size AIX: /find /tmp -print |backup -vqf /dev/rmt0.1 = backups the /tmp directory and add on tape-device rmt0

AIX: /restore -xvf /dev/rmt0 /dsmsched.log = restores the file dsmsched.log to the RootDirectory /restore -xdvf /dev/rmt0.1 /etc/var = restores all files and subdirectories in this folder (without rewind) tctl -f /dev/rmt0 rewind = (tape control) rewinds the rmt0 tape device tctl fsf2 = moves forward two file marks on the default tape device AIX: crfs -v jfs -g<VG> -a size=<512- BYTE BLOCKS> -m<MOUNTPOINT> = creates a new LV in a VG AIX: chfs -a SIZE=[+][- ]<512- BYTE BLOCKS> <FS> = increases [shrinks] a filesystem AIX: history = displays the last command-numbers r <COMMAND- NUMBER> = execute current command AIX: inutoc . = sets current directory to an installation directory searching f. ex. filesets or APARs AIX: tar -c <FILE1> <FILE2> = archives file1 and file2 on the default tape tar -cvf - <FILE1> | dd of=/dev/rmt1 conv=sync = c creates tar archive on the rmt1 device ; v information about the tape entries, file sizes and the last modification tar -xvf <FILE1> /tmp = extracts file1 to the /tmp directory tar -tvf = just lists files which will extract AIX: lppchk lppchk lppchk lppchk lppchk = verifies the database information of a Software Product in links, sizes or values -c = verifies that the file sizes based on FileList checksum are consistent with the SWVPD database -l = for symbolic links of all software products ; -c = for checksum -v = verify all filesets have all required requisites and are completely installed -vm3 = (1|2|3) Levels of information: 1=Error messages only (default); 2=Error messages and warnings; 3=Error messages, warnings and informational messages

AIX: format -d /dev/rfd0 = formats a diskette in the /dev/rfd0 device format -d /dev/fd0.18 = formats a 3,5-inch diskette (1,44MB) bc = interpreter for arithmetic language quit = leaves interpreter-modus AIX: smitty = ASCI mode ; smit = graphic mode

AIX: dos2unix <file1> > <file2> = converts character of WIN/DOS Files to UNIX AIX : expr 8 \*128 = expression reads parameter, evaluates it and writes to the standard output AIX : set -o vi = settings for editor (ESC + K -> last input) AIX : odmget Cu = gets info from the ODM odmdelete -o Cu = deletes info from the ODM (/etc/objrepos or $ODMDIR) Hardware Configuration Commands df = free disk space -e displays information about mounted file-systems -k causes the numbers to be reported in Kilobytes -m reported in Megabytes (AIX 5L) -g reported in Gigabytes (AIX 5L) du = disk usage -s displays only the grand total for each of specified directories -k displays block count in Kilobytes -sk * displays usage for every file in the directory AIX: rmdev -dl <LOGICAL DISK> = removes a defined disk from your system rmdev -l <LOGICAL DISK> = deletes temporary disk (not out of the ODM) rmdev -dRl <ent0> = unconfigures the device and its children mkdev -l <LOGICAL DISK> = creates the disk again lspath -HF name parent connection path_status path_id = lists current information of all paths chpath -l <HDISK> -p <FSCSIx> -s disable or enable = changes path-status rmpath -l <HDISK> -p <FSCSIx> -w <CONNECTION INFORMATION> -d = deletes a path disklabel -r dsk20 = shows you the partitions on a set, f. ex. on set dsk20 AIX: lspv hdisk20 dd if=/dev/rre2c of=/dev/null bs=16k = for reading data from harddisk partition rre2c dd if=/dev/zero of=/rre2c/10g bs=1m count=10000 = writes a 10000 1m blocks file named 10g to rre2c time dd if=/dev/zero of=/dev/rre2c bs=128k count=10000 = writes a 10000 128k blocks to the rre2c device Nur TRU64 : hwmgr -view devices -category tape = Hardware Manager for the Tape-Devices (Device Name, Mfg, Model, Location) AIX: lspv = lists all defined disks chdev -l hdisk20 -a pv=yes = gets current PV-ID for hdisk20 chdev -l fscsi0 -a <PARAMETER>=<NEW VALUE> -p = changes adapter parameter for SCSI Adapter 0 - active after reboot lslv <LOGICAL DISK> = lists logical volume collection map (USED, FREE, COUNT 1-10 (PP)) AIX: lscfg (list Config) = displays specific data on all systems AIX: lscfg -vl <LOGICAL DISK> = lists a logical disk with its contents AIX: lscfg -vp = shows the platform-specific device information AIX: od -c = reads a disk in byte steps AIX: lsattr -El <DEVICE> = displays attribute characteristics for devices lsattr -Rl ent2 -a media_speed = lists all possible speed parameter settings of LAN Adapter ent2 AIX: lsdev -Cc adapter = lists all system adapters on board lsdev -Cc disk = lists all disks with its status AIX: rmdev -dl <LOGICAL DISK> = deletes a logical disk AIX: ssa_format -l <SSA ADAPTER> -b = sets the battery statistic of a SSA Adapter to 0

AIX: fget_config -Avl dar (DS4400) or sanlun lun show all (NSeries) = shows all hdisks on storagesite AIX: cfgmgr = Configuration Manager -p = lists the current paths -c = command to create an Initiator Group cfgmgr -v = (verbose) the Cfgmgr writes information about it is doing to standard output cfgmgr -l <DEVICE> = removes the current device from system AIX: AIX: AIX: AIX : bootlist -m <NAME> -o = shows the current boot-sequences bootlist -m normal fd0 cd0 rmt0 hdisk0 hdisk1 = makes the boot-sequence in this way bosboot -ad /dev/hdisk0 = for rewriting the boot-sector on the hdisk0 device bosboot -ad /dev/ipldevice = the same like with hdisk0 if corrupt than delete old and create a new one with ln rhdisk0 ipldevice AIX: chpv -c <LOGICAL DISK> = clears the boot record of the logical volume AIX: bootinfo -K = shows current boot-mode (Bit Mode) / bootinfo -k = gets current Runlevel bootinfo -y = gets Bit Information from the Platform / bootinfo r = for RAM bootinfo -b = shows current bootdisk AIX: fsck <FILESYSTEM> = verify a file-system (unmounted) fsck -y <FILESYSTEM> = if a Superblock is available it will repairs your JFS (unmounted) AIX: defragfs -q <FILESYSTEM> = reports the fragment-status of the file-system -r <FILESYSTEM> = runs a report for the action only <FILESYSTEM> = defrags a file-system AIX: migratepv <hdisk1> <hdisk2> = copies disk1 to disk2 AIX: disable tty0 = to disable the tty0 interface enable lp0 = enables line-printer lp0

User Configuration Commands AIX: umask <VALUE> = setting the user parameters for permissions chmod u -w+r <FILE> = change module for user (change rights: write no; read yes) / g = group; u = user ; o = other ; a = all ; s = search permissions for directories for specified group/users chown root:bsp <FILE> = change owner (change owner to root and group of directory to bsp) -R = changes for all subdirectories, too passwd <USER> = changes the password of user etc/passwd adduser /addgroup = add a home directory for a user or create a new group AIX: mkuser/mkgroup removeuser = delete its home directory AIX: rmuser su - <USERNAME> = (substitute user) changes your login to current user with its profile and exit = changes to root again AIX: su <ROOT> -c <COMMAND> = execute this command as user root (please notice permissions!) chroot /usr/local/bin = changes the root path to /usr/local/bin who = shows you the users logged in the system /var/adm/wtmp finger = further information about who last = lists that users logged on for the last time whoami o. who am i = shows the user youre logged in the system $home = your current Home directory groups = the groups the users in AIX: chuser <ATTRIBUTE>=<VALUE> <USER> = changes the user authorizations AIX: mirrorvg -S <VG> = mirrors a VG in the background unmirrorvg <VG> = unmirrors a VG mirscann -q0 -v <VG> = controls and shows all mirrored partitions AIX: fuser /dev/LV = shows you all process IDs running on current LV

Network Configuration Commands and Communication mail = to look at the mails JUST coming from the crontab or other System-Users echo Hello |sendmail -v webmaster@souls.de = sends a Hello to me Sendmails a program which sends out internal and external mails The configuration files are: /etc/netsvc.conf <host=local> /etc/mail/sendmail.cf Dw<LOCAL HOST> ; DS<MAILSERVER> sendmail -F = Full Name sets the name of the sender provided in the Full Name Variable -t = sends the mail to any users specified on the command line refresh -s sendmail = refreshes the configuration to the Sendmail Daemon mail -c user2@host2 user1@host1 = sends a copy from mail to user2 mail -s test for mail user1@host1 = sends mail with subject test for mail to user1 F. ex. mail -c user@provider.de <<EOF >text >EOF uuencode /tmp/test.txt test.txt |mail -s test olli.nelle@gmx.de = sends attached text.txt to recipient nslookup -query=hinfo -timeout=10 = changes the default query type to host information (HINFO) and the initial time-out to 10 seconds nslookup opus = performs a noninteractive query on host opus host opus = displays IP-Address ; host <IP> = displays host name nslookup -querytype=ANY example.ibm.com = the nslookup command returns all available information about the domain example.ibm.com The configuration files are: /etc/hosts (static) ; /etc/resolv.conf (Nameserver) ; /etc/netsvc.conf <host=local,bin> AIX: echo Hello\n = displays a new-line character; echo Hello\c = suppresses a new-line character talk <USER> = starts a correspondence with the chosen user wall <MESSAGE> = sends a message to all users logged in the system write -n <HOST> <USER> = sends a message to a specified user write -h <USER@HOST> = (h=handle) cu = connects you to a remote system rlogin <HOSTNAME> = connects you to another machine

slogin <HOSTNAME> = connects you via a SSH Protocol to another host rsh <HOST> (Remote Shell) = the same like rlogin netstat -r = shows you the active sockets of all network interfaces and its routing tables Current Flags: U = up ; G = Gateway ; D = dynamically created ; M = modified by redirect ; L = Link-Level address is present in route entry ; c = Access to this route creates a cloned route ; W = is a cloned route ; H = the route is to a host rather than to a network ; S = manually added ; b = the route represents a broadcast address (->AIX 5L) route delete <DESTINATION> <GATEWAY> = deletes the route route add <DESTINATION> <GATEWAY> = adds a route netstat -p <PROTOCOL> = action of an used protocol -v = shows statistics for communication adapters (MAC Address) -m = shows statistics recorded by the memory management routines -sr = displays routing statistics -I en0 = shows information of network adapter en0 arp -d <IP> = deletes the ARP-cache of the current IP-Address ifconfig fi0/en0 = displays network interface en0 communication/parameters for a network using TCP/IP -u = just displays interfaces with status up -d = down en0 down = sets interface en0 to down en1 up = sets interface en1 to up en1 detach = removes the interface from the network interface list -a = for all entstat -d ent0 = shows the current status for the ent0 interface fcstat fcs1 = shows the current status for the fcs1 interface lssrc -s routed = Routing-Status no -a = Network Environments (no -a |pg pmtu ) no -o thewall = current dynamic memory used by TCP/IP (KB) no -d thewall = sets the TCP/IP memory to default (1048552 / Max = 1GB) no -o tcp_mssdflt = displays default PMTU = 1448 rcp -r <REMOTEHOST >:<SOURCE> <DESTINATION> = remote-copy from one to another system scp -rp <REMOTEHOST>:<SOURCE> . = Remote to Local Connection via SSH Protocol scp <FILE> <REMOTEHOST>:<DESTINATION> = Local to Remote Connection via SSH Protocol nfsstat = information of NFS Filesystems exportfs /x/yz = exports the xyz filesystem (/etc/exports) exportfs -a = refreshes the export list (f. ex. is needed for CD/DVD-NFS Mount) mount = show all mounted fielsystems (nfs=nfs2 ; nfs3=nfs3) showmount -e <HOST> = shows all exported NFS Mounts of a machine (/etc/xtab) mount -o proto=tcp (o. udp) vers=3 <HOST>:/opt /mnt = mounts an exported FS /opt to /mnt NFS Version 3

Logical Volume Administration Commands AIX: varyoffvg <VG> = deactivates the volume group and also its associated Logical Volumes exportvg <VG> = exports the Volume Group from system importvg -y <VG> <LOGICAL DISK> = imports the Volume Group back to the system varyonvg <VG> = activates the volume group with its LV by the Volume Group parameters lsvg = lists all Volume Groups lsvg -l <VG> = lists all Logical Volumes for a VG lsvg -o = lists all active VG (online) lsvg -p = lists physical volumes for a VG syncvg -v <VG> = synchronizes the VG chvg -g <VG> = examines disks in a VG if they have grown in its size rmlvcopy <LV> 1 <LOGICAL DISK> = removes an existing copy from the current disk reducevg <VG> <LOGICAL DISK> = removes a disk from a VG migratepv -l -f <LV> <SOURCE DISK> <DESTINATION DISK> = forces move of a Logical Volume migratelp <LV/LOGICAL PARTITION> <DISTINATION DISK/LOGICAL PARTITION> = moves a simple logical partition to another logform /dev/<VG>log = formats a LV into a jfslog- or jfslog2 file

System Monitoring Commands AIX: sysdumpdev -l = lists system dump information sysdumpdev -K sets the option always allow dump to TRUE sysdumpdev -e = estimated dump size sysdumpdev -L = shows previous dumps records sysdumpdev -P -p /dev/hd7 = f. ex. changes primary dump device to hd7 sysdumpstart -p = starts a dump follows a reboot /usr/lib/ras/dumpcheck -p = checks the dumpfilesize AIX: iostat = status of resources of both I/O components iostat -d = just disk iostat -t = just CPU iostat 5 5 = sets the command all 5 seconds, 5 times iostat -a = just adapter was = shows you the user with all processes needed 100% CPU in a time of 1 second AIX: topas = displays resources of the AIX system topas -C = CPU utilization over virtual OS (LPARs) top = the first ten processes needed most of time more top = displays further information about top.exe ipcs = shows you active processes in memory ipcrm -s <ID> = deletes shared memory segments in memory AIX: rmss -c <MEMORY> = changes the simulated memory size to a specific value in units of megabytes rmss -r = resets the simulated memory size rmss -p = displays the current simulated memory script <FILE> = begins to write all screen-prints to this file script -a <FILE> = attaches something to the current file exit = stops it uerf -c err = Event report formatter = shows you f. ex. Error-Events detected on the system

AIX: filemon filemon filemon (trcstop

-O all = monitors I/O activity for all System Levels (lf, vm, lv, pv) -o = writes to a specified file -d = starts filemon, but defers till the trcon command is set up stops the filemon process)

fileplace <FILE> = shows file fragments (4KB or 512KB possible) fileplace -p <FILE> = shows the fragments of a file with disk information AIX: netpmon -O all = monitors I/O activity for all System Levels (cpu, dd, so, nfs ) netpmon -o = writes to a specified file netpmon -d = starts netpmon, but defers till the trcon command is set up (trcstop stops the netpmon process) AIX: svmon -G -i 20 30 = Global statistics about system segments 30 times, in a 20 second interval svmon -p = shows current memory state for processes svmon -s = segments AIX: iptrace = records Internet packets received from configured interfaces startsrc -s iptrace -a -d <HOST> -i en0 /tmp/iptrace/log1 = starts an iptrace with characters: Packets received from HOST (no arp) on interface en0 iptrace -e /tmp/log2 = starts an iptrace and enables the promiscuous mode on network adapters that support this function iptrace -s sapserv3 -b /tmp/Osstrace = A Sniffer on all network interfaces to remote host sapserv3 and protocols in binary mode stopsrc -s iptrace = stops the iptrace ipreport -ns /tmp/log2 > log2_formatted = formats the log file and writes its output to stdout AIX: tcpdump tcpdump tcpdump tcpdump = prints out the headers of packets captured on a network interface -i en1 host <HOST1> = packets on en1 arriving at or departing from HOST1 net 138.57.117 = prints traffic between local hosts on network 138.57.117 -i en2 -wTraceInfo = prints the package information on en2 to the file Trace-Info

Parameter Settings (this pre-requisites AIX 5L): MEMORY vmo -L = lists all Memory Parameter Settings vmo -d <PARAMETER> = sets chosen parameter to a new value vmo -D = sets all parameters to default value vmo -r -o <PARAMETER> = sets a parameter to a new value after reboot vmo -a |grep <VG> = I/O blocked CPU schedo -L tprof -x sleep 20 = collects data for 20 minutes to file /var/adm/sleep.prof DISK ioo -L NETWORK no -L

sar -d = provides real time I/O statistics sar -uf /var/adm/sa/sa08 = after running sa1/sa2 to read the output of collected data

NMON isnt a standard AIX tool but you can download free from ibm.com site! nmon -s 1 -c 145 -f -t -F /tmp/xxx.nmon = creates an NMONFILE in the /tmp directory (every second / number of snapshots=145) sort -A <NMONFILE> >/tmp/<NEWFILE> = sorts the file f. ex. pre-sorts if file has more than 65k to NEWFILE sed s/,/;/g <NEWFILE> > /tmp/<NEWNMONFILE> = in the current file all ,-sign will changing to ;-sign (stream editor)

lquerypv -h /dev/hdisk0 ---> utility is used to examine the properties of a physical disk lqueryvg -Atp hdisk0 ---> utility is used to examine the properties of disk volume

You might also like