SNAP command in AIX Logical Partition

SNAP command in AIX Logical Partition

SNAP command allows AIX users to collect the logs required for debugging the issues. Something goes wrong with the AIX logical partition related to hardware, software, crashes, error logs it requires to fix them at priority to continue the processing with out any problems. SNAP command offers wide range of options to collect each and every option individually. Below are some of the options explained

Generally used command to gather complete LPAR and System related information
    snap -a -d /mylogdir

Gather WPAR's related logs
    snap -@ -d /mylogdir

Gather WLM related logs 
    snap -w -d /mylogdir

Collect General information logs
    snap -g -d /mylogdir

Collect tcp related information
    snap -t -d /mylogdir

Collect SCSI RAID related information 
    snap -R -d /mylogdir

Display component snap information if its already collected in /tmp/ibmsupt/ directory. It displays the details on the console itself the component list are async dump dump/autoload filesys general general/nim kernel lang liveupdate printer XS25 sna tcpip install ssa scraid lvm wlm wpars hacmp pcixscsi sissas ctsupt products flash IB history.
    # cat > /tmp/ibmsupt/general/general.snap
      hello world
    # snap -v general
      hello world
      general.snap: END

Collect the information in snap.pax.Z type using -c option
    snap -gc -d /mylogdir

Collect hacmp information with snap.pax.Z  file
    snap -e -d /mylogdir

Collects user related information
    snap -u user1,user2
    snap -u user1,user2 -d /mylogdir

Collect general info with out platform data
    snap -H -d /mylogdir

Collect All information related to LPAR General information, System information with custom scripts, it will collect the logs user /tmp/ibmsupt directory
    snap All 

Clean up existing snap logs from /tmp/ibmsupt
    echo "y" | snap -r

Collect flash cache related information
    snap -F -d /mylogdir

Collect Live Kernel Updated related logs
    snap -U -d /mylogdir

Suppress file system space requirement check and collect logs
    snap -aNd  /mylogdir

Collect install system information
    snap -i -d /mylogdir

Adding custom scripts 

Registers the custom log collection script /usr/lib/ras/snapscripts/sc.ksh that should run when snap collection is started.
    snap -z ADD "product_name=vios" "class=snapi" "command_path=/usr/lib/ras/snapscripts/sc.ksh"

De registers the custom log collection script /usr/lib/ras/snapscripts/sc.ksh.
    snap -z DELETE "product_name=vios"

Running a script with out registering with arguments, collects the log in /usr/lib/ras/snapscripts/script1, /usr/lib/ras/snapscripts/script2, /usr/lib/ras/snapscripts/script3, /usr/lib/ras/snapscripts/script4
    snap "script1" "script2" "script3 script_argument1 script_argument2" "script4"

Collect Network file sharing related information
    snap -n -d /mylogdir

Timing out if the script taking too much of time allotted to collect the logs
    snap script_name -M 600
        M specifies the time out for per custom script.

Above mentioned are some of the  arguments to collect the required snap logs.

Post a Comment