• No results found

Using standard AIX and the snap command

In document Migration Guide (Page 76-79)

Chapter 4. Planning and preparation

4.5 Documentation of existing environment

4.5.1 Using standard AIX and the snap command

Using a snap command, you can obtain the most important system information. It was originally designed as a problem determination tool for support staff to assist customers with problems when troubleshooting their system. Almost all

system-related information is captured and stored in the /tmp/ibmsupt directory. It is a very valuable source of information. We recommend that you run the snap

command before and after the migration and check to see if there are any differences in the configuration that might be of any concern to your production environment.

Even though the information collected is very useful, you might not like the format of the output files. Therefore, our recommendation is to run the snap command prior to starting your migration progress. If you feel fine about the output, go ahead and use it to document your AIX system. If you rather write your own script, you may still like to collect some of the main important commands that run using snap, as shown in Example 4-5 on page 60 and in Example 4-6 on page 60.

To capture all system information, enter the snap -a command as root. The command runs for several minutes, depending on the complexity and performance of your machine. There is temporary disk space of about 8 MB required to execute all commands. There are several different options that enable you to gather only some of the information. For detailed information on

Chapter 4. Planning and preparation 59

possible flags and options, refer to the AIX Version 4.3 Commands Reference,

Volume 5, SC23-4119, which can be found at:

http://publib.boulder.ibm.com/cgi-bin/ds_form?lang=en_US

We will not show you an example of a complete system configuration collected using the snap command, because it is too detailed. However, we want to give you some idea of the output files. We have included two of them in Appendix A, “Hardware and fileset support with AIX 5L” on page 197. These include all the information you see in the filesys.snap and tcpip.snap files. As mentioned before, you find the output directories of all gathered information by running snap in /tmp/ibmsupt, if not specified differently. This is shown below in Example 4-4.

Example 4-4 Output directories after running the snap command # ls -al /tmp/ibmsupt

drwx--- 19 root system 512 Jan 29 16:33 . drwxrwxrwt 8 bin bin 1024 Feb 04 12:40 .. drwx--- 2 root system 512 Jan 29 16:35 XS25 drwx--- 2 root system 512 Jan 29 16:35 async drwx--- 2 root system 512 Jan 29 16:35 dump drwx--- 2 root system 512 Jan 29 16:35 filesys drwx--- 2 root system 1024 Jan 29 16:33 general drwx--- 2 root system 512 Jan 29 16:35 install drwx--- 2 root system 512 Jan 29 16:35 kernel drwx--- 2 root system 512 Jan 29 16:35 lang drwx--- 2 root system 512 Jan 29 16:35 lvm drwx--- 2 root system 512 Jan 29 16:35 nfs drwx--- 2 root system 512 Jan 29 16:33 other drwx--- 2 root system 512 Jan 29 16:35 printer drwx--- 2 root system 512 Jan 29 16:35 sna drwx--- 2 root system 512 Jan 29 16:35 ssa drwx--- 2 root system 512 Jan 29 16:35 tcpip drwx--- 2 root system 512 Jan 29 16:33 testcase drwx--- 2 root system 512 Jan 29 16:33 wlm

We choose to look at the filesys directory as an example. In this directory, you find a filesys.snap file, which contains all information to do with file systems. A collection of the commands used to obtain this information is displayed in Example 4-5 on page 60. It gives you an idea of the amount of information gathered. For the complete output of the filesys.snap file, refer to Appendix A, “Hardware and fileset support with AIX 5L” on page 197. Some of the commands shown below will be explained in more detail in 4.5.2, “Documenting your hardware” on page 61. Additional Logical Volume Manager (LVM) information collected by the snap command can be found at /tmp/ibmsupt/lvm/lvm.snap on your machine after you run the snap command.

Example 4-5 Collection of commands used to obtain the filesys.snap file df -k mount lsfs -l lsvg lsvg -p rootvg lsvg | xargs lsvg -l lspv -l hdisk0 lspv -l hdisk1 lslv -l hd5 lslv -l hd6 lslv -l hd9var lsattr -El hdisk0 lsattr -El hdisk1

We show another sample collection of commands in Example 4-6. We now collect all network related information in the tcpip directory. You find the gathered information in the tcpip.snap output file. We show, in this section only, the commands used rather than the complete output. For the complete output, refer to Appendix A, “Hardware and fileset support with AIX 5L” on page 197.

Example 4-6 Collection of commands used to obtain the tcpip.snap file lssrc -a netstat -m netstat -in netstat -v netstat -s netstat -an netstat -sr netstat -nr no -a

As you can see, the commands used as part of the snap analysis are well-known AIX commands. Many of these commands begin with the letters ‘ls’ for listing system information. It is a nice collection of commands that you can either select to write your own script with or which you can run as they are using the snap

command to document your environment. The easiest and quickest way is to use the pre setup snap command. This gives you confidence knowing for sure that all needed important information is selected prior to your operating system

Chapter 4. Planning and preparation 61

In document Migration Guide (Page 76-79)