Diagnostic/snap: POST

Creates a new GPFS snap file.

Availability

Available on all IBM Storage Scale editions.

Description

The POST diagnostic/snap request creates a new GPFS snap file.

Request URL

https://<IP address or host name of API server>:port/scalemgmt/v2/diagnostic/snap
where:
diagnostic/snap
Creates a new GPFS snap file. Required.

Request headers

Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
body Body of the request that contains the required parameters to be passed on to the IBM Storage Scale system to perform the requested operation. Required.

Request data

 {
  "outputDir": "string",
  "nodesOrNodeClasses": "[Array]",
  "checkSpaceOption": "string",
  "fullCollection":  false,
  "deadlock": false,
  "numberOfDaysBack": backup for number of days,
  "excludeAixDiskAttr": true,
  "excludeAixLvm": true | false,
  "excludeMergeLogs": true | false,
  "excludeNet": true | false,
  "gatherLogs": true |false,
  "mmdf": true |false,
  "performance": true | false,
  "cloudGateway": "string",
  "prefix": "string",
  "protocolTypes": "[]",
  "timeoutInSeconds": Timeout in seconds,
  "purgeFiles": Number of Files purged}
"outputDir": "The output directory"
The directory path where the output is stored.
"nodesOrNodeClasses": "Array of nodes"
List of nodes, node classes, or a mix of both for which the data must be collected.
"checkSpaceOption": "Type of space check being performed"
Indicates the manner in which space checking is performed. The values and their interpretations are shown:
  • "" - no space check is performed.
  • "checkSpace" - space checking is performed before collecting data.
  • "checkSpaceOnly" - only space checking is performed but no data is collected.
"fullCollection": "True | False "
Indicates whether all large debug files are collected instead of the default behavior of collecting only the new files that were created since a previous run of the gpfs.snap.
"deadlock": "True | False "
Indicates whether only the minimum amount of data that is necessary to debug a deadlock problem, is collected.
"numberOfDaysBack": "The number of days of backup"
Specifies a time limit to reduce the number of large files to be collected.
"excludeAixDiskAttr": "True | False"
Indicates whether the AIX® disk attributes data will be collected. If True the data is not collected.
"excludeAixLvm": "True | False"
Indicates whether the AIX Logical Volume Manager (LVM) data is collected. If True the data is not collected.
"excludeMergeLogs": "True | False "
Indicates whether merge logs and waiters are collected. If True the data is not collected.
"excludeNet": "True | False "
Indicates whether the network-related information is collected. If True the data is not collected.
"gatherLogs": "True | False "
Indicates whether all the mmfs.log files is gathered, merged, and chronologically sorted.
"mmdf": "True | False"
Indicates whether the mmdf output is collected.
"performance": "True | False "
Indicates whether the performance data is to be gathered.
"cloudGateway": "The cloud gateway "
Indicates the manner in which the cloud gateway data is to be gathered. The value and their interpretations are shown:
  • NONE - No Transparent cloud tiering data is collected
  • BASIC - When the Transparent Cloud Tiering service is enabled, the snap collects information such as logs, traces, Java™™ cores, along with minimal system and IBM Storage Scale cluster information specific to Transparent Cloud Tiering. No customer sensitive information is collected
  • FULL - Additional details such as Java Heap dump are collected, along with the information captured with the BASIC option.
"prefix": "prefix name "
Indicates whether the prefix name gpfs.snap will be added to the .tar file.
"protocolTypes": "JSON Array of strings"
Specifies the type or types of protocol information to be gathered. For example, SMB, NFS, object, authentication, CES, core, or none. By default, whenever any protocol is enabled on a file system, the information is gathered for all types of protocol information.
"timeoutInSeconds": "time"
Specifies the timeout value, in seconds, for all commands.
"purgeFiles": "Number of files"
Specifies that large debug files will be deleted from the cluster nodes based on the value specified under KeepNumberOfDaysBack parameter. If 0 is specified, all the large debug files are deleted. If a value greater than 0 is specified, large debug files that are older than the number of days specified are deleted. For example, if the value 2 is specified, all files that are older than the previous two days are deleted.

Response data

{
  "jobs" : [ {
    "jobId" : ID,
    "status" : "request status",
    "submitted" : "Date and Time",
    "completed" : "Date and Time",
    "runtime" : Time,
    "request" : {
      "type" : "Request Type",
      "url" : "API endpoint URL"
    },
    "result" : {
      "progress" : [ ],
      "commands" : [ "gpfs.snap --no-check-space " ],
      "stdout" : [ "Result"],
      "stderr" : [ ],
      "exitCode" : 0
    },
    "pids" : [ ]
  } ],
  "status" : {
    "code" : ReturnCode,
    "message" : "ReturnMessage"
  }
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"jobId":"ID",
The unique ID of the job.
"submitted":"Time"
The time at which the job was submitted.
"completed":Time"
The time at which the job was completed.
"runtime":Time
The job run time
"status":"RUNNING | COMPLETED | FAILED"
Status of the job.
"request"
"type":"{GET | POST | PUT | DELETE}"
HTTP request type.
"url":"URL"
The URL through which the job is submitted.
"data":" "
Optional.
"result"
"commands":"String'
Array of commands that are run in this job.
"progress":"String'
Progress information for the request.
"stdout":"String"
CLI messages from stdout.
"exitCode":"Exit code"
Exit code of command. Zero is success and nonzero denotes failure.
"stderr":"Error"
CLI messages from stderr.
"pids":Array
An array of persistent identifiers.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.

Examples

The following example shows how to create a new GPFS snap file.

Request data:
curl -k -u user:password -X POST --header 'content-type:application/json' --header 'accept:application/json' -d '{ \
   "outputDir": "/tmp/gpfs.snapOut/4", \
   "nodesOrNodeClasses": ["gpfsgui-22.novalocal"], \
   "protocolTypes": ["SMB","NFS"], \
   "timeoutInSeconds": 0 \
}' 'h}'  https://openstackhost:2001/scalemgmt/v2/diagnostic/snap
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
  "jobs" : [ {
    "jobId" : 1000000000001,
    "status" : "COMPLETED",
    "submitted" : "2021-01-22 12:11:45,165",
    "completed" : "2021-01-22 12:18:16,253",
    "runtime" : 391088,
    "request" : {
      "type" : "POST",
      "url" : "/scalemgmt/v2/diagnostic/snap"
    },
    "result" : {
      "progress" : [ ],
      "commands" : [ "gpfs.snap --no-check-space " ],
      "stdout" : [ "gpfs.snap: started at Fri Jan 22 12:11:45 CET 2021.", "Gathering common data...", "Gathering Linux specific data...", "Gathering extended network data...", "Gathering local callhome data...", "Gathering local perfmon data...", "Gathering local msgqueue data...",

"Gathering local sysmon data...", "Gathering local cnss data...", "Gathering local gui data...", "Gathering trace reports and internal dumps...", "Gathering Transparent Cloud Tiering data at level BASIC...", "gpfs.snap:  The Transparent Cloud Tiering snap software was not detected o

n node gpfsgui-11.novalocal", "Gathering QoS data at level FULL...", "gpfs.snap:  No QoS configuration was found for this cluster.", "gpfs.snap:  QoS configuration collection complete.", "Gathering cluster wide gui data...", "Gathering cluster wide sysmon data...", "Gathering cluste

r wide cnss data...", "Gathering cluster wide callhome data...", "Gathering cluster wide perfmon data...", "Gathering cluster wide msgqueue data...", "gpfs.snap:  Spawning remote gpfs.snap calls. Master is gpfsgui-11.novalocal.", "This may take a while.", "Copying file /var/mmfs/tmp

/cleanupAllow/gpfs.snap.gpfsgui-13_20210122121448.2450324.out.tar.gz from gpfsgui-13.novalocal ...", "Successfully copied file /var/mmfs/tmp/cleanupAllow/gpfs.snap.gpfsgui-13_20210122121448.2450324.out.tar.gz from gpfsgui-13.novalocal.", "Copying file /var/mmfs/tmp/cleanupAllow/gpfs

.snap.gpfsgui-12_20210122121449.3291709.out.tar.gz from gpfsgui-12.novalocal ...", "Successfully copied file /var/mmfs/tmp/cleanupAllow/gpfs.snap.gpfsgui-12_20210122121449.3291709.out.tar.gz from gpfsgui-12.novalocal.", "Gathering cluster wide protocol data...", "Gathering SMB Clust

er wide data...", "Successfully copied file /var/mmfs/tmp/cleanupAllow/smb.snap.cluster.gpfsgui-12.novalocal.20210122_121729.tar.gz from gpfsgui-12.novalocal.", "Gathering NFS Cluster wide data...", "Successfully copied file /var/mmfs/tmp/cleanupAllow/nfs.snap.cluster.gpfsgui-12.nov

alocal.20210122_121730.tar.gz from gpfsgui-12.novalocal.", "Gathering AUTH Cluster wide data...", "Successfully copied file /var/mmfs/tmp/cleanupAllow/auth.snap.cluster.gpfsgui-12.novalocal.20210122_121731.tar.gz from gpfsgui-12.novalocal.", "Gathering CES Cluster wide data...", "Su

ccessfully copied file /var/mmfs/tmp/cleanupAllow/ces.snap.cluster.gpfsgui-12.novalocal.20210122_121732.tar.gz from gpfsgui-12.novalocal.", "Gathering waiters from all nodes...", "Gathering mmfs.logs from all nodes.  This may take a while...", "All data has been collected.  Processi

ng collected data.", "  This may take a while...", "Packaging master node data...", "Writing * to file /tmp/gpfs.snapOut/1819085/collect/gpfs.snap.gpfsgui-11_master_20210122121145.1819085.out.tar.gz", "Packaging all data.", "Writing . to file /tmp/gpfs.snapOut/1819085/all.2021012212

1145.1819085.tar", "/bin/tar: gpfsgui-11_master_20210122121145.1819085/var/log/messages: file changed as we read it", "gpfs.snap completed at Fri Jan 22 12:18:15 CET 2021", "###############################################################################", "Send file /tmp/gpfs.snapOu

t/1819085/all.20210122121145.1819085.tar to IBM Service", "Examine previous messages to determine additional required data.", "###############################################################################" ],
      "stderr" : [ ],
      "exitCode" : 0
    },
    "pids" : [ ]
  } ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully."
  }
}