github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/alloc/signal.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: alloc signal'
     4  description: |
     5    Signal a running allocation or task
     6  ---
     7  
     8  # Command: alloc signal
     9  
    10  The `alloc signal` command allows a user to perform an in place signal of an
    11  an entire allocation or individual task.
    12  
    13  ## Usage
    14  
    15  ```plaintext
    16  nomad alloc signal [options] <allocation> <task>
    17  ```
    18  
    19  This command accepts a single allocation ID and a task name. The task name must
    20  be part of the allocation and the task must be currently running. The task name
    21  is optional and if omitted every task in the allocation will be signaled.
    22  
    23  Task name may also be specified using the `-task`  option rather than a command 
    24  argument. If task name is given with both an argument and the `-task` option, 
    25  preference is given to the `-task` option.
    26  
    27  When ACLs are enabled, this command requires a token with the
    28  `alloc-lifecycle`, `read-job`, and `list-jobs` capabilities for the
    29  allocation's namespace.
    30  
    31  ## General Options
    32  
    33  @include 'general_options.mdx'
    34  
    35  ## Signal Options
    36  
    37  - `-s`: Signal to send to the tasks. Valid options depend on the driver.
    38  
    39  - `-task`: Specify the individual task that will receive the signal.
    40  
    41  - `-verbose`: Display verbose output.
    42  
    43  ## Examples
    44  
    45  ```shell-session
    46  $ nomad alloc signal eb17e557
    47  
    48  $ nomad alloc signal eb17e557 redis
    49  Could not find task named: redis, found:
    50  * test
    51  <blocking>
    52  ```
    53  
    54  Specifying task name with the `-task` option:
    55  
    56  ```shell-session
    57  $ nomad alloc signal -task redis eb17e557
    58  ```
    59  
    60  If task name is specified using both options, the command argument is ignored.
    61  The following will signal the "redis" task only, not the "api" task:
    62  
    63  ```shell-session
    64  $ nomad alloc signal -task redis eb17e557 api
    65  ```