2

This is how the output of screen -ls looks like for many years on one older Debian machine:

artax:~> screen -ls
There are screens on:
        46785.pts-6.artax       (08/26/2019 04:41:05 AM)        (Detached)
        2499.pts-0.artax        (05/11/2019 07:30:55 PM)        (Detached)
artax:~> screen --version
Screen version 4.01.00devel (GNU) 2-May-06

But now, on the new CentOS, the output doesn't contain the date & time:

user@comp:~$ screen -ls
There is a screen on:
        1759.pts-0.user-comp     (Detached)
1 Socket in /var/run/screen/S-user.

user@comp:~$ screen --version
Screen version 4.01.00devel (GNU) 2-May-06

The date & time of the session is important for me - I have a nice script which uses this information. How do I invoke it in the CentOS version of the screen command?

I searched the manpage but with no success.

EDIT: there is also a difference on manual pages: Debian version:

-ls [match] -list [match] does not start screen, but prints a list of pid.tty.host strings and creation timestamps identifying your screen sessions.

CentOS version:

-ls [match] -list [match] does not start screen, but prints a list of pid.tty.host strings identifying your screen sessions.

2
  • are you sure the process 1759 is still here ? Commented Nov 22, 2019 at 23:57
  • @EchoMike444 yes it is. And I was able to attach the session using screen -dr.
    – Tomas
    Commented Nov 22, 2019 at 23:58

1 Answer 1

4

version 4.0.1 is very old :)

the creation timestamp is a debian specific patch

source :

https://salsa.debian.org/debian/screen/blob/ab7d6dee8d34b09b192ae438a1639e53bcee2e29/debian/patches/80EXP_session_creation_time.patch

because the number is the pid of screen , you can use ps to display the starting time of one process .

 ps -o lstart= -p 21628
 Fri Nov 22 18:49:50 2019
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .