1847936 Members
3789 Online
104021 Solutions
New Discussion

Re: Ps -ef

 
Jason Tan
Advisor

Ps -ef

Why even user already log-out the system but it still show on the ps screen? sooner or later the list get very long. What is the meaning of ? mark? Is there a best way to determine which one is inactive for long time?
smtan
2 REPLIES 2
Stefan Farrelly
Honored Contributor

Re: Ps -ef

clearly users are not disconnecting properly from your server, thus their processes are being left behind. You need to look into how your users connect and disconnect and try to ensure they disconnect correctly, or why your application doesnt terminate their processes when they do disconnect.

As to determining who is logged in or not use who -u This confirms who is logged in, if a process belonging to a user is not listed, or has OLD listed by who -u then you can kill them.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Rajeev  Shukla
Honored Contributor

Re: Ps -ef

The "?" mark after a process means that the process has detached from the "tty" but hasn't died. This is a normal behaviour for daemon process running on unix but not normal if its an user owned or started application. This means that a that the user hasn't properly exited from application but just closed his telnet window.
You need to make sure its not any process started by nohup(coz even nohup can let "?" behavour) so consult the user and then you can kill the process and advise them not to do this in future.

Cheers
rajeev