Skip to content

pman command: reference

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

pman reference

Abstract

This page provides a simple set of copy/paste friendly commands for all the pman commands.

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
        }
}

Reference

Start prefix

Start the purl command with

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 \

simple copy/paste the above line into a terminal. Do not press enter!

Message payloads

Now, copy paste one of the following into the same line (and press enter!)

search

'{  "action": "search",
        "meta": {
                "key":          "jid",
                "value":        "cal-job-1234",
                "job":          "0",
                "when":         "end",
                "field":        "stdout"
        }
}' --quiet --jsonpprintindent 4 

status

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

done

'{  "action": "done",
        "meta": {
                "key":          "jid",
                "value":        "cal-job-1234"
        }
}' --quiet --jsonpprintindent 4  

info

'{  "action": "info",
        "meta": {
                "key":          "jid",
                "value":        "cal-job-1234",
                "path":         "/"
        }
}' --quiet --jsonpprintindent 4  

quit

'{  "action": "quit",
    "meta": {
                "when":         "now",
                "saveDB":       true
            }
}' --quiet --jsonpprintindent 4

--30--

Clone this wiki locally