Operating System - HP-UX
1827456 Members
5420 Online
109965 Solutions
New Discussion

How to get values of all TCP parameters on HP-UX.

 
SOLVED
Go to solution
Gulam Mohiuddin
Regular Advisor

How to get values of all TCP parameters on HP-UX.

I know how to get the current values of single TCP parameters individually?

ndd -get /dev/tcp tcp_keepalive_interval

But how to get the values of all TCP parameters, instead of querying each individually.


Thanks,

Gulam.
Everyday Learning.
3 REPLIES 3
Henk Geurts
Esteemed Contributor
Solution

Re: How to get values of all TCP parameters on HP-UX.

hi Gulam
you might use this:
#for i in `ndd -get /dev/tcp ? |awk '{print $1}'`
do
echo $i;ndd -get /dev/tcp $i
done

regards
Henk
Ralph Grothe
Honored Contributor

Re: How to get values of all TCP parameters on HP-UX.

Not much different from Henk's solution, but anyway

for parm in $(ndd -h sup|awk '$1~/^tcp/{print$1}');do echo $parm:; ndd -get /dev/tcp $parm;done
Madness, thy name is system administration
rick jones
Honored Contributor

Re: How to get values of all TCP parameters on HP-UX.

I'd probably escape the '?' but then again, most of the time that isn't required.

Keep in mind that the ndd /dev/tcp ? route will give you four distinct sets of output:

*) output for supported tunables
*) output for unsupported tunables
*) output for even less than unsupported tunables (ones that aren't even listed in the unsupported list)
*) output that isn't a tunable

an example of the last one would be "tcp_status" which is rather like a cryptic netstat -an | grep tcp on steroids.

If you want information on ranges and defaults, for the supported tunables at least, instead of passing that list into another ndd -get /dev/tcp, you could pass it to an ndd -h command. For an unsupported tunable, that will return something like "Unknown tunable parameter"
there is no rest for the wicked yet the virtuous have no pillows