1838240 Members
3380 Online
110125 Solutions
New Discussion

Re: Blocked Shell

 
Fernando Jose P de Souz
Regular Advisor

Blocked Shell

I have a problem with my server (rp3410 - hp-ux 11.11)
Database: IBM Informix Dynamic Server Version 7.31.FD8

when i execute # w
katiane pts/23 7:45am 9 -
marcelo pts/22 7:45am 9 -ksh

When i execute # ps -ef
the " - " don't appear

and i can't kill the process, and the user can't connect again, because have a script that a user can connect only one time.

How can i find and kill the process " - " ???

Fernando.

5 REPLIES 5
Pedro Cirne
Esteemed Contributor

Re: Blocked Shell

Hi Fernando,

I don't know if I understood your problem, but try at the shell prompt:

who -u

It will show you usernames with their sh PID, the you just have to:

kill PID of the process ID of the user login.

Enjoy :

Pedro
Borislav Perkov
Respected Contributor

Re: Blocked Shell

Hi,
Try to execute
#ps -ef | grep "pts/23"
and you can see the process number on pts/23 and you can kill it.

Regards,
Borislav

Don't forget to assign points.
RAC_1
Honored Contributor

Re: Blocked Shell

-ksh is a login shell.
just ksh may be a shell started from login shell by a user.
ps -ef | grep [-]ksh

Should give you all details. Also you can look at login shells pid as follows.

who -Hu
Look at PID column.
There is no substitute to HARDWORK
Steve Steel
Honored Contributor

Re: Blocked Shell

Hi

w;w|tail -n +3|while read a b c
do
ps -t $b
done


Works

w;w|tail -n +3|while read a b c^Jdo^Jps -t $b^Jdone
5:05pm up 69 days, 15:40, 8 users, load average: 0.09, 0.09, 0.11
User tty login@ idle JCPU PCPU what
root console 10:30am 25:38 rlogin cpt-hook
root pts/ta 12:47pm 7:41 -sh
root pts/0 8:43am w
root pts/tb 3:08pm 3 5 5 ftp ruby
root pts/1 3:20pm 1:45 -sh
root pts/2 11:28am341:35 1715:38 1715:38 ignite
chrishu pts/3 11:48am 31:53 -sh
bergmans pts/te 6:01pm148:48 ksh -o emacs
PID TTY TIME COMMAND
16314 console 0:00 sh
23061 console 0:00 rlogin
23062 console 0:00 rlogin
PID TTY TIME COMMAND
10101 pts/ta 0:00 sh
10100 pts/ta 0:00 telnetd
PID TTY TIME COMMAND
8719 pts/0 0:00 rlogind
16879 pts/0 0:00 ps
8721 pts/0 0:00 sh
PID TTY TIME COMMAND
10999 pts/tb 0:00 sh
16824 pts/tb 0:05 ftp
10998 pts/tb 0:00 telnetd
PID TTY TIME COMMAND
12537 pts/1 0:00 sh
12535 pts/1 0:00 rlogind
PID TTY TIME COMMAND
25442 pts/2 1715:38 ignite.10
25410 pts/2 0:00 sh
25439 pts/2 0:00 ignite.10
25408 pts/2 0:00 rlogind
PID TTY TIME COMMAND
6738 pts/3 0:00 rlogind
6740 pts/3 0:00 sh
6761 pts/3 0:00 sh
PID TTY TIME COMMAND
380 pts/te 0:00 sh
379 pts/te 0:00 telnetd
463 pts/te 0:00 sh
488 pts/te 0:00 ksh


There you see it all

use ps -ft is even better

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Bill Hassell
Honored Contributor

Re: Blocked Shell

The - is just a special flag to indicate that this particular process is a login shell--the one that was started when the user marcelo logged in. To see exactly what macelo is doing, ask for the processes that are owned by marcelo:

ps -fu marcelo


Bill Hassell, sysadmin