Operating System - HP-UX
1827284 Members
3567 Online
109717 Solutions
New Discussion

Re: operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

Hallo

I am trying to eliminate a connection of a dead process showing up under netstat -a
and netstat -an | grep ip@
(however under netstat -a it is always hanging for a minute, the more reason I want to eliminate it)

I have convertrf the ip@ to Hexa likr this:
HEX=$(print 10.214.16.153.1519.10.214.9.195.1181 | awk -F "." '{printf "%02x%02x%02x%02x%04x%02x%02x%02x%02x%04x\n",$1,$2,$3,$
4,$5,$6,$7,$8,$9,$10}')


print $HEX=0ad6109905ef0ad609c3049d
right ?

However when I use ndd command
ndd -set /dev/tcp tcp_discon_by_addr 0ad6109905ef0ad609c3049d

it gives operation failed, Invalid argument:
What am I doing wrong with my argument
(assuming that is the hexa address)

Thanks
Look before you leap
4 REPLIES 4
Sanjay_6
Honored Contributor

Re: operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

Hi Frank,

Try this link from itrc for more help.

http://www6.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000078087807

The ITRC doc id is KBRC00001754.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

Hi,

Here is a doc from itrc cautioing the use of the parameter "tcp_discon_by_addr "

http://www6.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063007320

The itrc doc id is KBQA00000223

Hope this helps.

regds
Frank de Vries
Respected Contributor

Re: operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

It helps to have more info and stuff,
but I am stil back to square one.

I have legitimate reasons to use
the ndd -set /dev/tcp tcp_discon_by_addr value

However I fail to see how to exactly
interprete the value part of the command.

I use
ndd -set /dev/tcp tcp_discon_by_addr 0ad6109905ef0ad609c3049d
and the response I get is:
operation failed, Invalid argument

The 2 tcp-endpoint that I need to terminate
are:
tcp 0 0 10.214.16.153.1529 10.214.9.195.1181 ESTABLISHED

Anyone see the idiosyncrosie in my
finishing of the ndd command above ?

Look before you leap
Sanjay_6
Honored Contributor
Solution

Re: operation failed, Invalid argument on ndd -set /dev/tcp tcp_discon_by_addr

Hi,

You can try this to disconnect all the sessions from 10.214.9.195

To list all connections,

netstat -an |grep 10.214.9.195

ndd -get /dev/tcp tcp_status |grep 010.214.009.195

Now to kill all the connections from the command line, try this.

ndd -get /dev/tcp tcp_statis |grep 010.214.009.195 |awk '{print $1}` |while read ADD
>do
>ndd -set /dev/tcp tcp_discon 0x0$ADD
>done

Hope this helps.

regds