免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 18344 | 回复: 4
打印 上一主题 下一主题

[求助] 配置文件里中括号里面的索引序号应该写多少 [复制链接]

论坛徽章:
2
技术图书徽章
日期:2013-11-15 00:23:25双鱼座
日期:2013-11-25 13:13:29
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-12-02 09:49 |只看该作者 |倒序浏览
有个工程师告诉我配置这个文件:
NOTE:  The changes will last until the next reboot.  For permanent changes,
edit /etc/rc.config.d/nddconf:

     TRANSPORT_NAME[X]=ip
     NDD_NAME[X]=ip_ire_gw_probe
     NDD_VALUE[X]=0

Replace the X in the brackets with the appropriate index, e.g. [0].

最后一句的意思就是 “括号中的X替换为相应的指数,例如[0]。”

请问我的这个配置文档中,我想加入上述工程师说的参数的话,X应该是几呢? 0?5?

请看我的这个配置文件内容
  1. [/]#more /etc/rc.config.d/nddconf
  2. # nddconf:  network tunable parameters for Streams TCP/IP
  3. #
  4. # @(#)B.11.31_LR $Revision: 1.1.119.4 $ $Date: 97/04/23 15:18:44 $
  5. #
  6. # Network tunable parameters read in by the networking startup script -
  7. # /sbin/init.d/net or by executing "ndd -c".
  8. #
  9. # TRANSPORT_NAME:     Name of transport component, valid names are:
  10. #                     ip, tcp, udp, rawip, and arp.
  11. #
  12. # NDD_NAME:           Name of ndd tunable parameter
  13. #
  14. # NDD_VALUE:          Value for ndd tunable parameter
  15. #
  16. # Note: Set all clock time values in milliseconds.  For example,
  17. #        240000 = 4 minutes
  18. #
  19. # Note: The ndd tunable parameters specified in this file must be writable.
  20. #       "ndd -c" can only handle the write operation.
  21. #
  22. # For each additional tunable parameter, add a set of variable assignments
  23. # like the ones below, changing the index to "[0]", "[1]" et cetera.
  24. # Index must be starting from 0 and they must be in sequential order.
  25. # Missing index values inside the array range is not supported.   
  26. #
  27. #
  28. # Example 1: Change the interval for sending the first keepalive probes
  29. #            for idle TCP connection to one hour
  30. # TRANSPORT_NAME[0]=tcp
  31. # NDD_NAME[0]=tcp_keepalive_interval
  32. # NDD_VALUE[0]=3600000
  33. #
  34. #
  35. # Example 2:  Change the interval for sending keepalive probes to 1 minute
  36. #             when TCP is detached. (e.g.FIN_WAIT_2)
  37. # TRANSPORT_NAME[1]=tcp
  38. # NDD_NAME[1]=tcp_keepalive_detached_interval
  39. # NDD_VALUE[1]=60000
  40. #
  41. #
  42. # Example 3:  Change the amount of time TCP endpoints persist in TIME_WAIT
  43. #             state to 30 seconds.  
  44. # TRANSPORT_NAME[2]=tcp
  45. # NDD_NAME[2]=tcp_time_wait_interval
  46. # NDD_VALUE[2]=30000
  47. #
  48. # Example 4:  Change the UDP default ttl parameter to 128
  49. # TRANSPORT_NAME[3]=udp
  50. # NDD_NAME[3]=udp_def_ttl
  51. # NDD_VALUE[3]=128
  52. #
  53. # Example 5: Change the amount of time that ARP entries can stay in
  54. #            ARP cache to 10 minutes.
  55. #
  56. # TRANSPORT_NAME[4]=arp
  57. # NDD_NAME[4]=arp_cleanup_interval
  58. # NDD_VALUE[4]=600000
  59. #
复制代码

论坛徽章:
48
15-16赛季CBA联赛之青岛
日期:2021-01-07 13:41:2315-16赛季CBA联赛之上海
日期:2020-12-01 18:02:0720周年集字徽章-20	
日期:2020-10-28 14:14:2620周年集字徽章-20	
日期:2020-10-28 14:04:3015-16赛季CBA联赛之天津
日期:2020-10-18 22:51:412016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2015-12-22 13:30:48操作系统版块每日发帖之星
日期:2015-12-07 06:20:00操作系统版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-08-05 18:46:082015年亚洲杯之巴勒斯坦
日期:2015-04-19 10:42:502015年亚洲杯之巴林
日期:2015-04-09 08:03:23
2 [报告]
发表于 2013-12-02 10:56 |只看该作者
按顺序下来,如果之前没有配过的话,先用0;如果有0和1了,则用2。

论坛徽章:
2
技术图书徽章
日期:2013-11-15 00:23:25双鱼座
日期:2013-11-25 13:13:29
3 [报告]
发表于 2013-12-02 12:57 |只看该作者
回复 2# lbseraph


    我想问 之前不是有0到4嘛 但是都被#注释了  那我想加入一个新的 是用0还是5?

论坛徽章:
48
15-16赛季CBA联赛之青岛
日期:2021-01-07 13:41:2315-16赛季CBA联赛之上海
日期:2020-12-01 18:02:0720周年集字徽章-20	
日期:2020-10-28 14:14:2620周年集字徽章-20	
日期:2020-10-28 14:04:3015-16赛季CBA联赛之天津
日期:2020-10-18 22:51:412016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2015-12-22 13:30:48操作系统版块每日发帖之星
日期:2015-12-07 06:20:00操作系统版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-08-05 18:46:082015年亚洲杯之巴勒斯坦
日期:2015-04-19 10:42:502015年亚洲杯之巴林
日期:2015-04-09 08:03:23
4 [报告]
发表于 2013-12-02 19:31 |只看该作者
注释掉的那些都是例子而已~一切从0开始~:wink:

论坛徽章:
2
技术图书徽章
日期:2013-11-15 00:23:25双鱼座
日期:2013-11-25 13:13:29
5 [报告]
发表于 2013-12-03 09:18 |只看该作者
回复 4# lbseraph


    谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP