Setting Parameter NDD Solaris 10

Posted on


ndd gets and sets selected configuration parameters in  some kernel  drivers. Currently, ndd  only supports the drivers that implement the TCP/IP Internet  protocol family. Each driver chooses which parameters to make visible using ndd.

Since these parameters are usually tightly  coupled to the implementation, they are likely to change from release to release. Some parameters may be read-only.

Untuk melakukan tunning menggunakan ndd ini bisa dilakukan langsung dari console, misalkan :

# ndd -get /dev/tcp tcp_time_wait_interval
60000

60000 adalah nilah default untuk settingan tcp_time_wait_interval

Coba kita lakukan modifikasi

# ndd -set /dev/tcp tcp_time_wait_interval 10000

Ketika kita cek kembali, nilainya sudah berubah sesuai dengan nilai yang kita berikan

# ndd -get /dev/tcp tcp_time_wait_interval
10000

Nah pertanyaannya adalah bagaimana membuatnya menjadi permanen, atau ketika kita restart parameter tersebut tetap pada nilai yang kita kehendaki (bukan nilai default).

Caranya simple, oldway adalah masukkan settingan berikut di /etc/system tapi memodifikasi /etc/system adalah hal yang riskan jika kita bukan expert, karena salah-salah system kita tidak mau booting, jadi cara yang saya ambil adalah sebagai berikut:

Buat file/script dibawah /etc/init.d (ex: nddconfig)

vi /etc/init.d/nddconfig

#!/bin/sh
ndd -set /dev/tcp tcp_time_wait_interval 10000
ndd -set /dev/tcp tcp_conn_req_max_q 128
ndd -set /dev/tcp tcp_conn_req_max_q0 1024
ndd -set /dev/tcp tcp_conn_req_min 1
ndd -set /dev/tcp tcp_conn_grace_period 0
ndd -set /dev/tcp tcp_cwnd_max 1048576
ndd -set /dev/tcp tcp_debug 0
ndd -set /dev/tcp tcp_smallest_nonpriv_port 1024
ndd -set /dev/tcp tcp_ip_abort_cinterval 180000
ndd -set /dev/tcp tcp_ip_abort_linterval 180000
ndd -set /dev/tcp tcp_ip_abort_interval 480000
ndd -set /dev/tcp tcp_ip_notify_cinterval 10000
ndd -set /dev/tcp tcp_ip_notify_interval 10000
ndd -set /dev/tcp tcp_ipv4_ttl 64
ndd -set /dev/tcp tcp_keepalive_interval 7200000
ndd -set /dev/tcp tcp_maxpsz_multiplier 10
ndd -set /dev/tcp tcp_mss_def_ipv4 536
ndd -set /dev/tcp tcp_mss_max_ipv4 65495
ndd -set /dev/tcp tcp_mss_min 108
ndd -set /dev/tcp tcp_naglim_def 4095
ndd -set /dev/tcp tcp_rexmit_interval_initial 3000
ndd -set /dev/tcp tcp_rexmit_interval_max 60000
ndd -set /dev/tcp tcp_rexmit_interval_min 400
ndd -set /dev/tcp tcp_deferred_ack_interval 100
ndd -set /dev/tcp tcp_snd_lowat_fraction 0
ndd -set /dev/tcp tcp_sth_rcv_hiwat 0
ndd -set /dev/tcp tcp_dupack_fast_retransmit 3
ndd -set /dev/tcp tcp_ignore_path_mtu 0
ndd -set /dev/tcp tcp_smallest_anon_port 32768
ndd -set /dev/tcp tcp_largest_anon_port 65535
ndd -set /dev/tcp tcp_xmit_hiwat 49152
ndd -set /dev/tcp tcp_xmit_lowat 4096
ndd -set /dev/tcp tcp_recv_hiwat 49152
ndd -set /dev/tcp tcp_recv_hiwat_minmss 4
ndd -set /dev/tcp tcp_fin_wait_2_flush_interval 675000
ndd -set /dev/tcp tcp_co_min 64
ndd -set /dev/tcp tcp_max_buf 1048576
ndd -set /dev/tcp tcp_strong_iss 2
ndd -set /dev/tcp tcp_rtt_updates 20
ndd -set /dev/tcp tcp_wscale_always 1
ndd -set /dev/tcp tcp_tstamp_always 0
ndd -set /dev/tcp tcp_tstamp_if_wscale 1
ndd -set /dev/tcp tcp_rexmit_interval_extra 0
ndd -set /dev/tcp tcp_deferred_acks_max 2
ndd -set /dev/tcp tcp_slow_start_after_idle 4
ndd -set /dev/tcp tcp_slow_start_initial 4
ndd -set /dev/tcp tcp_co_timer_interval 20
ndd -set /dev/tcp tcp_sack_permitted 2
ndd -set /dev/tcp tcp_trace 0
ndd -set /dev/tcp tcp_compression_enabled 1
ndd -set /dev/tcp tcp_ipv6_hoplimit 60
ndd -set /dev/tcp tcp_mss_def_ipv6 1220
ndd -set /dev/tcp tcp_mss_max_ipv6 65475
ndd -set /dev/tcp tcp_rev_src_routes 0
ndd -set /dev/tcp tcp_local_dack_interval 50
ndd -set /dev/tcp tcp_ndd_get_info_interval 1000
ndd -set /dev/tcp tcp_local_dacks_max 8
ndd -set /dev/tcp tcp_ecn_permitted 1
ndd -set /dev/tcp tcp_rst_sent_rate_enabled 1
ndd -set /dev/tcp tcp_rst_sent_rate 40
ndd -set /dev/tcp tcp_push_timer_interval 50
ndd -set /dev/tcp tcp_use_smss_as_mss_opt 0
ndd -set /dev/tcp tcp_wroff_xtra 32
ndd -set /dev/tcp tcp_mdt_hdr_head_min 32
ndd -set /dev/tcp tcp_mdt_hdr_tail_min 32
ndd -set /dev/tcp tcp_mdt_max_pbufs 16

Simpan dan berikan permission secukupnya

chmod 755 /etc/init.d/nddconfig

Kemudian buar symlink agar script tersebut dijalankan setiap restart.

ln -s /etc/init.d/nddconfig /etc/rc2.d/S31nddconfig

Test dengan restart kemudian jalankan ndd -get parameter yang dikehendaki, jika hasilnya sesuai settingan kita berarti anda layak dapat bintang, jika tidak berhasil berarti kesalahan bukan pada tutorial ini melainkan pada layar komputer Anda😀.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s