Reputation: 485
I'm running a long script on a Linux server. To avoid getting kicked due to inactivity, I used screen
to make sure the script runs to termination. It's been a few hours now and I'd like to know how long exactly the screen has been active for. The command I launched the screen with is screen -S fragmentation ./fragment-all.sh
. I do not have root privilege.
yangsong@lanikai ~ $ screen -ls
There is a screen on:
852342.fragmentation (Detached)
1 Socket in /tmp/screen/S-yangsong.
Upvotes: 1
Views: 2859
Reputation: 222
pgrep screen
. (process grep screen).
top
command to see all the process that running and look for screen process with his own PID (process id).ps -o etime= -p "PID"
to see how much time the process is running.
pgrep screen
command.[[dd-]hh:]mm:ss
.kill PID
.
ps -o stime,time PID
Upvotes: 4