the etime no vaule in the fedora lxc

lynn_yudi

Active Member
Nov 27, 2011
86
0
26
hi,all

in the fedora lxc, the etime no value.

root@fedora-22:~# ps ax -o pid,etime,command
PID ELAPSED COMMAND
1 00:00 /sbin/init
149 00:00 /usr/lib/systemd/systemd-journald
201 00:00 /usr/lib/systemd/systemd-logind
233 00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
275 00:00 /usr/sbin/rsyslogd -n
357 00:00 /sbin/agetty --noclear --keep-baud pts/1 115200 38400 9600 vt220
371 00:00 /sbin/agetty --noclear --keep-baud pts/0 115200 38400 9600 vt220
390 00:00 /sbin/agetty --noclear tty2 linux
415 00:00 /sbin/agetty --noclear tty1 linux
418 00:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220
542 00:00 /bin/bash
559 00:00 ps ax -o pid,etime,command

in the centos lxc , it's normal, without this issue.

root@base-el6-16g:~# cat /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m

root@base-el6-16g:~# ps ax -o pid,etime,command
PID ELAPSED COMMAND
1 00:37 /sbin/init
133 00:36 /sbin/mingetty console
304 00:34 /usr/sbin/sshd
316 00:34 crond
324 00:34 /sbin/mingetty /dev/tty1
326 00:34 /sbin/mingetty /dev/tty2
327 00:21 /bin/bash
350 00:00 ps ax -o pid,etime,command

so, how can fixed this issue?

# pveversion -v
proxmox-ve: 4.2-60 (running kernel: 4.4.13-1-pve)
pve-manager: 4.2-17 (running version: 4.2-17/e1400248)
pve-kernel-4.4.13-1-pve: 4.4.13-56
pve-kernel-4.4.15-1-pve: 4.4.15-60
lvm2: 2.02.116-pve2
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-43
qemu-server: 4.0-85
pve-firmware: 1.1-8
libpve-common-perl: 4.0-71
libpve-access-control: 4.0-18
libpve-storage-perl: 4.0-56
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-qemu-kvm: 2.6-1
pve-container: 1.0-71
pve-firewall: 2.0-29
pve-ha-manager: 1.0-33
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 1.1.5-7
lxcfs: 2.0.0-pve2
cgmanager: 0.39-pve1
criu: 1.6.0-1
zfsutils: 0.6.5.7-pve10~bpo80
openvswitch-switch: 2.5.0-1
 
I have the same problem. Some processes have etime, but some do not. An example:
Code:
# ps -e -o user,pid,start,etime,command

USER       PID  STARTED     ELAPSED COMMAND
root         1   Apr 04  3-19:49:38 /lib/systemd/systemd --system --deserialize 15
root        48   Apr 04  3-19:49:36 /lib/systemd/systemd-journald
root        95   Apr 04  3-19:49:35 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
root       136   Apr 04  3-19:49:35 /usr/sbin/sshd -D
root       139   Apr 04  3-19:49:35 /usr/sbin/cron -f
root       140   Apr 04  3-19:49:35 /usr/sbin/rsyslogd -n
message+   143   Apr 04  3-19:49:35 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
mail       154   Apr 04  3-19:49:34 /usr/sbin/nullmailer-send -s
root       156   Apr 04  3-19:49:34 /usr/bin/perl -wT /usr/sbin/munin-node
root     10389 10:00:36       00:00 sshd: root@pts/0 
root     10391 10:00:36       00:00 -bash
root     10396 10:00:38       00:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt102
root     10397 10:00:43       00:00 ps -e -o user,pid,start,etime,command
solr     11380   Apr 21       00:00 /usr/lib/jvm/jdk8/bin/java -server -Xss256k -Xms5000m -Xmx5000m -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:Max
root     20732   May 08       00:00 /lib/systemd/systemd-logind
root     29158   May 26       00:00 /usr/bin/ruby /usr/bin/puppet agent

Note the 00:00 values, even though some processes have been running for days and weeks even. I guess it's some kind of configuration problem with the container.

Stefan
 
I encountered this problem using regular and unprivileged containers. Is this related to apparmor job? If so, how can I configure the apparmor so that the elapsed time of processes is updated inside containers?
 
Still happening.
I noticed in the PVE host, the process ELAPSED time shows up. But not in the LXC. LXC is running Debian 11.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!