问题原文
原帖链接 · Razib · CC BY-SA 3.0
When I logged in a server and issue a 'screen -list' commands it gives the following result -
31917.pts-5.office (Detached)
31844.pts-0.office (Detached)
But it is sometimes important to know who has start the screen session - eg.- as system admin may want to kill some specific screen session and when it's important to know who start the session. Is there any way to know who is initiator/owner of the screen session?
Thanks
已采纳解答
原帖链接 · user9517 · CC BY-SA 3.0
The screen -ls | screen -list commands only show you your own screen sessions even for root. As far as I know that's as good as it gets for screen itself.
If you want to see which screen sessions have been started by which users look in each users directory in /var/run/screen/
ls -lR /var/run/screen
/var/run/screen:
total 0
drwx------ 2 iain iain 80 Feb 20 18:14 S-iain
drwx------ 2 root root 60 Feb 20 18:19 S-root
/var/run/screen/S-iain:
total 0
prw------- 1 iain iain 0 Feb 20 18:13 4093.pts-0.host1
prw------- 1 iain iain 0 Feb 20 18:14 4105.pts-0.host1
/var/run/screen/S-root:
total 0
prw------- 1 root root 0 Feb 20 18:19 4128.pts-0.host1
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
