snap command
Purpose
Gathers system configuration information.
Syntax
snap [-copy]
snap [-gzip] [-general] [-z ALL | "product_name=ProductName, ..." | "class=ClassName, ..."] [-dev DeviceName] [-M Timeout]
snap [-z ADD "product_name=ProductName" "class=ClassName" "command_path=Absolutepathofyourdebugcommand"]
snap [-z DELETE "product_name=ProductName"]
snap [-gzip] script1 "script2 arg1 arg2" ...
Description
The snap command gathers system configuration information and compresses the information into a pax file (snap.pax.Z). The file can then be transmitted to a remote system. The information that is gathered with the snap command might be necessary to identify and resolve system problems.
At least 8 MB of temporary disk space is necessary to collect all system information, including contents of the error log.
The snap command fails to copy the snap data due to insufficient space on the home directory of the user. In such cases, delete all the unwanted files, and use the -copy option to copy the snap data that was previously collected from the temporary location to the home directory of the user.
Flags
| Flag name | Description |
|---|---|
| -copy | Copies the snap data that was previously collected from the temporary location to the home directory of the user. |
| -dev | Copies the compressed image to the diskette or tape. |
| -general | Gathers general system information. Note: The snap command
captures system configuration information when the -general flag
is not specified.
|
| -gzip | Specifies to use the new compression method instead of the default method. |
| -M | Specifies the maximum timeout value in seconds for one external script execution. |
| -z | Performs external script registration and deregistration by using the snap data and gathers system configuration information. |
Exit Status
Examples
- To gather all system configuration information, enter the following command:
The output of this command is written to the users home directory.snap - To gather general system configuration information, including the output of the lslpp
-hBc command, enter the following command:
snap -general -dev /dev/rfd0Output is written to the /tmp/ibmsupt/general/lslpp.hBc and /tmp/ibmsupt/general/general.snap files. The final snap output is copied to /home/<User>/snap.pax.Z. This command also writes the system information to a removable diskette.
- To run the scripts foo1, foo2, and foo3 where foo1 takes no argument, foo2 takes three
arguments, and foo3 takes one argument, type the following:
snap foo1 "foo2 -x -y 3" "foo3 6" foo4Output is written to /tmp/ibmsupt/snapscripts/foo1, /tmp/ibmsupt/snapscripts/foo2 and /tmp/ibmsupt/snapscripts/foo3 assuming that the destination directory is the default, /tmp/ibmsupt.
- To register a third-party debug script that is present in the
/usr/lpp/abc/debug_abc path of an abc product in class storage, type the
command as
follows:
snap -z ADD "product_name=abc" "class=storage" "command_path=/usr/lpp/abc/debug_abc -a" - To unregister a debug script of an abc product, type the command as
follows:
snap -z DELETE "product_name=abc" - To gather third-party script debug information for all the registered scripts
that have a snap framework and time out value of 600 seconds, type the command as
follows:
snap -z ALL -M 600 - To gather debug data of multiple products at a time, type the command as
follows:
snap –z "product_name=abc,product_name=def" - To copy the snap data that was collected earlier to the user home directory,
type the command as follows:
snap -copy - To gather and
compress all
the
system configuration
information by
using
the
gzip
compression method,
type the command as follows:
snap –gzip