mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add "OOM killed" event based on OOM state information
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
This commit is contained in:
parent
8412e3c226
commit
44cab4a4ff
3 changed files with 8 additions and 2 deletions
|
@ -154,6 +154,9 @@ func (m *containerMonitor) Start() error {
|
||||||
|
|
||||||
if m.shouldRestart(exitStatus.ExitCode) {
|
if m.shouldRestart(exitStatus.ExitCode) {
|
||||||
m.container.SetRestarting(&exitStatus)
|
m.container.SetRestarting(&exitStatus)
|
||||||
|
if exitStatus.OOMKilled {
|
||||||
|
m.container.LogEvent("oom")
|
||||||
|
}
|
||||||
m.container.LogEvent("die")
|
m.container.LogEvent("die")
|
||||||
m.resetContainer(true)
|
m.resetContainer(true)
|
||||||
|
|
||||||
|
@ -170,6 +173,9 @@ func (m *containerMonitor) Start() error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
m.container.ExitCode = exitStatus.ExitCode
|
m.container.ExitCode = exitStatus.ExitCode
|
||||||
|
if exitStatus.OOMKilled {
|
||||||
|
m.container.LogEvent("oom")
|
||||||
|
}
|
||||||
m.container.LogEvent("die")
|
m.container.LogEvent("die")
|
||||||
m.resetContainer(true)
|
m.resetContainer(true)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -1375,7 +1375,7 @@ polling (using since).
|
||||||
|
|
||||||
Docker containers will report the following events:
|
Docker containers will report the following events:
|
||||||
|
|
||||||
create, destroy, die, export, kill, pause, restart, start, stop, unpause
|
create, destroy, die, export, kill, oom, pause, restart, start, stop, unpause
|
||||||
|
|
||||||
and Docker images will report:
|
and Docker images will report:
|
||||||
|
|
||||||
|
|
|
@ -761,7 +761,7 @@ For example:
|
||||||
|
|
||||||
Docker containers will report the following events:
|
Docker containers will report the following events:
|
||||||
|
|
||||||
create, destroy, die, export, kill, pause, restart, start, stop, unpause
|
create, destroy, die, export, kill, oom, pause, restart, start, stop, unpause
|
||||||
|
|
||||||
and Docker images will report:
|
and Docker images will report:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue