Commit Graph

69 Commits

Author SHA1 Message Date
Alex Dadgar 5be806a3df Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar 3d353ffbcd Node-status displays drivers
This PR adds the drivers that are enabled to the output of `nomad
node-status`
2017-02-22 18:54:28 -08:00
Diptanu Choudhury 7567209857 Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Alex Dadgar e2c16446ec Output Node meta in verbose mode 2016-10-20 17:36:34 -07:00
Mathias Lafeldt 074ff512b2
Make node-status -short work without node stats 2016-08-29 17:45:37 +02:00
Diptanu Choudhury 37d0c2c01c Merge pull request #1538 from nak3/output-host-disk-utilization2
node-status outputs volumename instead of 0B utilization when non-physical volume is used
2016-08-10 15:09:23 -07:00
Kenjiro Nakayama 32d20c8453 Add test to check both -json and -t are not specified 2016-08-09 21:06:20 +09:00
Kenjiro Nakayama b5b6297cd3 Support JSON and template data output list when no args specified 2016-08-09 21:06:20 +09:00
Kenjiro Nakayama 770f37881f Update help and error message 2016-08-09 21:06:20 +09:00
Kenjiro Nakayama 64340a6e1b Stop using format option and support json and t option 2016-08-09 21:06:20 +09:00
Kenjiro Nakayama 41cf333c51 Support JSON and template format with nomad CLI 2016-08-09 21:06:20 +09:00
Kenjiro Nakayama 0fc15287f9 node-status outputs volumename instead of 0B utilization with non-physical volume 2016-08-09 08:51:19 +09:00
Kenjiro Nakayama 7dfc75ac9c tiny: Add MHz to node-status output 2016-08-08 13:12:01 +09:00
Sean Chittenden 7566e8a04b
Improve the error messages when obtaining node and alloc stats 2016-06-17 13:24:10 -07:00
Alex Dadgar fc8254d157 Update node-status docs 2016-06-16 14:50:41 -07:00
Alex Dadgar e547f1a86d use base 1024 for bytes not 1000 2016-06-12 14:20:39 -07:00
Alex Dadgar a49bb31561 unify units 2016-06-12 11:19:45 -07:00
Alex Dadgar 974c713b4d show allocation resources seperate from host 2016-06-12 11:19:45 -07:00
Alex Dadgar 61fcebf296 initial refactor and cleanup 2016-06-12 11:19:45 -07:00
Diptanu Choudhury 01054db4fa Calculating total ticks consumed in the nomad client 2016-06-10 23:14:33 +02:00
Diptanu Choudhury ef2d630ea4 Changed the logic of calculation of node cpu usage 2016-06-10 03:24:42 +01:00
Diptanu Choudhury 843d7e224e Moving the stats error to the bottom of node status 2016-06-08 12:21:20 -04:00
Diptanu Choudhury 4a35ffa1ef Indicating which values are percentages 2016-06-06 16:10:34 -07:00
Diptanu Choudhury c21d606ebb Getting inodes used percent back 2016-06-06 16:10:34 -07:00
Diptanu Choudhury 9db3b002b0 Showing detailed resource usage stats in alloc-stats 2016-06-06 16:10:34 -07:00
Diptanu Choudhury 1bf3280f95 Showing actual resource usage 2016-06-06 16:10:34 -07:00
Diptanu Choudhury 10b9eeef56 Added the stats flag 2016-06-06 16:10:34 -07:00
Diptanu Choudhury d928d02d85 Removing inode percent since it doesn't work in some cases 2016-06-06 16:10:34 -07:00
Diptanu Choudhury 37e8e0dc35 Fixed the node status cli command 2016-05-28 19:59:20 -07:00
Diptanu Choudhury 05c221186b Added disk usage to node status 2016-05-28 19:59:20 -07:00
Diptanu Choudhury cf247c1309 Added uptime to node stats 2016-05-28 19:59:20 -07:00
Diptanu Choudhury 73fa700a88 Showing host resource usage stats 2016-05-28 19:59:20 -07:00
Alex Dadgar 60153ed845 Add -self flag to node-drain 2016-04-11 15:20:49 -07:00
Alex Dadgar 7bee675b6c node-status -self command and docs 2016-03-29 12:36:24 -07:00
Alex Dadgar e2c0ca48b8 node-status fix panic 2016-03-22 16:25:25 -07:00
Alex Dadgar d8d1447f8c less verbose output and show node's total resources 2016-03-20 17:36:40 -07:00
Diptanu Choudhury 7ed107d04e Always defaulting to prefix match 2016-03-17 17:25:38 -07:00
Jake Champlin 3852aa4ae4 Cleanup style, and make cleaner 2016-03-07 09:58:35 -05:00
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
Jake Champlin ce27b1e8ea Add -allocs to help output 2016-03-03 14:46:24 -05:00
Jake Champlin 4e6737651a Only fetch running allocs, use args, add docs
Only fetch running allocations, not total allocated ids, add
documentation, and cleanup things.
2016-03-03 14:09:07 -05:00
Jake Champlin c4a3f5047b Include number of allocations in node-status
We recently ran into an issue on a small percentage of nomad-clients
where the nomad-client was running successfully, but due to a race
condition, could not correctly bind to the docker socket. This caused
all of our nomad jobs to be allocated to a single nomad-client instead
of being spread evenly across our clients. The only way to discover this
was to run `nomad node-status <node>` and count each job allocation per
node.

This can lead to a fairly long debugging process if there are several
nomad-clients. Including the number of allocations for each node in the
`node-status` command would save a large amount of debug time.

```
jake@biscuits [12:08:41] [~]
-> % nomad node-status
ID        Datacenter  Name      Class   Drain  Status  Allocations
2b0aabc5  dc1         biscuits  <none>  false  ready   0
```

```
jake@biscuits [12:08:55] [~]
-> % nomad node-status
ID        Datacenter  Name      Class   Drain  Status  Allocations
2b0aabc5  dc1         biscuits  <none>  false  ready   1
```
2016-03-03 12:19:56 -05:00
Alex Dadgar 4332263048 standardize on <> for required flags 2016-01-27 12:00:31 -08:00
Alex Dadgar 837ca9ab86 limit length of string, taking into account its length 2016-01-27 10:42:10 -08:00
Alex Dadgar 436c13d26a Merge pull request #692 from iverberk/f-detect-half-byte-prefix
Detect a half-byte prefix
2016-01-21 14:12:27 -08:00
Ivo Verberk 9ab2135b38 Provide a consistent user experience with prefix based lookups.
* Require at least two characters for identifier
* Automatically strip off the last character in case of uneven length
2016-01-21 22:21:35 +01:00
Alex Dadgar ab6de99472 Remove non-standard CLI element 2016-01-21 13:13:36 -08:00
Ivo Verberk c44b4c8aa9 Do not use the exact internal field names in the CLI output 2016-01-21 21:35:56 +01:00
Ivo Verberk d8ac284bdd Detect a half-byte prefix and display a user-friendly error. 2016-01-21 20:53:05 +01:00
Ivo Verberk 427d3d650d Refactoring of full-id argument and id length constants
* full-id argument is now called verbose to be more future-proof
* constants for identifier length are a little more concise
2016-01-15 23:32:38 +01:00