On 12-09-10 02:02 PM, Dan Kegel wrote: > 'uptime' seems to be the uptime of the host, not of the guest. Is > that intended?
uptime reads /proc/uptime which is gets you the time since the kernel was started. There are a few ways of "fixing" that issue: - Implement a new time namespace allowing us to reset the time to 0 when spawning a new container. - Use the fuse filesystem that was described at plumbers (some kind of lxcfs) that will let us generate the right value in userspace and bind-mount it over /proc/uptime in the container. The first is I believe the right way to do it, though it's not an high priority namespace, we have the user namespace, device namespace and syslog namespace that seem to be more pressing. The second solution is a good temporary workaround that'd equally apply to /proc/cpuinfo, /proc/meminfo, ... and wouldn't require any change in the kernel (or even lxc for that matter). -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users