github.com/slava-ustovytski/docker@v1.8.2-rc1/man/docker-events.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-events - Get real time events from the server
     6  
     7  # SYNOPSIS
     8  **docker events**
     9  [**--help**]
    10  [**-f**|**--filter**[=*[]*]]
    11  [**--since**[=*SINCE*]]
    12  [**--until**[=*UNTIL*]]
    13  
    14  
    15  # DESCRIPTION
    16  Get event information from the Docker daemon. Information can include historical
    17  information and real-time information.
    18  
    19  Docker containers will report the following events:
    20  
    21      create, destroy, die, export, kill, pause, restart, start, stop, unpause
    22  
    23  and Docker images will report:
    24  
    25      untag, delete
    26  
    27  # OPTIONS
    28  **--help**
    29    Print usage statement
    30  
    31  **-f**, **--filter**=[]
    32     Provide filter values (i.e., 'event=stop')
    33  
    34  **--since**=""
    35     Show all events created since timestamp
    36  
    37  **--until**=""
    38     Stream events until this timestamp
    39  
    40  You can specify `--since` and `--until` parameters as an RFC 3339 date,
    41  a UNIX timestamp, or a Go duration string (e.g. `1m30s`, `3h`). Docker computes
    42  the date relative to the client machine’s time.
    43  
    44  # EXAMPLES
    45  
    46  ## Listening for Docker events
    47  
    48  After running docker events a container 786d698004576 is started and stopped
    49  (The container name has been shortened in the output below):
    50  
    51      # docker events
    52      2015-01-28T20:21:31.000000000-08:00 59211849bc10: (from whenry/testimage:latest) start
    53      2015-01-28T20:21:31.000000000-08:00 59211849bc10: (from whenry/testimage:latest) die
    54      2015-01-28T20:21:32.000000000-08:00 59211849bc10: (from whenry/testimage:latest) stop
    55  
    56  ## Listening for events since a given date
    57  Again the output container IDs have been shortened for the purposes of this document:
    58  
    59      # docker events --since '2015-01-28'
    60      2015-01-28T20:25:38.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) create
    61      2015-01-28T20:25:38.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    62      2015-01-28T20:25:39.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) create
    63      2015-01-28T20:25:39.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    64      2015-01-28T20:25:40.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) die
    65      2015-01-28T20:25:42.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) stop
    66      2015-01-28T20:25:45.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    67      2015-01-28T20:25:45.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) die
    68      2015-01-28T20:25:46.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) stop
    69  
    70  The following example outputs all events that were generated in the last 3 minutes,
    71  relative to the current time on the client machine:
    72  
    73      # docker events --since '3m'
    74      2015-05-12T11:51:30.999999999Z07:00 4386fb97867d: (from ubuntu-1:14.04) die
    75      2015-05-12T15:52:12.999999999Z07:00 4 4386fb97867d: (from ubuntu-1:14.04) stop
    76      2015-05-12T15:53:45.999999999Z07:00  7805c1d35632: (from redis:2.8) die
    77      2015-05-12T15:54:03.999999999Z07:00  7805c1d35632: (from redis:2.8) stop
    78  
    79  If you do not provide the --since option, the command returns only new and/or
    80  live events.
    81  
    82  # HISTORY
    83  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    84  based on docker.com source material and internal work.
    85  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    86  June 2015, updated by Brian Goff <cpuguy83@gmail.com>