Re: Container Uptime Discussion
Jim Warner <[email protected]> Fri, 9 Feb 2024 03:16:15 -0600
| Newsgroups | gmane.linux.procps.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Craig, Here is a little more icing on the container uptime cake. An lxc container might remain running for longer than the PID1 TIME_START, which was based on the host boot time. During this period TIME_ELAPSED is reported as zero since it's really negative. When a running container passes TIME_START for PID1 the lxc manipulated /proc/uptime is now greater so the existing path would be taken. However, that path now yields an incorrect 'uptime -c' value representing the interval since TIME_START was passed. This is most apparent when an lxc container is started shortly after the host is booted. Just thought you'd like to know. Regards, Jim