filesystems/{filesystemName}/filePath/{filePath}/diagnostic: POST

Checks for GPFS file system corruptions.

Availability

Available on all IBM Storage Scale editions.

Description

The POST filesystems/{filesystemName}/filePath/{filePath}/diagnostic request checks for GPFS file system corruptions. For more information about the fields in the returned data structure, see mmfsckx command.

Request URL

https://<IP address or host name of API server>:port/scalemgmt/v2/filesystems/filesystemName/filePath/filePath/diagnostic
where:
diagnostic
Specifies the action that the POST request completes. 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
filesystemName The name of the file system that is checked for repairs. Required.
FilePath The location of the diagnostic data file. Required.

Request data

No request data.

Response data

{
   "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   "jobs": [
      {
         "result":"", 
           { 
             "commands":"String",
             "progress":"String,
             "exitCode":"Exit code",
             "stderr":"Error",
             "stdout":"String",
           },
         "request":" ",
           {
             "type":"{GET | POST | PUT | DELETE}",
             "url":"URL",
             "data":""",
           }
         "jobId":"ID",
         "submitted":"Time",
         "completed":Time",
         "status":"Job status",
         "pids":"Process IDs
         }
   ],
  }

The details of the parameters are provided in the following list:

"jobs":
An array of elements that describe jobs. Each element describes one job.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"result"
"commands":"String'
Array of commands that are run in this job.
"progress":"String'
Progress information for the request.
"exitCode":"Exit code"
Exit code of command. Zero is success and nonzero denotes failure.
"stderr":"Error"
CLI messages from stderr.
"stdout":"String"
CLI messages from stdout.
"request"
"type":"{GET | POST | PUT | DELETE}"
HTTP request type.
"url":"URL"
The URL through which the job is submitted.
"data":" "
Optional.
"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.
"status":"RUNNING | COMPLETED | FAILED"
Status of the job.
"pids":"Process ID"
The process IDs of all the active sub processes that manage the job.

Examples

The following example shows how to check for file system corruptions.

Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/filesystems/fs1/filePath/mmgui.sh%20%2Ftmp%2Ffsckx.out%20%2Fusr%2Flpp%2Fmmfs%2Fbin%2Fmmfsckx%20/diagnostic'
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": 1000000000005,
      "status": "COMPLETED",
      "submitted": "2022-04-25 00:14:55,894",
      "completed": "N/A",
      "runtime": 10,
      "request": {
        "type": "POST",
        "url": "/scalemgmt/v2/filesystems/fs1/filePath/mmgui.sh%20%2Ftmp%2Ffsckx.out%20%2Fusr%2Flpp%2Fmmfs%2Fbin%2Fmmfsckx%20/diagnostic"
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": 200,
    "message": "The request was completed successfully."
  }
}