Table of Contents

OAR 2.5.7

oarstat

WAITING/job batch

oarstat -fj:

assigned_resources=
assigned_hostnames=

oarstat -pj: empty

WAITING/reservation a l'avance

oarstat -fj:

assigned_resources=
assigned_hostnames=
reserved_resources=1+2

oarstat -pj: empty

RUNNING **ou** ENDED / job batch **ou** advance reservation

oarstat -fj

assigned_resources=1+2
assigned_hostnames=host1+host2

oarstat -pj: show the properties in a custom format.

oarstat JSON (YAML/XML)

WAITING/job batch

"assigned_resources" : [ ],
"assigned_network_address" : [ ],

→ no information on scheduled resources

WAITING/reservation a l'avance

"reserved_resources" : {
  "1" : { "network_address" : "host1", "current_state" : "Alive" },
  "2" : { "network_address" : "host2", "current_state" : "Alive" },
 ...
},
"assigned_network_address" : [ ],
"assigned_resources" : [ ],

RUNNING **ou** TERMINATED / job batch **ou** advance reservation

"assigned_resources" : [ 1,2,... ],
"assigned_network_address" : [ "host1", "host2" ],

Rest API

WAITING / batch job

"nodes" : [
    {
       "network_address" : "host1",
       "status" : "scheduled",
       "links" : [
          {
             "rel" : "self",
             "href" : "/oarapi/resources/nodes/host1"
          }
       ],
       "api_timestamp" : 1481537655
    },
    {
       "api_timestamp" : 1481537655,
       "links" : [
          {
             "href" : "/oarapi/resources/nodes/host2",
             "rel" : "self"
          }
       ],
       "status" : "scheduled,
       "network_address" : "host2"
    }
 ],
 "resources" : [
    {
       "links" : [
          {
             "href" : "/oarapi/resources/1",
             "rel" : "self"
          },
          {
             "rel" : "collection",
             "href" : "/oarapi/resources/1/jobs",
             "title" : "jobs"
          }
       ],
       "status" : "scheduled",
       "id" : 1,
       "api_timestamp" : 1481537655
    },
    {
       "links" : [
          {
             "href" : "/oarapi/resources/2",
             "rel" : "self"
          },
          {
             "title" : "jobs",
             "rel" : "collection",
             "href" : "/oarapi/resources/2/jobs"
          }
       ],
       "id" : 2,
       "status" : "scheduled",
       "api_timestamp" : 1481537655
    }
 ],

WAITING / advance reservation

"nodes" : [
    {
       "network_address" : "host1",
       "status" : "reserved",
       "links" : [
          {
             "rel" : "self",
             "href" : "/oarapi/resources/nodes/host1"
          }
       ],
       "api_timestamp" : 1481537655
    },
    {
       "api_timestamp" : 1481537655,
       "links" : [
          {
             "href" : "/oarapi/resources/nodes/host2",
             "rel" : "self"
          }
       ],
       "status" : "reserved",
       "network_address" : "host2"
    }
 ],
 "resources" : [
    {
       "links" : [
          {
             "href" : "/oarapi/resources/1",
             "rel" : "self"
          },
          {
             "rel" : "collection",
             "href" : "/oarapi/resources/1/jobs",
             "title" : "jobs"
          }
       ],
       "status" : "reserved",
       "id" : 1,
       "api_timestamp" : 1481537655
    },
    {
       "links" : [
          {
             "href" : "/oarapi/resources/2",
             "rel" : "self"
          },
          {
             "title" : "jobs",
             "rel" : "collection",
             "href" : "/oarapi/resources/2/jobs"
          }
       ],
       "id" : 2,
       "status" : "reserved",
       "api_timestamp" : 1481537655
    }
 ],

RUNNING **ou** TERMINATED / job batch **ou** advance reservation

"nodes" : [
    {
       "network_address" : "host1",
       "status" : "assigned",
       "links" : [
          {
             "rel" : "self",
             "href" : "/oarapi/resources/nodes/host1"
          }
       ],
       "api_timestamp" : 1481537655
    },
    {
       "api_timestamp" : 1481537655,
       "links" : [
          {
             "href" : "/oarapi/resources/nodes/host2",
             "rel" : "self"
          }
       ],
       "status" : "assigned",
       "network_address" : "host2"
    }
 ],
 "resources" : [
    {
       "links" : [
          {
             "href" : "/oarapi/resources/1",
             "rel" : "self"
          },
          {
             "rel" : "collection",
             "href" : "/oarapi/resources/1/jobs",
             "title" : "jobs"
          }
       ],
       "status" : "assigned",
       "id" : 1,
       "api_timestamp" : 1481537655
    },
    {
       "links" : [
          {
             "href" : "/oarapi/resources/2",
             "rel" : "self"
          },
          {
             "title" : "jobs",
             "rel" : "collection",
             "href" : "/oarapi/resources/2/jobs"
          }
       ],
       "id" : 2,
       "status" : "assigned",
       "api_timestamp" : 1481537655
    }
 ],

OAR 2.5.8

Proposals

Examples

Rest API

neyron@takelma:~/scm/OAR/oar (2.5 $%>)$ curl -i -X GET http://docker:docker@localhost:46668/oarapi-priv/jobs/5/details.json -H'Content-Type: application/json'
HTTP/1.1 200 OK
Date: Mon, 12 Dec 2016 09:29:44 GMT
Server: Apache/2.4.10 (Debian)
Allow: GET, POST, DELETE
Transfer-Encoding: chunked
Content-Type: application/json; charset=ISO-8859-1

{
   "stdout_file" : "OAR.5.stdout",
   "state" : "Waiting",
   "resources" : [
      {
         "api_timestamp" : 1481534984,
         "properties" : {
            "available_upto" : 2147483647,
            "cpu" : 1,
            "desktop_computing" : "NO",
            "mem" : 8,
            "last_job_date" : 1481376446,
            "last_available_upto" : 0,
            "besteffort" : "YES",
            "suspended_jobs" : "NO",
            "scheduler_priority" : 0,
            "cpuset" : "1",
            "deploy" : "NO",
            "next_state" : "UnChanged",
            "state_num" : 1,
            "current_state" : "Alive",
            "drain" : "NO",
            "resource_id" : "2",
            "next_finaud_decision" : "NO",
            "type" : "default",
            "finaud_decision" : "NO",
            "network_address" : "node1",
            "core" : 2,
            "host" : "node1",
            "expiry_date" : 0
         },
         "status" : "reserved",
         "id" : 2,
         "links" : [
            {
               "href" : "/oarapi-priv/resources/2",
               "rel" : "self"
            },
            {
               "href" : "/oarapi-priv/resources/2/jobs",
               "rel" : "collection",
               "title" : "jobs"
            }
         ]
      },
      {
         "id" : 3,
         "status" : "reserved",
         "properties" : {
            "expiry_date" : 0,
            "host" : "node1",
            "core" : 3,
            "network_address" : "node1",
            "finaud_decision" : "NO",
            "type" : "default",
            "next_finaud_decision" : "NO",
            "resource_id" : "3",
            "drain" : "NO",
            "current_state" : "Alive",
            "state_num" : 1,
            "next_state" : "UnChanged",
            "deploy" : "NO",
            "cpuset" : "2",
            "suspended_jobs" : "NO",
            "scheduler_priority" : 0,
            "besteffort" : "YES",
            "last_available_upto" : 0,
            "last_job_date" : 1481376446,
            "mem" : 8,
            "desktop_computing" : "NO",
            "cpu" : 1,
            "available_upto" : 2147483647
         },
         "api_timestamp" : 1481534984,
         "links" : [
            {
               "rel" : "self",
               "href" : "/oarapi-priv/resources/3"
            },
            {
               "title" : "jobs",
               "href" : "/oarapi-priv/resources/3/jobs",
               "rel" : "collection"
            }
         ]
      },
      {
         "api_timestamp" : 1481534984,
         "properties" : {
            "network_address" : "node1",
            "next_finaud_decision" : "NO",
            "finaud_decision" : "NO",
            "type" : "default",
            "core" : 1,
            "host" : "node1",
            "expiry_date" : 0,
            "deploy" : "NO",
            "cpuset" : "0",
            "next_state" : "UnChanged",
            "current_state" : "Alive",
            "state_num" : 1,
            "resource_id" : "1",
            "drain" : "NO",
            "last_available_upto" : 0,
            "suspended_jobs" : "NO",
            "scheduler_priority" : 0,
            "besteffort" : "YES",
            "available_upto" : 2147483647,
            "cpu" : 1,
            "last_job_date" : 1481376446,
            "desktop_computing" : "NO",
            "mem" : 8
         },
         "id" : 1,
         "status" : "reserved",
         "links" : [
            {
               "href" : "/oarapi-priv/resources/1",
               "rel" : "self"
            },
            {
               "rel" : "collection",
               "href" : "/oarapi-priv/resources/1/jobs",
               "title" : "jobs"
            }
         ]
      },
      {
         "api_timestamp" : 1481534984,
         "properties" : {
            "type" : "default",
            "next_finaud_decision" : "NO",
            "finaud_decision" : "NO",
            "network_address" : "node1",
            "core" : 4,
            "host" : "node1",
            "expiry_date" : 0,
            "cpuset" : "3",
            "deploy" : "NO",
            "next_state" : "UnChanged",
            "state_num" : 1,
            "current_state" : "Alive",
            "resource_id" : "4",
            "drain" : "NO",
            "last_available_upto" : 0,
            "besteffort" : "YES",
            "scheduler_priority" : 0,
            "suspended_jobs" : "NO",
            "available_upto" : 2147483647,
            "cpu" : 1,
            "desktop_computing" : "NO",
            "mem" : 8,
            "last_job_date" : 1481376446
         },
         "id" : 4,
         "status" : "reserved",
         "links" : [
            {
               "href" : "/oarapi-priv/resources/4",
               "rel" : "self"
            },
            {
               "title" : "jobs",
               "href" : "/oarapi-priv/resources/4/jobs",
               "rel" : "collection"
            }
         ]
      }
   ],
   "project" : "default",
   "array_index" : 1,
   "stop_time" : 0,
   "array_id" : 5,
   "initial_request" : "oarsub -r 2016-12-25 20:00:00 -l nodes=1",
   "dependencies" : [],
   "resubmit_job_id" : 0,
   "queue" : "default",
   "submission_time" : 1481322874,
   "scheduled_start" : 1482692400,
   "cpuset_name" : "docker_5",
   "owner" : "docker",
   "wanted_resources" : "-l \"{type = 'default'}/network_address=1,walltime=2:0:0\" ",
   "stderr_file" : "OAR.5.stderr",
   "name" : null,
   "events" : [],
   "exit_code" : null,
   "walltime" : 7200,
   "types" : [],
   "type" : "INTERACTIVE",
   "properties" : "(desktop_computing = 'NO') AND drain='NO'",
   "api_timestamp" : 1481534984,
   "id" : 5,
   "nodes" : [
      {
         "links" : [
            {
               "href" : "/oarapi-priv/resources/nodes/node1",
               "rel" : "self"
            }
         ],
         "network_address" : "node1",
         "api_timestamp" : 1481534984,
         "status" : "reserved"
      }
   ],
   "links" : [
      {
         "rel" : "self",
         "href" : "/oarapi-priv/jobs/5"
      },
      {
         "title" : "resources",
         "rel" : "collection",
         "href" : "/oarapi-priv/jobs/5/resources"
      },
      {
         "title" : "nodes",
         "rel" : "collection",
         "href" : "/oarapi-priv/jobs/5/nodes"
      }
   ],
   "message" : "R=4,W=2:0:0,J=R",
   "launching_directory" : "/home/docker",
   "start_time" : 1482692400,
   "reservation" : "Scheduled",
   "command" : ""
}