imposible to kill a tty


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users imposible to kill a tty
# 1  
Old 02-26-2009
imposible to kill a tty

Hello.

We have a hp-ux 11i server , when i run who -u the output command show to me a old session as:
Code:
xxx        pts/t0       Feb 12 13:53  old   13040  xx.xxx.xx.xx

when i try to kill with kill -9 13040 i receive this message
Code:
kill: 13040: The specified process does not exist

I've read on other forum of this web that probably we need to reboot the server.

Do we need to reboot the server really?¿?¿?

how i can kill this session.

Regards Rafael. (Sorry for my bad English)
# 2  
Old 02-26-2009
The process probably no longer exists. Why the entry still exists, I don't know. It's better to remove the entry from the wtmp file.

There's some non-standard utilities to just remove the wtmp entry. A while back, a user posted a Perl script to run on Solaris and which "trims" the wtmp file. Such a script can be modified for AIX to eliminate the bogus tty. https://www.unix.com/unix-dummies-que...wtmp-file.html
# 3  
Old 02-26-2009
imposible to kill a tty

Hi:

We have trimmed the wtmp and we have the same problem.



Regards and Thank you very much.
# 4  
Old 02-26-2009
You have the same problem? You mean it still shows up in who -u? That's because who -u probably uses the "utmp" file, which uses the same format, but holds summary information. Try trimming that.
# 5  
Old 02-26-2009
grep for "pts/t0". Theres probably a parent process for that tty hanging around.

Tom de
# 6  
Old 02-26-2009
Good solution

Thanks otheus and Tom de.


We have checked the /etc/utmp and after modify it the who command shows correct information.




Regards at all Thank you very much
(Rafael).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

3. Solaris

Cannot kill a process with kill -9

Hello everyone, I have a process that I want to kill. I have tried kill-9 PID but it doesn't work. I have tried preap PID but it doesn't work too. The parent of my process is the process whose PID is 1, so I can't kill it. My OS is a Solaris 9. Can anyone help me understand what's going... (3 Replies)
Discussion started by: adilyos
3 Replies

4. Linux

Kill a process without using kill command

I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies

5. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

6. UNIX for Advanced & Expert Users

Diff b/n kill and kill -9

Hi, I have a process with say pid x. What is the difference b/n kill x and kill -9 x in unix Thanks Ammu (2 Replies)
Discussion started by: ammu
2 Replies

7. Programming

kill(0,-9) don't kill the process

Hi all i have simple c program , when i wish to kill the app im using kill(0,-9) , but it seams this command don't do any thing and the program. just ignore it . what im doing wrong here ? im using HP-UX ia64 Thanks (9 Replies)
Discussion started by: umen
9 Replies

8. UNIX for Dummies Questions & Answers

not able to kill find with kill -9

Hello everyone I am using HP Ux and had run a find command. Now I am trying to kill it with kill or kill -9 but it is not getting killed and still running. Any clues ? Thanks Sidhu (5 Replies)
Discussion started by: Amardeep
5 Replies

9. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies

10. Shell Programming and Scripting

kill the tty

Hello Experts i'm having some trouble with a script. the purpose is to kill all processes from a distinct tty in a HP-UX machine, given the User TTY. it's to use like this: killtty pts/tnb pts/tr pts/tD here it is #!/usr/bin/ksh i=1 for i do || exit kill -9 `ps -ft "${i}" |... (9 Replies)
Discussion started by: vascobrito
9 Replies
Login or Register to Ask a Question