htop icon indicating copy to clipboard operation
htop copied to clipboard

Add support of UUID CTID used in the new version of OpenVZ

Open TresRus opened this issue 8 years ago • 2 comments

In the new version of OpenVZ (Virtuozzo 7), containers could be identified by UUIDs and integer numbers like before (so called legacy CTID). Existing support of OpenVZ can't work with UUIDs. This patch fix it.

CTIDs and VPIDs are now read from /proc/[id]/status instead of /proc/[id]/stat because of the following reasons:

  • the /proc/[id]/status has named fields and OpenVZ kernel writes either CTID or UUID to envID field (depending on which type is used);
  • OpenVZ kernel appends own data to /proc/[id]/stat file, a change in parameters reported by vanilla kernel would also shift the position of OpenVZ data so it would not be read correctly.

As UUIDs are much longer than old numerical CTIDs, the UUID strings will get truncated in output (although sorting is still done using complete UUIDs).

TresRus avatar Apr 07 '16 13:04 TresRus

Is there a reason not to support UUID CTID in htop?

ginggs avatar Feb 06 '18 05:02 ginggs

This patch (which we carry for Debian) collides with the new thread detection code now, cf. commit 47cf1532b0c9fbc70bada5022a7db07d3cc4811a (bug #761).

So

  1. This patch needs updating and
  2. Q to Hisham: Is this functionality interesting for htop to include or will it not make it in tree? (as to whether we need to / should continue to carry it in Debian)

/DLange

fasterit avatar Apr 23 '18 15:04 fasterit