1. What does the acronym AIX stand for?
A: Advanced Interactive eXecutive.
2. How can I restart the SSHD service?
A: Please use the following commands to stop and restart the SSHD service:
stopsrc -s sshd
startsrc -s sshd
3. How can I copy the contents of one file system to another?
A: Use the cp command with the recursive flag set. (cp –R).
4. How do I enable telnet sessions on my reserved VLP system?
A: By default telnet is disabled on the reserved VLP system. Please use the following commands to start/stop the telnet service:
startsrc –s telnet
stopsrc –s telnet
5. How can I enable FTP service on my reserved VLP system?
A: By default FTP service is disabled on the reserved VLP system. Please use the following commands to start/ stop the FTP service:
startsrc –t ftp
stopsrc –t ftp
6. Is there a menu driven way to configure AIX, install programs, etc?
A: Yes, type in the command smit or smitty to access the menu driven AIX configuration utility.
7. What is the purpose of proc file system in the root directory?
A: The proc file system is a mounted file system used to trace a process system call, receive signals, and incurred machine faults.
8. Where can I get more AIX “How To”?
A: Visit the User “How-To” section of the Information Center:http://publib.boulder.ibm.com/infocenter/systems/scope/aix/index.jsp
9. Where can I get more Application Developer help online?
A: Please visit the Software Products section of the IBM Web site: http://www-01.ibm.com/software/sw-bycategory/
10. Where can I get the latest AIX toolbox for Linux Applications?
A: Visit the AIX Toolbox for Linux Applications Web site. http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html
11. Where can I read more about AIX and Linux Interoperability?
A: Please refer to the IBM redbook AIX and Linux Interoperability.
12. Where can I read more about running Linux Applications on AIX?
A: Please refer to the IBM Redbook Linux Applications on System p
13. Where can I read reference material on AIX 5L troubleshooting and problem solving?
A: Please refer to the IBM Redbook Problem Solving and Trouble shooting in AIX5L
14. Why Can’t I Kill My Process?
A: To kill a process sometimes it is necessary to eliminate a process entirely. This is the purpose of the kill command. The syntax of the kill command, which is actually a general purpose process signaling utility, is as follows:
kill [-signal] PID
The kill command (or kill -15 which is the default signal) sends a SIGTERM signal to a process. This signal can be trapped, thus ignored by a process. The kill -9 command sends a SIGKILL command to the process. If the process is currently in USER mode, this signal cannot be caught or trapped and the process will terminate. Occasionally, processes will not die even after being sent the kill signal. The majority of such processes fall into one of the following categories: Zombies. A process in the zombie state (displayed as Z status in BSD ps displays and as under System V). A zombie process is one in which all its resources have been freed, but the parent process’s acknowledgment has not occurred. Zombies are always cleared the next time the system is booted and do not adversely affect system performance. Processes in kernel mode waiting for unavailable resources.
There are two modes a process can be in, USER mode and KERNEL mode. The process goes into kernel mode anytime it needs to access system functions via a system call routine. While in the kernel mode, signals are ignored until the system call exits back to user mode. At that time, any pending signals are handed to the user process. If while in kernel mode, the process goes to sleep while waiting on a resource and the resource never becomes available, the process will never exit kernel mode. The only way to kill a process that is “ignoring” or “sleeping” in kernel mode is to restart the system.
Note: Signals are defined in the /usr/include/signal.h file and the command kill -l may be used to generate a list of their symbolic names, delivery of signals to a system call.The kernel delays the delivery of all signals, including SIGKILL, when starting a system call, device driver, or other kernel extension. The signal takes effect upon leaving the kernel and returning from the system call. This happens when the process returns to the user protection domain, just before running the first instruction at the caller return address.
15. Will my 64-bit application run on the 32-bit kernel?
A: Most likely. The environment in which the application was built has no bearing on where it can run. Compiler switches are available to create either a 32-bit or a 64-bit executable program from program source code when compiled on either the 32-bit kernel or the 64-bit kernel. In addition, 32-bit programs and 64-bit programs can both be run on either the 32-bit kernel or the 64-bit kernel. However, if your application needs the use of a kernel extension (a program that extends the kernel and may, for example, provide a new system call for the application) which is not supported on both the 32- and 64-bit kernels, your application will only run with the kernel supported by the kernel extension.
16. How do I install applications from the /stage/middleware directory?
A: Some of the applications are in the AIX lppsource format and they can be installed with “smitty install”. You can tell if it is this type of install if there is a “.toc” file in the directory. If the application is in the tar format, you must move it to another directory to uncompress and untar the files. Then you can install the application. You need to have root authority to do this.
17. Is there a program I can use to monitor system performance?
A: Yes, the NMON program works for AIX and LINUX. You can find out more information and download it from IBM Developer works.
18. Error “Could not chdir to home directory /home/u000XXXX: The file access permission does not allow the specified action.” What is the resolution?
A: Make sure the directory ownership on /home/u000XXXX is set as u000XXXX:staff
If not, you can correct it by using the command: chown <u000XXXX:staff> </home/u000XXXX>. You should be a root user while issuing this command.
19. How to configure temp space on the reserved VLP System?
A: The temp space is already configured as a volume group and labeled as tempvg. To create a filesystem on this volume group follow the below directions:
1. Type smitty jfs or smitty jfs2, depending upon which type of filesystem you want to configure.
2. Select Add a Journaled File System.
3. Select Add a Standard Journaled File System and press Enter.
4. You should see 2 Volume Groups to choose from, rootvg and tempvg. Select tempvg and press Enter.
20. How do I increase the size of an AIX filesystem?
A: To increase the size of filesystem, use the command chfs.
chfs -a size=+’size to be increased in MB or GB’ /FS
Where FS is the name of filesystem.
Example 1: To increase the filesystem of /usr/temp01 with 512MB,
The command would be: chfs -a size=+512M /usr/temp01
Example 2: To increase the filesystem of /tmp by 2GB,
The command would be: chfs -a size=+2G /tmp.
21. When using smitty can I see the command line equivalent for the smit menu selection?
A: Yes, press the F6 (Function Key + 6) to see the corresponding command
22. Are there Linux tools I can run on the AIX system?
A: Yes, the Linux Toolbox for AIX is located in the /stage/middleware/AIX/linux_tools directory. They can be installed with the rpm command.
23. Does OpenSSH come with AIX?
A: OpenSSH is a free software tool that supports SSH1 and SSH2 protocols. It’s reliable and secure and is widely accepted in the IT industry to replace the r-commands, telnet, and ftp services, providing secure encrypted sessions between two hosts over the network. OpenSSH_5.2p1 is available on the AIX 7.1, OpenSSH_5.4p1 on AIX 6.1 and OpenSSH_5.2p1 on AIX 5.3 reservations.
24. How do I start a CDE session using the VPN?
A: To start a CDE (common desktop environment) session on AIX using the VPN client, you need to follow these steps:
1. Start the VPN appliance and log in with your User ID and Password. You should see the Lock icon on the bottom right hand corner of your screen to show that VPN connection is established.
2. Bring up a terminal emulator such as PuTTY and SSH to your Reserved VLP Server.
6. Start the VNC Viewer client such as RealVNC or TightVNC. In the Server or destination field, type the IP address of your Reserved VLP Server:port number. For example: 172.29.13X.XXX:1. 6. The VNC Viewer client will ask you for you VNC password, enter your VNC password. Once authenticated, CDE session would be started.
25. How do I start a CDE session using SSH?
A: To start a CDE (common desktop environment) session on AIX using the SSH Gateway:
Uncomment the third line, and change it to: $cmd .= “ -fp
/usr/lib/X11/fonts/:/usr/lib/X11/fonts/misc/:/usr/lib/X11/fonts/75dpi/”;
b) Edit the file /.vnc/xstartup, and comment out this line “twm &”, and add this line:
# This line gives you a CDE desktop when you sign on to VNC
/usr/dt/bin/dtsession &
c) Ensure that all the files except xstartup are removed from /.vnc directory.
d) Also ensure that all the directories are removed in the/tmp/.X11-unix directory.
e) Now exit from the reservation.
2. From the SSH gateway, establish an SSH Tunnel and forward the VNC Server port.
For Example: ssh -4gL {tunnel_port}:{reserved_server_ip_address}:5901 {reserved_server_user_id}@{reserved_server_ip_address}
ssh -4gL 20099:172.29.1XX.XX:5901 u000XXXX@172.29.1XX.XX
3. Start your VNC Viewer client such as RealVNC or TightVNC. In the Server or destination field, type the IP address of the SSH Gateway: port forwarded on SSH Gateway.
For example: 198.81.193.104:20099.
4. The VNC Viewer client will ask you for your VNC password, enter your VNC password and your VNC session will start with the CDE desktop.
26. How can I change the hostname of my reserved VLP system?
A: The hostname for the reserved VLP AIX system can be changed by any of the following procedures:
1. You may use the command ‘hostname myhost01’
2. You may edit the /etc/resolv.conf file to make the changes permanently effective for the duration over which the reservation is in Active state. You may use the following format to add the necessary attributes to the /etc/resolv.conf file for changing the hostname and domainname for a given IP address: `IP_address hostname domainname`
3. You to use the command ‘smitty tcpip’. The command would provide you with the option to edit the already configured hostname. The steps are as follows:
A: In order to create a 64-bit binary, you should use GCC with the -maix64 argument. For example, gcc -maix64.
28. Why do the file /var/log/lastlog consume so much disk space?
A: When you log in to a UNIX system, the file shows who last logged in. That information is stored in a binary file called lastlog. Each user has their personal record; UID 8 is at record 8, UID 239 at record 239, and so on. This is a feature of UNIX called “sparse file”. The /var/log/lastlog file main purpose includes spooling directories and files, administrative and logging data, and transient and 20 temporary files. Run ‘du’ on it to see how much actual disk space it occupies. The file can be removed.
29. Why do I receive errors about libc.a(aio.o) while running db2start on AIX?
Or
How do I resolve the following error I get when running db2start? “exec(): 0509-036 cannot load program db2start because of the following errors: 0509-130 Symbol resolution failed for /usr/lib/threads/libc.a(aio.o)”
A: When the asynchronous I/O is turned off and you may encounter the following error when you try to run db2start:
0509-130 Symbol resolution failed for /usr/lib/threads/libc.a(aio.o) because:
0509-136 Symbol kaio_rdwr (number 0) is not exported from dependent module /unix.
0509-136 Symbol listio (number 1) is not exported from dependent module /unix.
0509-136 Symbol acancel (number 2) is not exported from dependent module /unix.
0509-136 Symbol iosuspend (number 3) is not exported from dependent module /unix.
0509-136 Symbol aio_nwait (number 4) is not exported from dependent module /unix.
0509-192 Examine .loader section symbols with the ‘dump -Tv’ command.
To turn ON asynchronous I/O:
1. smitty aio.
2. Change / Show Characteristics of Asynchronous I/O.
3. Set “STATE to be configured at system restart” to “available”.
4. Apply the changes, reboot the AIX box.
30. How can I NFS mount my local CD-ROM to my VLP system?
A: Following are the steps required to mount a CD-ROM as a cdrom filesystem, export the NFS filesystem from the server, and NFS mount the filesystem on the client. This assumes the server with the CD-ROM is an AIX system with 4.3 or above.
This also assumes that the VLP target system can reach the server with the CD-ROM on the network, for some this would be via the VPN-VPN connection or the server must be reachable from the Public Internet.
Using Smitty:
On the server where the CD-ROM will be physically mounted:
Check the status of portmap and the NFS daemons:
Enter lssrc -s portmap.
Enter lssrc -g nfs.
If they are not active, start them by running startsrc -s portmap and then startsrc -g fs.
Mount the CD-ROM:
Enter mkdir /cdrom to create a mount point, if onedoes not already exist.
Load the CD into the CD-ROM drive.
Enter smitty cdrfs.
Select Add a CD-ROM File System.
Select your CD-ROM device from the F4 list.
Enter the mount point you just created for MOUNT POINT (/cdrom).
If you want the filesystem to mount on a reboot, change Mount AUTOMATICALLY at system restart to yes. Note: If you specify yes for Mount AUTOMATICALLY at system restart, you must have media in the CD-ROM drive when you reboot or the mount will fail.
Enter # mount /cdrom.
To add the filesystem for NFS exporting:
Enter smitty mknfsexp.
Enter the PATHNAME of the directory to export (for example, /cdrom).
Change the MODE of export directory to read-only.
Enter the HOSTS & NETGROUPS allowed client access (the IP address of the VLP target system).
Enter HOSTS allowed root access (the IP address of the VLP target system).
Press Enter to export the filesystem.
Note: If you are going to be installing on the client machine, you must enter the client name for HOSTS allowed root access.
Verify that the filesystem is exported:
Enter showmount -e and find it in the list.
On the VLP Target System Client:
Check the status of portmap and the NFS daemons:
Enter lssrc -s portmap.
Enter lssrc -g nfs.
If they are not active, start them by running startsrc -s portmap and then startsrc -g nfs.
Verify that the server has the filesystem exported:
Enter showmount -e . Note: will be the hostname of the server above.
Create the directory you will be using to access the software.
Enter
# mkdir /cdrom.
To NFS mount the filesystem on the client:
Enter smitty mknfsmnt.
Enter the PATHNAME of the mount point (for example, /cdrom).
Enter the PATHNAME of the remote directory (for example, /cdrom).
Enter the HOST (server IP address from above) where the remote directory resides.
Note: HOST will be the hostname of the server.
Change the MODE for this NFS file system to read-only.
Press enter to NFS mount the filesystem.
To swap CD-ROM’s:
:-# umount /mnt (to unmount the NFS filesystem)
:
: Change CD-ROM disk
:
:-# mount :/cdrom /mnt
:
:-Repeat for each CD-ROM disk to installed
To save repeated swapping of disks, all of the CD-ROMS contents could be copied to a directory on the servers local disk and then doing step 3 on the server to nfs export that directory. Then mount that nfs exported directory on the VLP target system. The steps are the same except after you create the /cdrom mount point.
Using commands from Command Line:
On the server with the CDROM drive
# mount /cdrom (assuming the cdrfs mount has been configured: see above notes)
# mknfsexp -d /cdrom -t ro -c -r -N
The next two steps must be done eveytime a CD-ROM is swapped from the drive:
On the VLP target system
# mount :/cdrom /mnt
Perform the necessary task on CDROM
# umount /mnt (to unmount the NFS filesystem)
Change CD-ROM disk
Repeat
When finished On the server with the CDROM drive (apollo)
# rmnfsexp -d /cdrom -B
Troubleshooting:
Look for the following errors:
mount: 1831-011 access denied for ...
mount: 1831-008 giving up on ...
If they occur, try the following suggestions:
Make sure that the client’s hostname and IP address are resolvable by the server. Also, make sure that the server’s hostname and IP address are resolvable by the client. You can do so by running the following:
On the server:
host host
The output of these lines has to match exactly.
On the client:
host host
The output of these lines has to match EXACTLY.
On the client, enter netstat -in. If there is more than one network interface, make sure all IP addresses of the client are resolvable by the server. You can do this by running (on the server): host
Execute this command for each IP address listed in the netstat -in output.
If you are still getting errors:
On the server, enter smitty rmnfsexp.
Enter the PATHNAME of the exported directory (for example, /cdrom).
Press Enter to remove the directory from the exports list.
Enter umount /cdrom.
Enter rmdir /cdrom.
Return to step 1 of the section “On the server”. If you still cannot get the CD-ROM NFS mounted, contact your AIX support center for further assistance.
31. How can I tell if the pSeries hardware supports the 64 bit kernel? How do I tell which version of the kernel I am running?
A: Hardware:
> bootinfo -y
64 -- The hardware supports 64 bit kernel.
Or
> /usr/sbin/prtconf -c
CPU Type: 64-bit
Kernel:
> bootinfo -K (32 - The AIX kernel is 32 bit).
> bootinfo -K (64 - The AIX kernel is 64 bit).
> getconf LONG_BIT
32. How can I change between the 32-bit kernel and 64-bit kernel on my AIX machine?
A: By default, AIX is set to a 32-bit kernel. To switch between a 32-bit mode and 64-bit mode, type these commands at the command line:
# ln -sf /usr/lib/boot/unix_64 /unix
# ln -sf /usr/lib/boot/unix_64 /usr/lib/ boot/unix
# bosboot -ad /dev/ipldevice
# shutdown -Fr
# bootinfo -K should now show 64
# ln -sf /usr/lib/boot/unix_mp /unix
# ln -sf /usr/lib/boot/uni x_mp /usr/lib/boot/unix
# bosboot -ad /dev/ipldevice
You now need to reboot your machine:
# shutdown -Fr
# bootinfo -K should now show 32
33. What command can I use to increase or decrease the amount of paging space provided to the AIX Operating System? Can I do this dynamically?
A: You can increase and decrease paging space dynamically. The command is “chps - d “ to decrease the amount of paging space. Use “chps -s “ to increase the amount of paging space.
i.e # chps -s 2 hd6
34. /var filesystem is full due to a very large file in /var/spool/mail/*. Can I delete it?
A: Files in /var/spool/mail are flat text files that serve as the user’s mailbox. You can just move them out of the way or zero them out, if not needed.
35. A fileset needs to be installed from a command line. How do I do this?
A: When installing from local directory, execute: installp –acgNX
36. All of the filesets in a directory are not showing up when I try to install them via smit, how do I fix this?
A: In the directory that contains the filesets issue the command:
inutoc . (The dot refers to the current directory.)
37. How do I remove a cron job?
A: Log in as the user running the cron job and run crontab -e. This screen will look like a page opened using the vi editor. Remove or comment out the job you do not want to run and save your changes.
38. How can I tell if I have a JFS2 (enhanced journal file system)?
A: Run one of the following commands:
# lsfs
or
# mount
39. How can I verify how much real memory is on the system?
A: Use the bootinfo command, which displays the system’s physical memory in kilobytes. Command: bootinfo –r
40. How can you determine which process is using up the most CPU time?
A: You can check the CPU time by piping the ps output through the sort command.
For example: ps -ef | sort -n +3
41. How do I get NFS-mounting with Linux to work?
A: Linux, by default, requires any NFS mount to use a reserved port below 1024. AIX, by default, uses ports above 1024. Use the following command to restrict AIX to the reserved port range:
# /usr/sbin/nfso -o nfs_use_reserved_ports=1
For more information on this topic, refer to the AIX 5L Version 5.2 System Management Guide:
Communications and Networks, select Network File System and SMBFS, then select SMBFS.
42. How do I increase the factor size for a Volume group?
A: AIX V4 and later versions relaxed the limitation of 1016 physical partitions per physical volume, by introducing the concept of a volume group factor. When creating a volume group, you can specify your own PP/PV limitation, in multiples of 1016 (that is, 1016, 2032, 3048, etc). This is done via the -t flag on mkvg.
For example, the following command will create a volume group that will allow up to 2032 PPs/PV with the default PP size of 4MB at AIX V4. In AIX V5, mkvg automatically determines the PP size if one is not specified.
mkvg -y VGname -t 2 hdisk1
The disadvantage is that increasing the number of PPs allowed per disk will limit the number of disks allowed in the volume group. If the 1016 PP/PV limit is maintained, you can add up to 32 physical volumes in a standard volume group or up to 128, if it is a “BIG” volume group.
The chvg command also has a -t flag to allow you to change the max PPs/PV limit on an existing volume group, so that a larger drive could be added at that point.
Example:
chvg -t 2 VGname
Only volume groups that have been created with a factor size other than 1, or that have been to a new factor size, can exceed the 1016 PP/PV limit.
Any volume group created outside the default factor size or changed to a different factor Cannot be used on systems prior to AIX 4.3.1, even if the factor size is later changed back to 1. An example of the error received when accessing the volume group will look like the following:
0516-002 lqueryvg: The volume group version is incompatible with this level of the operating system and cannot be activated.
Note: These options are only available from the command line, not from SMIT.
43. How do you change the system time?
A: Enter: Smitty
Select System Environments.
Select Change/Show Date, Time, and Time Zone.
Select Change/Show Date and Time.
Change your values accordingly and hit Enter to commit your changes.
44. How do you check the maximum number of processes per user?
A: Use the lsattr command. Enter: lsattr -El sys0
45. I installed a rpm package, and files were successfully installed, but rpm -qa did not list the package. How do I solve this issue?
A: If you know that the package is installed, you can run:
# rpm -U—justdb
This will only update the rpm database and not install any new files. You can then verify the database was updated.
# rpm -qa
(Check to see if the package is now listed.)
Also check for package integrity.
# rpm –V
46. What do I do with defunct processes?
A: Defunct processes, also called zombies, can accumulate in your process table when an application forks several child processes and does not exit. If this becomes a problem, the simplest solution is to modify the application so its sigaction subroutine ignores the SIGCHLD signal. The child processes will then exit normally when they are finished and will not accumulate as defunct processes in your process table.
For more information, see the sigaction subroutine description in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions, Volume 2.
47. What file shows executed cron jobs?
A: The file /var/adm/cron/log shows all executed cron jobs.
48. What is the maximum number of servers allowed for asynchronous I/O?
A: The maximum number of servers for asynchronous I/O is 1000.
49. Why am I seeing high CPU utilization for the KPROC process named wait?
A: The wait process runs when there are no processes available for execution, or when the CPU is waiting for I/Os to disk. If there are no I/Os pending to a local disk, all time charged to the wait process is classified as idle time.
On a uniprocessor system, the process ID for the single wait process is 516. On a SMP system, one wait process exists for each processor.
If the ps report shows a high aggregate time for this process, it simply means there were significant periods of time when no other process was ready to run on the CPU, or the system was spending time waiting for pending disk I/Os.
For more information on this topic, see the pSeries Information Center.
50. Will my machine run the 64-bit kernel?
A: 64-bit hardware is required to run the 64-bit kernel. For AIX 5.2, all IBM eServer pSeries 64-bit hardware can run either the 64-bit kernel or the 32-bit kernel. To verify the processor capability, run the following command:
# /usr/sbin/prtconf -c
The command will return “32” or “64” depending on the capability of the system. If your system does not have the prtconf command, you can use the bootinfo -y command.
In AIX 5.2, the 32-bit kernel is installed by default. The 64-bit kernel, along with JFS2 (enhanced journaled file system), can be enabled at installation time.
51. Why am I unable to run the Visual Age compilers? Why can’t I run xlC or xlC_r7?
A: You need make sure your path is set to include /usr/vac/bin.
export PATH=$PATH:/usr/vac/bin
This should be in your profile in your home directory as well. When running “cc” it should invoke the c++ compiler. Also, gcc is installed as well. All of the compilers are lower case (i.e. xlc, xlc_r7). You may also add /usr/vacpp/bin to your PATH to enable the use of the older style naming conventions (i.e. xlC, xlC_r7).
52. How can I get EN_US.UTF-8 locale installed on my reservation?
A: EN_US.UTF-8 locale is pre-installed on AIX 6.1 and AIX 7.1 reservations. Hence, the application requesting for the availability of EN_US.UTF-8, should be configured for the locale usage.
A: Advanced Interactive eXecutive.
2. How can I restart the SSHD service?
A: Please use the following commands to stop and restart the SSHD service:
stopsrc -s sshd
startsrc -s sshd
3. How can I copy the contents of one file system to another?
A: Use the cp command with the recursive flag set. (cp –R).
4. How do I enable telnet sessions on my reserved VLP system?
A: By default telnet is disabled on the reserved VLP system. Please use the following commands to start/stop the telnet service:
startsrc –s telnet
stopsrc –s telnet
5. How can I enable FTP service on my reserved VLP system?
A: By default FTP service is disabled on the reserved VLP system. Please use the following commands to start/ stop the FTP service:
startsrc –t ftp
stopsrc –t ftp
6. Is there a menu driven way to configure AIX, install programs, etc?
A: Yes, type in the command smit or smitty to access the menu driven AIX configuration utility.
7. What is the purpose of proc file system in the root directory?
A: The proc file system is a mounted file system used to trace a process system call, receive signals, and incurred machine faults.
8. Where can I get more AIX “How To”?
A: Visit the User “How-To” section of the Information Center:http://publib.boulder.ibm.com/infocenter/systems/scope/aix/index.jsp
9. Where can I get more Application Developer help online?
A: Please visit the Software Products section of the IBM Web site: http://www-01.ibm.com/software/sw-bycategory/
10. Where can I get the latest AIX toolbox for Linux Applications?
A: Visit the AIX Toolbox for Linux Applications Web site. http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html
11. Where can I read more about AIX and Linux Interoperability?
A: Please refer to the IBM redbook AIX and Linux Interoperability.
12. Where can I read more about running Linux Applications on AIX?
A: Please refer to the IBM Redbook Linux Applications on System p
13. Where can I read reference material on AIX 5L troubleshooting and problem solving?
A: Please refer to the IBM Redbook Problem Solving and Trouble shooting in AIX5L
14. Why Can’t I Kill My Process?
A: To kill a process sometimes it is necessary to eliminate a process entirely. This is the purpose of the kill command. The syntax of the kill command, which is actually a general purpose process signaling utility, is as follows:
kill [-signal] PID
The kill command (or kill -15 which is the default signal) sends a SIGTERM signal to a process. This signal can be trapped, thus ignored by a process. The kill -9 command sends a SIGKILL command to the process. If the process is currently in USER mode, this signal cannot be caught or trapped and the process will terminate. Occasionally, processes will not die even after being sent the kill signal. The majority of such processes fall into one of the following categories: Zombies. A process in the zombie state (displayed as Z status in BSD ps displays and as under System V). A zombie process is one in which all its resources have been freed, but the parent process’s acknowledgment has not occurred. Zombies are always cleared the next time the system is booted and do not adversely affect system performance. Processes in kernel mode waiting for unavailable resources.
There are two modes a process can be in, USER mode and KERNEL mode. The process goes into kernel mode anytime it needs to access system functions via a system call routine. While in the kernel mode, signals are ignored until the system call exits back to user mode. At that time, any pending signals are handed to the user process. If while in kernel mode, the process goes to sleep while waiting on a resource and the resource never becomes available, the process will never exit kernel mode. The only way to kill a process that is “ignoring” or “sleeping” in kernel mode is to restart the system.
Note: Signals are defined in the /usr/include/signal.h file and the command kill -l may be used to generate a list of their symbolic names, delivery of signals to a system call.The kernel delays the delivery of all signals, including SIGKILL, when starting a system call, device driver, or other kernel extension. The signal takes effect upon leaving the kernel and returning from the system call. This happens when the process returns to the user protection domain, just before running the first instruction at the caller return address.
15. Will my 64-bit application run on the 32-bit kernel?
A: Most likely. The environment in which the application was built has no bearing on where it can run. Compiler switches are available to create either a 32-bit or a 64-bit executable program from program source code when compiled on either the 32-bit kernel or the 64-bit kernel. In addition, 32-bit programs and 64-bit programs can both be run on either the 32-bit kernel or the 64-bit kernel. However, if your application needs the use of a kernel extension (a program that extends the kernel and may, for example, provide a new system call for the application) which is not supported on both the 32- and 64-bit kernels, your application will only run with the kernel supported by the kernel extension.
16. How do I install applications from the /stage/middleware directory?
A: Some of the applications are in the AIX lppsource format and they can be installed with “smitty install”. You can tell if it is this type of install if there is a “.toc” file in the directory. If the application is in the tar format, you must move it to another directory to uncompress and untar the files. Then you can install the application. You need to have root authority to do this.
17. Is there a program I can use to monitor system performance?
A: Yes, the NMON program works for AIX and LINUX. You can find out more information and download it from IBM Developer works.
18. Error “Could not chdir to home directory /home/u000XXXX: The file access permission does not allow the specified action.” What is the resolution?
A: Make sure the directory ownership on /home/u000XXXX is set as u000XXXX:staff
If not, you can correct it by using the command: chown <u000XXXX:staff> </home/u000XXXX>. You should be a root user while issuing this command.
19. How to configure temp space on the reserved VLP System?
A: The temp space is already configured as a volume group and labeled as tempvg. To create a filesystem on this volume group follow the below directions:
1. Type smitty jfs or smitty jfs2, depending upon which type of filesystem you want to configure.
2. Select Add a Journaled File System.
3. Select Add a Standard Journaled File System and press Enter.
4. You should see 2 Volume Groups to choose from, rootvg and tempvg. Select tempvg and press Enter.
5. Change Unit Size from Megabytes to Gigabytes by pressing the Tab key.
6. In the “Number of units” section, enter how many Gigabytes you
would like this filesystem to be. i.e. if you want this to be a 30 GB
filesystem, you would enter 30.
7. Change “Mount AUTOMATICALLY at system restart?” to Yes by pressing the Tab Key.
8. Press Enter and it should configure the Filesystem.
20. How do I increase the size of an AIX filesystem?
A: To increase the size of filesystem, use the command chfs.
chfs -a size=+’size to be increased in MB or GB’ /FS
Where FS is the name of filesystem.
Example 1: To increase the filesystem of /usr/temp01 with 512MB,
The command would be: chfs -a size=+512M /usr/temp01
Example 2: To increase the filesystem of /tmp by 2GB,
The command would be: chfs -a size=+2G /tmp.
21. When using smitty can I see the command line equivalent for the smit menu selection?
A: Yes, press the F6 (Function Key + 6) to see the corresponding command
22. Are there Linux tools I can run on the AIX system?
A: Yes, the Linux Toolbox for AIX is located in the /stage/middleware/AIX/linux_tools directory. They can be installed with the rpm command.
23. Does OpenSSH come with AIX?
A: OpenSSH is a free software tool that supports SSH1 and SSH2 protocols. It’s reliable and secure and is widely accepted in the IT industry to replace the r-commands, telnet, and ftp services, providing secure encrypted sessions between two hosts over the network. OpenSSH_5.2p1 is available on the AIX 7.1, OpenSSH_5.4p1 on AIX 6.1 and OpenSSH_5.2p1 on AIX 5.3 reservations.
24. How do I start a CDE session using the VPN?
A: To start a CDE (common desktop environment) session on AIX using the VPN client, you need to follow these steps:
1. Start the VPN appliance and log in with your User ID and Password. You should see the Lock icon on the bottom right hand corner of your screen to show that VPN connection is established.
2. Bring up a terminal emulator such as PuTTY and SSH to your Reserved VLP Server.
3. Start the VNC server using the command: vncserver.
In case you encounter difficulties starting the VNC server, you need to follow these steps:
1. Edit “/opt/freeware/bin/vncserver” file. Go to the following section:
1. Edit “/opt/freeware/bin/vncserver” file. Go to the following section:
# Add font path and color database stuff here, e.g.:
#
# $cmd .= “ -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/”;
# $cmd .= “ -co /usr/lib/X11/rgb”;
#
# $cmd .= “ -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/”;
# $cmd .= “ -co /usr/lib/X11/rgb”;
Uncomment the third line, and change it to: $cmd .= “ -fp
/usr/lib/X11/fonts/:/usr/lib/X11/fonts/misc/:/usr/lib/X11/fonts/75dpi/”;
/usr/lib/X11/fonts/:/usr/lib/X11/fonts/misc/:/usr/lib/X11/fonts/75dpi/”;
2. Edit the file /.vnc/xstartup, and comment out this line “twm &”, and add this line:
# This line gives you a CDE desktop when you sign on to VNC
/usr/dt/bin/dtsession &
3. Ensure that all the files except xstartup are removed from /.vnc directory.
# This line gives you a CDE desktop when you sign on to VNC
/usr/dt/bin/dtsession &
3. Ensure that all the files except xstartup are removed from /.vnc directory.
4. Also ensure that all the directories are removed in the/tmp/.X11-unix directory.
5. Now start your VNC server and it will pick up the changes made. Type: vncserver
6. Start the VNC Viewer client such as RealVNC or TightVNC. In the Server or destination field, type the IP address of your Reserved VLP Server:port number. For example: 172.29.13X.XXX:1. 6. The VNC Viewer client will ask you for you VNC password, enter your VNC password. Once authenticated, CDE session would be started.
25. How do I start a CDE session using SSH?
A: To start a CDE (common desktop environment) session on AIX using the SSH Gateway:
1. Access your reserved VLP system using SSH gateway.
In case you encounter difficulties starting the VNC server you need to follow these steps:
a) Edit “/opt/freeware/bin/vncserver” file. Go to the following section:
# Add font path and color database stuff here, e.g.:
#
# $cmd .= “ -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/”;
# $cmd .= “ -co /usr/lib/X11/rgb”;
# Add font path and color database stuff here, e.g.:
#
# $cmd .= “ -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/”;
# $cmd .= “ -co /usr/lib/X11/rgb”;
Uncomment the third line, and change it to: $cmd .= “ -fp
/usr/lib/X11/fonts/:/usr/lib/X11/fonts/misc/:/usr/lib/X11/fonts/75dpi/”;
b) Edit the file /.vnc/xstartup, and comment out this line “twm &”, and add this line:
# This line gives you a CDE desktop when you sign on to VNC
/usr/dt/bin/dtsession &
c) Ensure that all the files except xstartup are removed from /.vnc directory.
d) Also ensure that all the directories are removed in the/tmp/.X11-unix directory.
e) Now exit from the reservation.
2. From the SSH gateway, establish an SSH Tunnel and forward the VNC Server port.
For Example: ssh -4gL {tunnel_port}:{reserved_server_ip_address}:5901 {reserved_server_user_id}@{reserved_server_ip_address}
ssh -4gL 20099:172.29.1XX.XX:5901 u000XXXX@172.29.1XX.XX
3. Start your VNC Viewer client such as RealVNC or TightVNC. In the Server or destination field, type the IP address of the SSH Gateway: port forwarded on SSH Gateway.
For example: 198.81.193.104:20099.
4. The VNC Viewer client will ask you for your VNC password, enter your VNC password and your VNC session will start with the CDE desktop.
26. How can I change the hostname of my reserved VLP system?
A: The hostname for the reserved VLP AIX system can be changed by any of the following procedures:
1. You may use the command ‘hostname myhost01’
2. You may edit the /etc/resolv.conf file to make the changes permanently effective for the duration over which the reservation is in Active state. You may use the following format to add the necessary attributes to the /etc/resolv.conf file for changing the hostname and domainname for a given IP address: `IP_address hostname domainname`
3. You to use the command ‘smitty tcpip’. The command would provide you with the option to edit the already configured hostname. The steps are as follows:
- Run the command smit tcpip.
- Select minimum configuration
-
Select en0 and change the hostname.
A: In order to create a 64-bit binary, you should use GCC with the -maix64 argument. For example, gcc -maix64.
28. Why do the file /var/log/lastlog consume so much disk space?
A: When you log in to a UNIX system, the file shows who last logged in. That information is stored in a binary file called lastlog. Each user has their personal record; UID 8 is at record 8, UID 239 at record 239, and so on. This is a feature of UNIX called “sparse file”. The /var/log/lastlog file main purpose includes spooling directories and files, administrative and logging data, and transient and 20 temporary files. Run ‘du’ on it to see how much actual disk space it occupies. The file can be removed.
29. Why do I receive errors about libc.a(aio.o) while running db2start on AIX?
Or
How do I resolve the following error I get when running db2start? “exec(): 0509-036 cannot load program db2start because of the following errors: 0509-130 Symbol resolution failed for /usr/lib/threads/libc.a(aio.o)”
A: When the asynchronous I/O is turned off and you may encounter the following error when you try to run db2start:
0509-130 Symbol resolution failed for /usr/lib/threads/libc.a(aio.o) because:
0509-136 Symbol kaio_rdwr (number 0) is not exported from dependent module /unix.
0509-136 Symbol listio (number 1) is not exported from dependent module /unix.
0509-136 Symbol acancel (number 2) is not exported from dependent module /unix.
0509-136 Symbol iosuspend (number 3) is not exported from dependent module /unix.
0509-136 Symbol aio_nwait (number 4) is not exported from dependent module /unix.
0509-192 Examine .loader section symbols with the ‘dump -Tv’ command.
To turn ON asynchronous I/O:
1. smitty aio.
2. Change / Show Characteristics of Asynchronous I/O.
3. Set “STATE to be configured at system restart” to “available”.
4. Apply the changes, reboot the AIX box.
30. How can I NFS mount my local CD-ROM to my VLP system?
A: Following are the steps required to mount a CD-ROM as a cdrom filesystem, export the NFS filesystem from the server, and NFS mount the filesystem on the client. This assumes the server with the CD-ROM is an AIX system with 4.3 or above.
This also assumes that the VLP target system can reach the server with the CD-ROM on the network, for some this would be via the VPN-VPN connection or the server must be reachable from the Public Internet.
Using Smitty:
On the server where the CD-ROM will be physically mounted:
Check the status of portmap and the NFS daemons:
Enter lssrc -s portmap.
Enter lssrc -g nfs.
If they are not active, start them by running startsrc -s portmap and then startsrc -g fs.
Mount the CD-ROM:
Enter mkdir /cdrom to create a mount point, if onedoes not already exist.
Load the CD into the CD-ROM drive.
Enter smitty cdrfs.
Select Add a CD-ROM File System.
Select your CD-ROM device from the F4 list.
Enter the mount point you just created for MOUNT POINT (/cdrom).
If you want the filesystem to mount on a reboot, change Mount AUTOMATICALLY at system restart to yes. Note: If you specify yes for Mount AUTOMATICALLY at system restart, you must have media in the CD-ROM drive when you reboot or the mount will fail.
Enter # mount /cdrom.
To add the filesystem for NFS exporting:
Enter smitty mknfsexp.
Enter the PATHNAME of the directory to export (for example, /cdrom).
Change the MODE of export directory to read-only.
Enter the HOSTS & NETGROUPS allowed client access (the IP address of the VLP target system).
Enter HOSTS allowed root access (the IP address of the VLP target system).
Press Enter to export the filesystem.
Note: If you are going to be installing on the client machine, you must enter the client name for HOSTS allowed root access.
Verify that the filesystem is exported:
Enter showmount -e and find it in the list.
On the VLP Target System Client:
Check the status of portmap and the NFS daemons:
Enter lssrc -s portmap.
Enter lssrc -g nfs.
If they are not active, start them by running startsrc -s portmap and then startsrc -g nfs.
Verify that the server has the filesystem exported:
Enter showmount -e . Note: will be the hostname of the server above.
Create the directory you will be using to access the software.
Enter
# mkdir /cdrom.
To NFS mount the filesystem on the client:
Enter smitty mknfsmnt.
Enter the PATHNAME of the mount point (for example, /cdrom).
Enter the PATHNAME of the remote directory (for example, /cdrom).
Enter the HOST (server IP address from above) where the remote directory resides.
Note: HOST will be the hostname of the server.
Change the MODE for this NFS file system to read-only.
Press enter to NFS mount the filesystem.
To swap CD-ROM’s:
:-# umount /mnt (to unmount the NFS filesystem)
:
: Change CD-ROM disk
:
:-# mount :/cdrom /mnt
:
:-Repeat for each CD-ROM disk to installed
To save repeated swapping of disks, all of the CD-ROMS contents could be copied to a directory on the servers local disk and then doing step 3 on the server to nfs export that directory. Then mount that nfs exported directory on the VLP target system. The steps are the same except after you create the /cdrom mount point.
Using commands from Command Line:
On the server with the CDROM drive
# mount /cdrom (assuming the cdrfs mount has been configured: see above notes)
# mknfsexp -d /cdrom -t ro -c -r -N
The next two steps must be done eveytime a CD-ROM is swapped from the drive:
On the VLP target system
# mount :/cdrom /mnt
Perform the necessary task on CDROM
# umount /mnt (to unmount the NFS filesystem)
Change CD-ROM disk
Repeat
When finished On the server with the CDROM drive (apollo)
# rmnfsexp -d /cdrom -B
Troubleshooting:
Look for the following errors:
mount: 1831-011 access denied for ...
mount: 1831-008 giving up on ...
If they occur, try the following suggestions:
Make sure that the client’s hostname and IP address are resolvable by the server. Also, make sure that the server’s hostname and IP address are resolvable by the client. You can do so by running the following:
On the server:
host host
The output of these lines has to match exactly.
On the client:
host host
The output of these lines has to match EXACTLY.
On the client, enter netstat -in. If there is more than one network interface, make sure all IP addresses of the client are resolvable by the server. You can do this by running (on the server): host
Execute this command for each IP address listed in the netstat -in output.
If you are still getting errors:
On the server, enter smitty rmnfsexp.
Enter the PATHNAME of the exported directory (for example, /cdrom).
Press Enter to remove the directory from the exports list.
Enter umount /cdrom.
Enter rmdir /cdrom.
Return to step 1 of the section “On the server”. If you still cannot get the CD-ROM NFS mounted, contact your AIX support center for further assistance.
31. How can I tell if the pSeries hardware supports the 64 bit kernel? How do I tell which version of the kernel I am running?
A: Hardware:
> bootinfo -y
64 -- The hardware supports 64 bit kernel.
Or
> /usr/sbin/prtconf -c
CPU Type: 64-bit
Kernel:
> bootinfo -K (32 - The AIX kernel is 32 bit).
> bootinfo -K (64 - The AIX kernel is 64 bit).
> getconf LONG_BIT
32. How can I change between the 32-bit kernel and 64-bit kernel on my AIX machine?
A: By default, AIX is set to a 32-bit kernel. To switch between a 32-bit mode and 64-bit mode, type these commands at the command line:
# ln -sf /usr/lib/boot/unix_64 /unix
# ln -sf /usr/lib/boot/unix_64 /usr/lib/ boot/unix
# bosboot -ad /dev/ipldevice
# shutdown -Fr
# bootinfo -K should now show 64
# ln -sf /usr/lib/boot/unix_mp /unix
# ln -sf /usr/lib/boot/uni x_mp /usr/lib/boot/unix
# bosboot -ad /dev/ipldevice
You now need to reboot your machine:
# shutdown -Fr
# bootinfo -K should now show 32
33. What command can I use to increase or decrease the amount of paging space provided to the AIX Operating System? Can I do this dynamically?
A: You can increase and decrease paging space dynamically. The command is “chps - d “ to decrease the amount of paging space. Use “chps -s “ to increase the amount of paging space.
i.e # chps -s 2 hd6
34. /var filesystem is full due to a very large file in /var/spool/mail/*. Can I delete it?
A: Files in /var/spool/mail are flat text files that serve as the user’s mailbox. You can just move them out of the way or zero them out, if not needed.
35. A fileset needs to be installed from a command line. How do I do this?
A: When installing from local directory, execute: installp –acgNX
36. All of the filesets in a directory are not showing up when I try to install them via smit, how do I fix this?
A: In the directory that contains the filesets issue the command:
inutoc . (The dot refers to the current directory.)
37. How do I remove a cron job?
A: Log in as the user running the cron job and run crontab -e. This screen will look like a page opened using the vi editor. Remove or comment out the job you do not want to run and save your changes.
38. How can I tell if I have a JFS2 (enhanced journal file system)?
A: Run one of the following commands:
# lsfs
or
# mount
39. How can I verify how much real memory is on the system?
A: Use the bootinfo command, which displays the system’s physical memory in kilobytes. Command: bootinfo –r
40. How can you determine which process is using up the most CPU time?
A: You can check the CPU time by piping the ps output through the sort command.
For example: ps -ef | sort -n +3
41. How do I get NFS-mounting with Linux to work?
A: Linux, by default, requires any NFS mount to use a reserved port below 1024. AIX, by default, uses ports above 1024. Use the following command to restrict AIX to the reserved port range:
# /usr/sbin/nfso -o nfs_use_reserved_ports=1
For more information on this topic, refer to the AIX 5L Version 5.2 System Management Guide:
Communications and Networks, select Network File System and SMBFS, then select SMBFS.
42. How do I increase the factor size for a Volume group?
A: AIX V4 and later versions relaxed the limitation of 1016 physical partitions per physical volume, by introducing the concept of a volume group factor. When creating a volume group, you can specify your own PP/PV limitation, in multiples of 1016 (that is, 1016, 2032, 3048, etc). This is done via the -t flag on mkvg.
For example, the following command will create a volume group that will allow up to 2032 PPs/PV with the default PP size of 4MB at AIX V4. In AIX V5, mkvg automatically determines the PP size if one is not specified.
mkvg -y VGname -t 2 hdisk1
The disadvantage is that increasing the number of PPs allowed per disk will limit the number of disks allowed in the volume group. If the 1016 PP/PV limit is maintained, you can add up to 32 physical volumes in a standard volume group or up to 128, if it is a “BIG” volume group.
The chvg command also has a -t flag to allow you to change the max PPs/PV limit on an existing volume group, so that a larger drive could be added at that point.
Example:
chvg -t 2 VGname
Only volume groups that have been created with a factor size other than 1, or that have been to a new factor size, can exceed the 1016 PP/PV limit.
Any volume group created outside the default factor size or changed to a different factor Cannot be used on systems prior to AIX 4.3.1, even if the factor size is later changed back to 1. An example of the error received when accessing the volume group will look like the following:
0516-002 lqueryvg: The volume group version is incompatible with this level of the operating system and cannot be activated.
Note: These options are only available from the command line, not from SMIT.
43. How do you change the system time?
A: Enter: Smitty
Select System Environments.
Select Change/Show Date, Time, and Time Zone.
Select Change/Show Date and Time.
Change your values accordingly and hit Enter to commit your changes.
44. How do you check the maximum number of processes per user?
A: Use the lsattr command. Enter: lsattr -El sys0
45. I installed a rpm package, and files were successfully installed, but rpm -qa did not list the package. How do I solve this issue?
A: If you know that the package is installed, you can run:
# rpm -U—justdb
This will only update the rpm database and not install any new files. You can then verify the database was updated.
# rpm -qa
(Check to see if the package is now listed.)
Also check for package integrity.
# rpm –V
46. What do I do with defunct processes?
A: Defunct processes, also called zombies, can accumulate in your process table when an application forks several child processes and does not exit. If this becomes a problem, the simplest solution is to modify the application so its sigaction subroutine ignores the SIGCHLD signal. The child processes will then exit normally when they are finished and will not accumulate as defunct processes in your process table.
For more information, see the sigaction subroutine description in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions, Volume 2.
47. What file shows executed cron jobs?
A: The file /var/adm/cron/log shows all executed cron jobs.
48. What is the maximum number of servers allowed for asynchronous I/O?
A: The maximum number of servers for asynchronous I/O is 1000.
49. Why am I seeing high CPU utilization for the KPROC process named wait?
A: The wait process runs when there are no processes available for execution, or when the CPU is waiting for I/Os to disk. If there are no I/Os pending to a local disk, all time charged to the wait process is classified as idle time.
On a uniprocessor system, the process ID for the single wait process is 516. On a SMP system, one wait process exists for each processor.
If the ps report shows a high aggregate time for this process, it simply means there were significant periods of time when no other process was ready to run on the CPU, or the system was spending time waiting for pending disk I/Os.
For more information on this topic, see the pSeries Information Center.
50. Will my machine run the 64-bit kernel?
A: 64-bit hardware is required to run the 64-bit kernel. For AIX 5.2, all IBM eServer pSeries 64-bit hardware can run either the 64-bit kernel or the 32-bit kernel. To verify the processor capability, run the following command:
# /usr/sbin/prtconf -c
The command will return “32” or “64” depending on the capability of the system. If your system does not have the prtconf command, you can use the bootinfo -y command.
In AIX 5.2, the 32-bit kernel is installed by default. The 64-bit kernel, along with JFS2 (enhanced journaled file system), can be enabled at installation time.
51. Why am I unable to run the Visual Age compilers? Why can’t I run xlC or xlC_r7?
A: You need make sure your path is set to include /usr/vac/bin.
export PATH=$PATH:/usr/vac/bin
This should be in your profile in your home directory as well. When running “cc” it should invoke the c++ compiler. Also, gcc is installed as well. All of the compilers are lower case (i.e. xlc, xlc_r7). You may also add /usr/vacpp/bin to your PATH to enable the use of the older style naming conventions (i.e. xlC, xlC_r7).
52. How can I get EN_US.UTF-8 locale installed on my reservation?
A: EN_US.UTF-8 locale is pre-installed on AIX 6.1 and AIX 7.1 reservations. Hence, the application requesting for the availability of EN_US.UTF-8, should be configured for the locale usage.
No comments:
Post a Comment