1856403 Members
5787 Online
104112 Solutions
New Discussion

stagnant session

 
SOLVED
Go to solution
Shawn Miller_2
Frequent Advisor

stagnant session

When using last or who I can see sessions that show still logged in and I know this session is no longer being used. How do I kill or remove that connection.
2 REPLIES 2
Rodney Hills
Honored Contributor

Re: stagnant session

After you have the PID for the process,

kill -4

This will attempt to kill the process, but allow the process to do any cleanup.

kill -9

Is the last resort. The process does not get the opportunity to do any cleanup
There be dragons...
Tim Malnati
Honored Contributor
Solution

Re: stagnant session

Typically I prefer to first use a kill -1 where this signals a hangup and does all the proper things with process and user accounting. But some processes will reattach to pid 1 and still remain active. In this event I've found that kill -15 is more effective than kill -4. Kill -9 should be avoided (last resort).