Topics: AIX, System Admin
Proper vmstat output
Often when you run vmstat, the output may be looking very disorganized, because of column values not being shown properly under each row. A very simple solution to this issue is to run the same command with the "-w" flag, which will provide you with a wide vmstat output:
# vmstat -w
When you change MAXUPROC (Maximum number of processes allowed per user), the smitty help panel will tell you that changes to this operating system parameter will take effect after the next system reboot.
This is wrong Help information. The change takes effect immediately, if MAXUPROC is increased. If it is decreased, then it will take effect after the next system reboot.
This help panel text from smitty will be changed in AIX 5.3. APAR IY52397.
Topics: AIX, System Admin↑
Automatic FTP
How to do an automatic FTP from within a script:
- -n prevents automatic login and -v puts it in verbose mode
- asciorbin_Type should be set to either ascii or binary
- grep for $PHRASE (particular return code) from $LOGFILE to determine success or failure
ftp -nv $REMOTE_MACHINE < $LOGFILE user $USER_NAME $USER_PASSWORD $asciorbin_Type cd $REMOTE_PATH put $LOCAL_FILE $REMOTE_FILE quit ! grep $PHRASE $LOGFILE
Use the following command to interactively find and remove core dumps on your system:
# find / -name core -exec file {} \; -exec rm -i {} \;
To discover the amount of paging space a proces is using, type:
# svmon -wP [proces-id]Svmon shows you the amount of memory in 4KB blocks.
To kill all processes of a specific user, enter:
# ps -u [user-id] -o pid | grep -v PID | xargs kill -9Another way is to use who to check out your current users and their terminals. Kill all processes related to a specific terminal:
# fuser -k /dev/pts[#]Yet another method: Su to the user-id you wish to kill all processes of and enter:
# su - [user-id] -c kill -9 -1
Searching with grep in directories with large amounts of files, can get the following error:
The parameter list is too longThe workaround is as follows:
# ls | xargs grep "[search string]"E.g.
# ls | xargs grep -i "error"
The pwd command will show you default the logical directory (pwd -L = default), which means, if any symbolic links are included in the path, that is, what will be shown. To show you the actual physical directory, use the next undocumented feature:
# pwd -P
When you receive an error like:
Do not specify an existing filewhen using iptrace or tcpdump, then this is probably caused by a kernel extension already loaded.
To resolve this, run:
# iptrace -uAfter this, the kernel externsion is removed and iptrace or tcpdump will work again.
Where did all these routes come from & why is my system sending ICMP packets every 10 minutes? This is caused by path MTU discovery. If your AIX system is sending ICMP packets, you can disable it:
AIX has a feature called path MTU discovery which is based on ICMP packets in order to learn MTU sizes on the LAN. Path MTU discovery is a way of finding out the maximum packet size that can be sent along a network using ICMP packets and is enabled on AIX by default. This is done to avoid IP fragmentation on heterogenous networks (ie, an ATM network connected to an ethernet network) and is described in RFC 1191.
# no -a | grep discoverwill show you whether tcp_pmtu_discover and udp_pmtu_discover are enabled (1) or disabled (0). Disable them with:
# no -p -o tcp_pmtu_discover=0If these are disabled, you shouldn't see any ICMP messages any more.
# no -p -o udp_pmtu_discover=0
When one system tries to optimize its transmissions by discovering the path MTU, a pmtu entry is created in a Path MTU (PMTU) table. You can display this table using the pmtu display command. To avoid the accumulation of pmtu entries, unused pmtu entries will expire and be deleted when the pmtu_expire time (no -o pmtu_expire) is exceeded; default after 10 minutes.
Displaying results: 311 - 320.


