]> git.proxmox.com Git - pve-container.git/commit
fix hardcoded CT uptime in vmstatus
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 Sep 2015 12:20:16 +0000 (14:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 30 Sep 2015 12:58:48 +0000 (14:58 +0200)
commit88a8696be455a3f22a8813472d2428dfa62a9c30
tree1361c578ac8824d8abe92cdc87178ac0ad69444a
parentc52e88d98fe33038fab109e2280c0c4762db0ac4
fix hardcoded CT uptime in vmstatus

Implement the container uptime by susbtracting the ctime from the
container pid file from the actual time.
This mirrors the behaviour of lxcfs, see get_pid1_time() in lxcfs.c.
This hass some limitations, like frozen or live migrated containers
falsify the real uptime. But as it shows everytime the uptime like
a uptime command in the container would this is forgivable, for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC.pm