How to kill network users?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to kill network users?
# 1  
Old 10-28-2010
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
# 2  
Old 10-28-2010
Quote:
Originally Posted by sanjaykunjam
I am using Kill -9 command for kill the repective user/terminal.
But it shows in 'who -u'.
This is because you're using "kill -9". This abuse is so abundant there's a form-letter to answer it:

Quote:
No no no. Don't use kill -9.

It doesn't give the process a chance to cleanly:

1) shut down socket connections

2) clean up temp files

3) inform its children that it is going away

4) reset its terminal characteristics

and so on and so on and so on.

Generally, send 15, and wait a second or two, and if that doesn't
work, send 2, and if that doesn't work, send 1. If that doesn't,
REMOVE THE BINARY because the program is badly behaved!

Don't use kill -9. Don't bring out the combine harvester just to tidy
up the flower pot.
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.
# 3  
Old 10-28-2010
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.
# 4  
Old 10-28-2010
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"
# 5  
Old 10-28-2010
Quote:
Originally Posted by jgt
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
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.
# 6  
Old 10-30-2010
Quote:
Originally Posted by Corona688
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.
Code:
# 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 ----------

Code:
#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

# 7  
Old 10-30-2010
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).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

command to kill all loged in users

Guy's I'm looking for command to kill all the loged in users in AIX server Is there specific command can help us to kill any loged in users I have this command who -u it'll show me the process ID of all the users but I want command to kill all the users including to root without... (1 Reply)
Discussion started by: Mr.AIX
1 Replies

2. HP-UX

kill idle users

Hi, In my network we uses the NetTerm program to connect us to HP-UX 10.x server from windows workstations, but in some cases the user doesn't logout and close it by window's x button. The problem is that in HP-UX the user and all his tasks remain active and when he enter again HP-UX creates a... (12 Replies)
Discussion started by: efrenba
12 Replies

3. AIX

Script allows user to kill other users: I'd like to know HOW...

Hello list, Have a problem that's highlighting gaps in my knowledge; can you assist? We have a script that's tacked onto our trading application which allows branch managers etc. to kill off the sessions of other users at their branch. A menu option in the application spawns a shell running... (8 Replies)
Discussion started by: alexop
8 Replies

4. Shell Programming and Scripting

kill crashed out users

Hi all, We have a problem where we get a fair few users either exiting incorrectly or crashing. I'm trying to get a script together that runs every hour to kill these processes off. We are running Sco OperServer(TM) Release 5 The command we use to get a list of users who have crashed: ps... (2 Replies)
Discussion started by: tez
2 Replies

5. Shell Programming and Scripting

How to find users in a network

How to find users in a network? I used who. But i want to to find users using cox internet to connect to a server. PLease help (1 Reply)
Discussion started by: subbarao83
1 Replies

6. HP-UX

Is there a script available to kill Idle users

My max user parm is set to 1050. I'm currently at 1038 this is causing major slow downs on the server. I looking for a way log off "idle" user logins with out having to do it individually. :confused: (5 Replies)
Discussion started by: rfmurphy_6
5 Replies

7. Shell Programming and Scripting

Kill users

Someone knows how do I kill a login user only with the login_name? This moment I kill the user using the following command. E4500:/mg98/samuel$ whodo samuel Tue Sep 14 08:32:10 EST 2004 sun pts/234 samuel 7:30 pts/234 24200 0:00 ksh pts/234 26724 0:00 whodo... (3 Replies)
Discussion started by: samuel
3 Replies

8. Shell Programming and Scripting

users on a network

this script checks every 10 sec if one or more users are logged on. the script reports when all the users ( in a specific group) are log on togather, and then stops. first i want to know if it works?? second how to make it better? * the script is in tcsh. #!/bin/tcsh if (!$#argv) then... (1 Reply)
Discussion started by: jaber87
1 Replies

9. Shell Programming and Scripting

kill process of other users

Hi, Can I kill process submitted by another uesr (say user1) if I'm not the su. If I got some previledges granted from user1, can I kill user1's process? Please advise? Thank you very much! Regards, Tse (4 Replies)
Discussion started by: tsesukfan
4 Replies

10. Shell Programming and Scripting

Script to kill stranded/orphan process by users.

I have customers on our AIX/UNIX node startup a process that becomes stranded or orphaned and must be killed. I would like to create a script to check for these orphan processes and kill them. I can have cron run this job. The customers process will run and after 24 hours time out leaving an... (4 Replies)
Discussion started by: rjohnson
4 Replies
Login or Register to Ask a Question