Gpfs/trace/start: POST

Starts a GPFS tracing.

Availability

Available on all IBM Storage Scale editions.

Description

The POST gpfs/trace/start request starts the GPFS tracing. For more information about the fields in the data structures that are returned, see mmtracectl command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/gpfs/trace/start
where
gpfs/trace
Specifies the gpfs trace as the resource. Required.

Request headers

Accept: application/json

Request data

{
  "trace": "io |all |def",
  "traceRecycle": "off | local | global | globalOnShutdown",
  "tracedevWriteMode": "blocking | overwrite",
  "tracedevBufferSize"File Size"traceFileSize": "Size", 
  "tracedevOverwriteBufferSize"Size, 
  "format":true| false, 
  "noFormat":true| false
}

For more information about the fields in the following data structures, see the links at the end of the topic.

"trace":"io |all |def"
The predefined and user-specified trace levels.
"traceRecycle": "off | local | global | globalOnShutdown"
The control mode for trace recycling during daemon termination.
"tracedevWriteMode": "blocking | overwrite"
Specifies when to overwrite the old data.
"tracedevBufferSize": "Size"
Specifies the trace buffer size for Linux® trace in blocking mode. If --tracedev-write-mode is set to blocking, this parameter is used . It must not be less than 4 K and not more than 64 M. The default is 4 M.
"traceFileSize": "File size"
The size of the trace file. The default is 128 M on Linux and 64 M on other platforms.
"tracedevOverwriteBufferSize": "File size"
Specifies the trace buffer size for Linux trace in overwrite mode. If --tracedev-write-mode is set to overwrite, this parameter is used . It must not be less than 16 M. The default is 64 M.
"format": "true |false"
Specifies whether formatting is enabled.
"noformat": "true |false"
Specifies whether formatting is disabled.

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",
         }   
        ],
   }
For more information about the fields in the following data structures, see the links at the end of the topic.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"jobs":
An array of elements that describe jobs. Each element describes one job.
"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.

Examples

The following example starts the GPFS tracing.

Request URL:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' 
-d '{
  "trace": "io",
  "traceRecycle": "off",
  "tracedevWriteMode": "blocking", 
  "tracedevBufferSize": 1048576, 
  "traceFileSize": "1048576", 
  "tracedevOverwriteBufferSize": 67108864, 
  "format":true, 
  "noFormat":true
} 
'https://198.51.100.1:443/scalemgmt/v2/gpfs/trace/start'
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.
{
  "status": {
    "code": "200",
    "message": "..."
  },
  "job": [
    {
      "result": {
        "commands": "[''', ...]",
        "progress": "['']",
        "exitCode": "0",
        "stderr": "['']",
        "stdout": "[' ', ...]"
      },
      "request": {
        "type": "POST",
        "url": "/scalemgmt/v2/gpfs/trace/start",
        "data": "{ 
          "trace": "io",
          "traceRecycle": "off",
          "tracedevWriteMode": "blocking", 
          "tracedevBufferSize": 1048576, 
          "traceFileSize": "1048576", 
          "tracedevOverwriteBufferSize": 67108864, 
          "format":true, 
          "noFormat":true"
      },
      "jobId": "12345",
      "submitted": "2016-11-14 10.35.56",
      "completed": "2016-11-14 10.35.56",
      "status": "COMPLETED"
    }
  ]
}