ps -eo lxc no longer shows a task's lxc container

Bug #1866124 reported by Forest
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Invalid
Undecided
Unassigned
procps (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I use the ps command's "lxc" format specifier, for example:

ps -eo pid,lxc,command

The second output column is supposed to show "the name of the lxc container within which a task is running. If a process is not running inside a container, a dash ('-') will be shown." [1]

This worked fine until I upgraded from ubuntu 19.04 to 19.10, which brought me from lxc 3.03 to 3.04. Now, that column always contains a dash instead of the container name, even for processes that are running inside a container. The "lxc" format specifier seems to be broken now.

[1] https://manpages.ubuntu.com/manpages/eoan/man1/ps.1.html#standard%20format%20specifiers

Forest (foresto)
description: updated
Revision history for this message
Forest (foresto) wrote :

The top command's LXC column (not shown by default, but can be enabled through the 'f' menu) also shows a - for all processes, including those that belong to containers.

My containers are unprivileged, in case that matters.

Changed in lxc (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.