open-nomad/command
Jake Champlin edd60b4fb1 Print resource usage w/ alloc-status + node-status
When alloc-status is called, in it's long form only, print the resource
utilization for that single allocation.

When node-status is called, in it's long form only, print the TOTAL
resource utilization that is occurring on that single node.

Nomad Alloc Status:

```
% nomad alloc-status 195d3bf2
ID              = 195d3bf2
Eval ID         = c917e3ee
Name            = example.cache[1]
Node ID         = 1b2520a7
Job ID          = example
Client Status   = running
Evaluated Nodes = 1
Filtered Nodes  = 0
Exhausted Nodes = 0
Allocation Time = 17.73µs
Failures        = 0

==> Task "redis" is "running"
Recent Events:
Time                   Type      Description
04/03/16 21:20:45 EST  Started   Task started by client
04/03/16 21:20:42 EST  Received  Task received by client

==> Status
Allocation "195d3bf2" status "running" (0/1 nodes filtered)
  * Score "1b2520a7-6714-e78d-a8f7-68467dda6db7.binpack" = 1.209464
  * Score "1b2520a7-6714-e78d-a8f7-68467dda6db7.job-anti-affinity" = -10.000000

==> Resources
CPU  MemoryMB  DiskMB  IOPS
500  256       300     0
```

Nomad Node Status:

```
% nomad node-status 57b3a55a
ID         = 57b3a55a
Name       = biscuits
Class      = <none>
DC         = dc1
Drain      = false
Status     = ready
Attributes = arch:amd64, cpu.frequency:3753.458875, cpu.modelname:Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, cpu.numcores:8, cpu.totalcompute:30027.671000, driver.docker:1, driver.docker.version:1.10.2, driver.exec:1, driver.raw_exec:1, hostname:biscuits, kernel.name:linux, kernel.version:4.4.0-9-generic, memory.totalbytes:25208934400, os.name:ubuntu, os.version:16.04, unique.cgroup.mountpoint:/sys/fs/cgroup, unique.network.ip-address:127.0.0.1, unique.storage.bytesfree:219781419008, unique.storage.bytestotal:246059892736, unique.storage.volume:/dev/sdb3

==> Allocations
ID        Eval ID   Job ID   Task Group  Desired Status  Client Status
2c236883  aa11aca8  example  cache       run             running
32f6e3d6  aa11aca8  example  cache       run             running

==> Resource Utilization
CPU   MemoryMB  DiskMB  IOPS
1000  512       600     0
```
2016-03-07 09:58:35 -05:00
..
agent fix test 2016-03-06 18:41:33 -08:00
test-resources Refactor spawn-daemon so it can be used by all OSes and make it write exit code to a file 2015-10-28 16:23:33 -07:00
agent_info.go Fix append issue 2015-12-21 15:10:49 -08:00
agent_info_test.go Fix vet warnings 2015-10-07 12:26:58 +02:00
alloc_status.go Print resource usage w/ alloc-status + node-status 2016-03-07 09:58:35 -05:00
alloc_status_test.go Provide a consistent user experience with prefix based lookups. 2016-01-21 22:21:35 +01:00
client_config.go command: rename client-servers -> client-config 2015-09-25 11:49:31 -07:00
client_config_test.go command: rename client-servers -> client-config 2015-09-25 11:49:31 -07:00
eval_monitor.go Refactoring of full-id argument and id length constants 2016-01-15 23:32:38 +01:00
eval_monitor_test.go Shorten CLI identifiers 2016-01-14 21:57:43 +01:00
executor_plugin.go Not syncing stdout and stderr of pluging with client 2016-02-04 17:36:31 -08:00
fs.go Display fs in nomad help and list the subcommands when called 2016-02-05 11:01:29 -08:00
fs_cat.go Add human readable output to fs 2016-02-12 15:36:52 -08:00
fs_ls.go Add human readable output to fs 2016-02-12 15:36:52 -08:00
fs_stat.go Add human readable output to fs 2016-02-12 15:36:52 -08:00
helpers.go Updated the time stamp style 2016-02-01 17:41:47 -08:00
helpers_test.go command: placeholder for <none> in kv output 2015-09-27 14:04:53 -07:00
init.go Added the log config to init example 2016-02-11 12:21:19 -08:00
init_test.go command: test init 2015-09-30 14:21:50 -07:00
meta.go Refactoring of full-id argument and id length constants 2016-01-15 23:32:38 +01:00
meta_test.go command: use meta struct for common options 2015-09-14 13:24:03 -07:00
monitor.go Shorted eval id and only print waiting if time > 0 2016-02-06 16:09:39 -08:00
monitor_test.go Provide a consistent user experience with prefix based lookups. 2016-01-21 22:21:35 +01:00
node_drain.go Merge pull request #692 from iverberk/f-detect-half-byte-prefix 2016-01-21 14:12:27 -08:00
node_drain_test.go Provide a consistent user experience with prefix based lookups. 2016-01-21 22:21:35 +01:00
node_status.go Print resource usage w/ alloc-status + node-status 2016-03-07 09:58:35 -05:00
node_status_test.go Provide a consistent user experience with prefix based lookups. 2016-01-21 22:21:35 +01:00
run.go Refactoring of full-id argument and id length constants 2016-01-15 23:32:38 +01:00
run_test.go Fixed tests 2016-02-11 17:34:46 -08:00
server_force_leave.go command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00
server_force_leave_test.go command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00
server_join.go command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00
server_join_test.go command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00
server_members.go Do not use the exact internal field names in the CLI output 2016-01-21 21:35:56 +01:00
server_members_test.go command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00
status.go standardize on <> for required flags 2016-01-27 12:00:31 -08:00
status_test.go Refactoring of full-id argument and id length constants 2016-01-15 23:32:38 +01:00
stop.go Refactoring of full-id argument and id length constants 2016-01-15 23:32:38 +01:00
stop_test.go Refactoring continued 2015-12-24 20:53:37 +01:00
syslog_plugin.go Starting the syslog collector along with a docker container 2016-02-09 18:24:30 -08:00
util_test.go Fixes 2016-02-19 15:49:32 -08:00
validate.go fix 2015-12-18 12:17:50 -08:00
validate_test.go Fixed tests 2016-02-11 17:34:46 -08:00
version.go Adding basic version command 2015-06-01 15:25:51 +02:00
version_test.go Adding basic version command 2015-06-01 15:25:51 +02:00