How to kill network users?

Hi everybody.

I am using SCO open server.
My problem is to kill users logged in my local network.

I am using Kill -9 command for kill the repective user/terminal.
But it shows in 'who -u'. when i try to kill agina that process it shows like

"6229: no such process "

User count is increasing as users are logged in my network.

It shows in "who -q" but not listed in "ps -ef ".

My limitation is only 36 users but after that count is go beyond 36 users it gives error "all licences asr in used"
but there are less then 36 users are logged in that time.

please help some script/command to kill that users listed in "who -u" which are basically not exist.

thanks

sanjay

This is because you're using "kill -9". This abuse is so abundant there's a form-letter to answer it:

I think we might add "not updating wtmp" to the list of problems kill -9 causes. If there's clutter in wtmp, there might be no solution but a reboot at this point, and using less severe kill signals after that. Or you might have left other cluttering processes behind, look carefully through the whole processlist.

Though "kill -9" does mess up wtmp, more importantly it messes up utmp which is used by "who -u". Only a reboot will bring utmp back to reality.

Can you post the licence error message. Not clear whether it comes from unix of from an application. Do you have unix "out of the box" or has there been some sort of licence installation process?

Can you post an extract from "ps -ef" (blanking anything confidential)? This should help make it clearer how the clients connect to the server.

The cause is likely that your users are just closing their terminal emulation session by clicking on the X in the upper right corner of the Windows app, instead of logging off.
The result of doing this is that the telnet session never dies and huge cpu resources are used searching for the missing client.
You should see a difference between "who" and "ps -leaf |grep ttyp"

The telnet connection will close when this happens. How the application responds to it doing so unexpectedly is up to it, but it will know the connection closed.

# ps -leaf |grep lee                                                            
                                                           
 20 O      lee 18380     1 47  33 20 fb11f910 1484         -   Oct-19   ttyp2 11
-06:53:18 dbr PGM:xx_cmenu -e/u/cops/dta5                                       
# who                                                                           
bonnie     ttyp0        Oct 26 08:39                                            
root       ttyp1        Oct 30 18:17                                            
gary       ttyp3        Oct 14 09:59                                            
norm       ttyp4        Oct 20 14:37                                            
bill       ttyp6        Oct 18 09:26                                            

As you can see, session ttyp2 still exists, even though the user has closed his terminal emulation session. This may not be an issue with HP or AIX, but it is with SCO.

---------- Post updated at 06:30 PM ---------- Previous update was at 06:20 PM ----------

#sar -u 1 3
18:31:42    %usr    %sys    %wio   %idle (-u)                                   
18:31:43      30      20       0      50                                        
18:31:44      28      22       0      50                                        
18:31:45      34      16       0      50                                        
                                                                                
Average       31      19       0      50                                        
# ps -leaf |grep lee                                                            
 20 S     dtr5  4802   576  0  66 22 fb11a468   80  e0000000 18:31:54       ?   
 00:00:00 sleep 1                                                               
 20 S     root  4803 27372  2  76 20 fb11a9c8   92  f2c0de00 18:31:55   ttyp1   
 00:00:00 grep lee                                                              
 20 O      lee 18380     1 42  35 20 fb11f910 1484         -   Oct-19   ttyp2 11
-07:06:21 dbr PGM:xx_cmenu -e/u/cops/dta5                                       
# kill -9 18380                                                                 
# sar -u 1 3                                                                    
                                                                                
SCO_SV midnight 3.2v5.0.7 >PentIII    10/30/2010                                
                                                                                
18:32:14    %usr    %sys    %wio   %idle (-u)                                   
18:32:15       0       0       0     100                                        
18:32:16       0       0       0     100                                        
18:32:17       0       0       0     100                                        
                                                                                
Average        0       0       0     100                                        

It's an issue on HP-UX (an more) too. The "telnetd" daemon exits but a sub-process does not exit, leaving the parent as PID 1 (init).