1827442 Members
5380 Online
109965 Solutions
New Discussion

Script

 
Elizangela_1
Frequent Advisor

Script

After install patches at l2000, my scripts not functional correctly. Why?

This script kill more than one connection from the users and now the conecctions are queued.

Why?

Elizangela
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Script

What version of HP-UX? What patches were installed? What exactly does your script do? What connections are queued? How do the user connect to the system?

I can't say why without a bit more information.
Elizangela_1
Frequent Advisor

Re: Script

HP-UX version 11.00

Patches: Quality Pack and HW Enable

The script:

echo "Entre com a Opcao Desejada : \c"
read opcao

if [ $opcao -eq 5 2>/dev/null ]
then
cls
kill -9 0;
elif
[ $opcao -eq 2 2>/dev/null ]
then
cd /oracle/systur;
runmenu50 -c ansiu:utd $LOGNAME/demo GER_1210
elif
[ $opcao -eq 4 2>/dev/null ]
then
cd /oracle/systur;
runmenu50 -c ansiu:utd $LOGNAME/demo GER_1600
elif
[ $opcao -eq 1 2>/dev/null ]
then
cd /oracle/systur;
runmenu50 -c ansiu:utd $LOGNAME/demo GER_1200
elif
[ $opcao -eq 3 2>/dev/null ]
then
cd /oracle/systur;
runmenu50 -c ansiu:utd $LOGNAME/demo GER_1220
fi

if [ a$opcao = a ]
then
cls
fi

done


The users connect by telnet
Pete Randall
Outstanding Contributor

Re: Script

I'm probably misunderstanding, but:

Kill -9 0 ??????? Swapper ??????? My Spanish isn't all that great, but I find it hard to imagine a circumstance where you would want to kill off swapper.


Pete

Pete
Ralph Grothe
Honored Contributor

Re: Script

She seems to be from Brazil,
so the script probably speaks Portugese.
Maybe they have a different Proc mapping overthere, or she is kidding?
Madness, thy name is system administration
Laurent Menase
Honored Contributor

Re: Script

Pete, did you look at man kill recently?


= 0 All processes, except special system processes, whose process group ID is equal to the process group ID of the sender.


So Elizangela, it could means that:
the shell ( posix or ksh ?) changed the way it set the process group

So you should check the process group of you connections process to see if they should ne killed or not

To check that just do a
UNIX95= ps -j
just before the kill.
you can also try to test
set +m or set -m at the begining of the script
you can try to see if you are using posix shell, if the behaviour is the same with ksh.( and reverse)
set +m change the behaviour of how a shell manage its child, and if it run then in the same process group or an other.

Darren Prior
Honored Contributor

Re: Script

Hi Elizangela,

I'm not sure if you haven't shown us the whole script, but there should be a shell definition at the very top. ie #!/bin/sh

regards,

Darren.
Calm down. It's only ones and zeros...