Hello. Please help me understand.
Using these images: images:debian/bookworm/amd64
and images:debian/bookworm/cloud
.
I want to find out how much time since when the particular process is running.
Example command:
ps -eo pid,etimes,start_time,args --sort=start_time
root@testtime2:/proc/1# ps -eo pid,etimes,start_time,args --sort=start_time
PID ELAPSED START COMMAND
1 739 14:36 /sbin/init
120 738 14:36 /lib/systemd/systemd-journald
127 738 14:36 /lib/systemd/systemd-udevd
131 738 14:36 /lib/systemd/systemd-resolved
138 738 14:36 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
140 738 14:36 /lib/systemd/systemd-logind
144 738 14:36 /sbin/agetty -o -p -- \u --noclear --keep-baud - 115200,38400,9600 linux
146 737 14:36 /lib/systemd/systemd-networkd
147 733 14:37 bash
170 4123168224 14:55 ps -eo pid,etimes,start_time,args --sort=start_time
root@testtime2:/proc/1#
user@host-1:~$ uptime
14:58:47 up 28 min, 2 users, load average: 0.00, 0.00, 0.02
root@testtime2:/proc/1# uptime
14:58:24 up 21 min, 0 user, load average: 0.00, 0.00, 0.02
As you see above, the host and containers booted just recently, but elapsed time is way too high, and it does not change. I have checked my other older setups (like debian 11 and LXD), on those containers I get constantly reported 0
even though the process has been running for some time.
ps
command looks up information in /proc/
sub directories, and probably something is reported there incorrectly. Does incus container require special kernel privileges for this? If so, then what permissions need granting? I have alrady made container privileged, that did not help.
Thank you.