microsoft / Windows-Containers

Welcome to our Windows Containers GitHub community! Ask questions, report bugs, and suggest features — let's work together.
MIT License
432 stars 64 forks source link

Are throttle events logged? #177

Open Hvid opened 3 years ago

Hvid commented 3 years ago

If i setup a container with limits on cpu count and memory:

C:\>docker inspect testcontainer --format "Name: {{.Name}} | CpuCount: {{.HostConfig.CpuCount}} | Memory: {{json .HostConfig.Memory}} | Isolation: {{.HostConfig.Isolation}}"
Name: /testcontainer| CpuCount: 4 | Memory: 4294967296 | Isolation: process

Are the throttle/kill/restart events logged anywhere?

ghost commented 3 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

Hvid commented 3 years ago

Ping

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

Hvid commented 2 years ago

Ping?

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

Hvid commented 2 years ago

ping??

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ghost commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

Hvid commented 1 year ago

Has this project been abandoned?

vrapolinario commented 1 year ago

Definitely not abandoned. Apologies for the long wait. Have you checked docker events? The actions you mentioned should be listed there.

vrapolinario commented 1 year ago

In fact, just tested. I ran docker events and created and removed a container. This is what I got:

PS C:\Users\viniap> docker events
2023-04-22T15:06:04.605477400+02:00 container create b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (image=iismonitorimage:v1, name=modest_rubin)
2023-04-22T15:06:04.663299200+02:00 network connect bd980384df16661537d1d65ca2e7f6429ac078151317cb58df7f1131c22af524 (container=b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0, name=nat, type=nat)
2023-04-22T15:06:07.633370700+02:00 container start b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (image=iismonitorimage:v1, name=modest_rubin)
2023-04-22T15:06:07.918513600+02:00 container exec_create: cmd.exe /C ECHO 172.16.25.208    host.docker.internal >> %systemroot%\system32\drivers\etc\hosts & ECHO 172.16.25.208    gateway.docker.internal >> %systemroot%\system32\drivers\etc\hosts b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (execID=de63332190528a8e6fd55953c87be374c44933023e271f806f6a2b6584fed16a, image=iismonitorimage:v1, name=modest_rubin)
2023-04-22T15:06:07.921660900+02:00 container exec_start: cmd.exe /C ECHO 172.16.25.208    host.docker.internal >> %systemroot%\system32\drivers\etc\hosts & ECHO 172.16.25.208    gateway.docker.internal >> %systemroot%\system32\drivers\etc\hosts b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (execID=de63332190528a8e6fd55953c87be374c44933023e271f806f6a2b6584fed16a, image=iismonitorimage:v1, name=modest_rubin)
2023-04-22T15:07:26.680259400+02:00 container kill b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (image=iismonitorimage:v1, name=modest_rubin, signal=9)
2023-04-22T15:07:26.681971500+02:00 container die b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (exitCode=4294967295, image=iismonitorimage:v1, name=modest_rubin)
2023-04-22T15:07:26.733914600+02:00 network disconnect bd980384df16661537d1d65ca2e7f6429ac078151317cb58df7f1131c22af524 (container=b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0, name=nat, type=nat)
2023-04-22T15:07:26.751586400+02:00 container destroy b9da6d9803b0e7e297eb736e702b2fcd8b4d1175bcd79532bef8e27d02a24bb0 (image=iismonitorimage:v1, name=modest_rubin)

Also worth noticing that it was logged in Event Viewer as well under the source docker.

Hvid commented 1 year ago

I did check docker events and eventlogs on the host. There does not seem to be an info on when CPU is throttled.

Hvid commented 1 year ago

If container is restarted because of a memory limit, it doesn't state the reason either.

jsturtevant commented 1 year ago

That CPU/memory throttling information isn't exposed anywhere that I know of. It might be possible to query the job object for those notifications: https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_notification_limit_information if the underlying jobobject that backs the Container has notfications turned on (I don't know).

@kevpar or @plooploops might know?

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

ntrappe-msft commented 1 year ago

Still looking into this.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.

fady-azmy-msft commented 1 year ago

@riyapatel-ms FYI.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 90 days with no updates. @brasmith-ms, @riyapatel-ms, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been open for 90 days with no updates. @miremsft, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been open for 90 days with no updates. @miremsft, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 4 weeks ago

This issue has been open for 90 days with no updates. @miremsft, please provide an update or close this issue.