[RFC] [uptime] Provide container uptime
Reference: https://bugs.debian.org/827171
uptime
and w
currently report the uptime of the host, not the container. This is because the programs call the library function procps_uptime()
which parses the file /proc/uptime Containers, or some types of containers, have the same file so the same uptime.
So should there be a new library function that provides a container uptime and if so, where does this come from? Some have suggested the creation time of /sys/pts
or the start time of PID 1 (or 0, it depends).