snap – Run snap command on AIX.
Synopsis
This module facilitates running the AIX snap command to gather diagnostic data. Users can specify various options like collecting performance data, clearing old data, or generating a complete system report.
Requirements
The below requirements are needed on the host that executes this module.
AIX >= 7.1 TL3
Python >= 3.6
Root user is required.
Parameters
- action (optional, str, snap)
Controls what snap-related action is performed.
snap
collects system information and logs using snap command.
snapcore
gathers core dumps and crash data using snapcore comamnd.
snapsplit
splits and processes collected snap data using snapsplt command.- all_info (False, bool, False)
Gathers all available system information.
This is a comprehensive option that includes data across all categories, such as hardware, software, configuration files, and logs.
- compress (optional, bool, False)
Compresses the collected data into a single archive, typically snap.pax.gz.
This is useful for easier file management and transport of the snapshot
- reset (optional, bool, False)
Removes the snap output directory (default /tmp/ibmsupt).
This cleans up previously gathered snapshot data, often to make room for a new snapshot
- hacmp (optional, bool, False)
Gathers HACMP (High Availability Cluster Multiprocessing) error information.
This is specific to AIX high-availability cluster environments and helps troubleshoot HA-related errors
- general_info (optional, bool, False)
Gathers general information.
- file_system_info (optional, bool, False)
Gathers file system information, including details on disk usage, mount points, and file system integrity.
This is crucial for diagnosing storage and disk-related issues
- live_kernel (optional, bool, False)
Collects Live kernel update information and saves it in the /tmp/ibmsupt/liveupdate directory.
- collects_dump (optional, bool, False)
Collects dump and /unix files, along with any live dump data. This is valuable for diagnosing kernel and system crashes
- installation_info (optional, bool, False)
Gathers installation information, such as installed software packages, patches, and configurations.
This helps diagnose installation-related issues.
- kernel_info (optional, bool, False)
Collects kernel-related data, including kernel configuration and status.
This is essential for debugging kernel-specific issues.
- security_info (optional, bool, False)
Gathers security information, including access controls, permissions, and user data.
This is important for diagnosing security issues and auditing.
- workload_manager_info (optional, bool, False)
Gather workload manager (WLM) information, which includes data related to workload management on the system.
- hardware_info (optional, bool, False)
Gather hardware information
- ss_filename (optional, str, None)
Specifies the filename for the snapsplit operation.
This determines the output file name used for storing snap data.
- ss_timestamp (optional, str, None)
Specifies the timestamp for the snapsplit operation.
This is useful for organizing and restoring snapshots based on time.
- ss_machinename (optional, str, None)
Specifies the machine name for the snapsplit operation.
Helps in identifying the source system for the collected data.
- ss_size (optional, str, None)
Defines the size limit for snap data storage.
Helps in controlling the disk space used by the snapsplit operation.
- ss_rejoining (optional, bool, False)
Determines whether previously split snap files should be rejoined.
If set to
true
, snapsplit will attempt to reconstruct snap files.- sc_output_dir (optional, str, None)
Specifies the directory where snapcore output files will be stored.
Helps in organizing collected core files.
- sc_core_file (optional, str, None)
Specifies the core file to be gather.
Used for diagnosing system debugging.
- sc_program_name (optional, str, None)
Defines the name of the program related to the core file.
- sc_remove_core (optional, bool, False)
Determines whether the core file should be removed after processing.
If set to
true
, the core file will be deleted after analysis.
Notes
Note
You can refer to the IBM documentation for additional information on the snap command at https://www.ibm.com/support/knowledgecenter/ssw_aix_72/c_commands/snap.html.
Examples
- name: Collect hardware related data
ibm.power_aix.snap:
action: "snap"
option: -h
- name: Clear old snap data
ibm.power_aix.snap:
action: "snap"
option: -r
- name: Collect file system data
ibm.power_aix.snap:
action: "snap"
option: -f
- name: Collect all system data
ibm.power_aix.snap:
action: "snap"
option: -a
Return Values
- msg (always, str, Snap command executed successfully with option -P)
The execution message.
- rc (if the command failed., int, )
The return code.
- stdout (if the command failed., str, )
The standard output.
- stderr (if the command failed., str, )
The standard error.
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.