The First Step in Troubleshooting

Edit: Do you use snap or zsnap more often?

Originally posted September 1, 2015 on AIXchange

If you work on AIX (which you surely do if you’re reading this) and you’ve worked with IBM Support, you’ve probably used the snap command.

But are you familiar with the zsnap command?

The zsnap command is a supplemental tool used by AIX support personnel to gather debugging data. Built around the standard AIX snap command, the zsnap command gathers additional information that the snap command does not provide. You can also use the zsnap command to send a testcase directly to IBM from the machine that generated the testcase data. If needed, the zsnap command can fork multiple calls to the snap command, which results in quicker data gathering than if done via snap.

IBM has a web page that walks you through the troubleshooting process and also demonstrates the many uses of the zsnap command. This page brings you to the index:

    MustGather index
    Cluster AIX Aware problems [CAA]
    Filesystems
    JAVA on AIX
    Installation problems
    Logical Volume Manager problems
    NFS specific problems
    NIM problems
    PowerHA (HACMP) problems
    PowerVM Virtual I/O Server problems
    SAN or device I/O problems
    System crash
    TCP/IP problems

Each entry links to different procedures for gathering information. The MustGather index is a nice place to start if you’re unsure which zsnap options you should use, but all the links display different methods for using zsnap to collect information.

For example, the first entry with CAA issues states:

Using zsnap for CAA
Run # zsnap –CAA
This zsnap command gathers CAA data and creates the testcase file in one step. If you already have a PMR number, see the example below.

+Data
In addition to the information gathered by the snap command, the zsnap command gathers CAA data that include:

    bootstrap repository information
    detailed repository disk data
    CAA tunables data
    lscluster -i, -c, -s, -d, -m
    uname system information
    swinfo information
    CAA syslog log
    +Example

See zsnap usage for all available options.
# zsnap –CAA –pmr 12345,123,123

The example gathers the appropriate data and creates a testcase file with the IBM standard naming convention for quicker processing. You will be prompted to send the file to IBM using the FTP protocol. If you don’t have a PMR number, omit the –pmr flag to build the testcase file.
You can also run the zsnap command from the AIX SMIT menus.

Using snap for CAA
The snap command is the standard AIX tool that gathers data and stores that information in /tmp/ibmsupt/. There are two flags that can be used to gather CAA data with snap: snap caa or snap -e.

+Data
To reduce the possibility of needing to request additional information later, the following information needs to be gathered manually and included in the snap testcase file.
See zsnap Data section above for the information you need to collect.

+Sample snap procedure for CAA
See snap usage for all available options
Follow these steps to gather the CAA data.
1. Run the snap -r command to remove all previously gathered data.
2. Gather the additional information and put it in /tmp/ibmsupt/testcase. You may need to recreate the testcase directory.
3. Run # snap caa or snap -e
4. Rename the testcase file to adhere to IBM testcase file naming conventions, and then send the file to IBM.

Here are some specific zsnap commands you can use:

    For filesystems: zsnap –FS
    For installation issues: zsnap –INSTALL, or zsnap –NIM
    For LVM issues: zsnap –LVM

Each link gives you the data that is captured and examples for using the command. For completeness there is also:

    zsnap –SAN
    zsnap –NFS
    zsnap –DUMP
    zsnap –TCPIP

As you can see, zsnap is a valuable tool that can help you before you take your problem to IBM Support.