Skip to content

pman command: status

Rudolph Pienaar edited this page Mar 8, 2017 · 12 revisions

pman command: status

Abstract

This page describes the status command to pman. It is used to return a list field, l_status, describing the end status of the job.

Preconditions

  • This page assumes that pman is listening on: 172.17.0.2:5010.
  • Make sure that pman has been started (see here for more info):
pman --raw 1 --http  --port 5010 --listeners 12
  • This page assumes that a previous run has been managed with parameters
{  "action": "run",
        "meta": {
                "cmd":      "cal 7 1970",
                "auid":     "rudolphpienaar",
                "jid":      "cal-job-1234",
                "threaded": true
        }
}

msg summary

The msg payload of the REST interaction with pman is:

'{  "action": "status",
        "meta": {
                "key":          "jid",
                "value":        "cal-job-1234"
        }
}' 

status

Assuming satisfied preconditions, let's search for the status information about a process. For example, let's ask for the status of the app with jid of cal-job-1234:

purl --content-type application/vnd.collection+json \                                                
 --content-type application/vnd.collection+json \
 --verb POST \
 --raw \
 --http 172.17.0.2:5010/api/v1/cmd \
 --jsonwrapper 'payload' \
 --msg \
'{  "action": "status",
        "meta": {
                "key":          "jid",
                "value":        "cal-job-1234"
        }
}' --quiet --jsonpprintindent 4  
Clone this wiki locally