From 729fd3cd5f57487cb74d92da32ab057ab8c7461c Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Tue, 15 Sep 2015 13:09:47 -0700 Subject: [PATCH] website: update usage and examples for status commands --- .../source/docs/commands/node-status.html.md | 23 ++++++++++++++- website/source/docs/commands/status.html.md | 29 +++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/website/source/docs/commands/node-status.html.md b/website/source/docs/commands/node-status.html.md index 70ab7c56f..58080863c 100644 --- a/website/source/docs/commands/node-status.html.md +++ b/website/source/docs/commands/node-status.html.md @@ -29,6 +29,11 @@ displayed. * `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR` environment variable if set. Defaults to `http://127.0.0.1:4646`. +## Node Status Options + +* `-short`: Display short output. Used only when querying a single node. Drops + verbose information about node allocations. + ## Examples List view: @@ -40,7 +45,19 @@ a72dfba2-c01f-49de-5ac6-e3391de2c50c dc1 node1 false ready 1f3f03ea-a420-b64b-c73b-51290ed7f481 dc1 node2 false ready ``` -Single-node view: +Single-node view in short mode: + +``` +$ nomad node-status -short 1f3f03ea-a420-b64b-c73b-51290ed7f481 +ID = 1f3f03ea-a420-b64b-c73b-51290ed7f481 +Name = node2 +Class = +Datacenter = dc1 +Drain = false +Status = ready +``` + +Full output for a single node: ``` $ nomad node-status 1f3f03ea-a420-b64b-c73b-51290ed7f481 @@ -50,4 +67,8 @@ Class = Datacenter = dc1 Drain = false Status = ready + +Allocations +ID EvalID JobID TaskGroup DesiredStatus ClientStatus +678c51dc-6c55-0ac8-d92d-675a1e8ea6b0 193229c4-aa02-bbe6-f996-fd7d6974a309 job8 grp8 failed failed ``` diff --git a/website/source/docs/commands/status.html.md b/website/source/docs/commands/status.html.md index b45de3a72..cdd09895e 100644 --- a/website/source/docs/commands/status.html.md +++ b/website/source/docs/commands/status.html.md @@ -26,9 +26,14 @@ useful status fields for each. * `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR` environment variable if set. Defaults to `http://127.0.0.1:4646`. +## Status Options + +* `-short`: Display short output. Used only when a single node is being queried. + Drops verbose node allocation data from the output. + ## Examples -Short list of all jobs: +List of all jobs: ``` $ nomad status @@ -39,7 +44,19 @@ job3 service 2 pending job4 service 1 complete ``` -Detailed information of a single job: +Short view of a specific job: + +``` +$ nomad status -short job1 +ID = job1 +Name = Test Job +Type = service +Priority = 3 +Datacenters = dc1,dc2,dc3 +Status = pending +``` + +Full status information of a job: ``` $ nomad status job1 @@ -49,4 +66,12 @@ Type = service Priority = 3 Datacenters = dc1,dc2,dc3 Status = pending + +Evaluations +ID Priority Type TriggeredBy NodeID Status +193229c4-aa02-bbe6-f996-fd7d6974a309 3 service job-register node2 complete + +Allocations +ID EvalID NodeID TaskGroup DesiredStatus ClientStatus +678c51dc-6c55-0ac8-d92d-675a1e8ea6b0 193229c4-aa02-bbe6-f996-fd7d6974a309 node2 grp8 failed failed ```