1834255 Members
2057 Online
110066 Solutions
New Discussion

ndd command syntax

 
SOLVED
Go to solution
Shivkumar
Super Advisor

ndd command syntax

Hi,

What is the command to see all tuned tcp/ip parameters on the box ?

For example:-
[BigGuy:/home/sksonkar]$ ndd -get /dev/tcp tcp_conn_request_max

4096

The above command shows one value at a time.

Just wondering is there a command syntax which helps to view all the tcp/ip tuned parameters at one time.

Thanks,
Shiv
6 REPLIES 6
Michael Steele_2
Honored Contributor
Solution

Re: ndd command syntax

ndd -h

ndd -get /dev/ip (parameter)
ndd -set /dev/ip (parameter) value (0/1 - etc..)
Support Fatherhood - Stop Family Law
Mustafa Gulercan
Respected Contributor

Re: ndd command syntax

hi;
ndd -h supported

regards;
mustafa
James R. Ferguson
Acclaimed Contributor

Re: ndd command syntax

Hi Shiv:

You could do something like this:

ndd -get /dev/tcp ?|grep -v "^?" > /tmp/nddargs

while read ARG NULL
do
echo "${ARG} = \c";ndd -get /dev/tcp ${ARG}
done < /tmp/nddargs | more

Regards!

...JRF...
John Poff
Honored Contributor

Re: ndd command syntax

Hi,

There isn't an option to show the values of all the parameters at one time, but it would be a clever little hack to script it from the output of 'ndd -h'.

JP

Shivkumar
Super Advisor

Re: ndd command syntax

James,

Do i need to put below in a shell script and execute ?

----
ndd -get /dev/tcp ?|grep -v "^?" > /tmp/nddargs

while read ARG NULL
do
echo "${ARG} = \c";ndd -get /dev/tcp ${ARG}
done < /tmp/nddargs | more
-----

Thanks,
Shiv
James R. Ferguson
Acclaimed Contributor

Re: ndd command syntax

Hi Shiv:

Well, yes, it would be convenient to build this into a reusable script. A slightly better version is this:

# cat /tmp/ndd
#/usr/bin/sh
typeset FILE=/var/tmp/$$
ndd -get /dev/tcp ? | grep -v "^?" | cut -f1 -d"(" > ${FILE}
while read ARG NULL
do
echo "${ARG} = \c";
ndd -get /dev/tcp ${ARG}
done < ${FILE}
rm ${FILE}
exit 0

...call the script '/tmp/ndd' and do:

# /tmp/ndd | more

Regards!

...JRF...