本文详细说明了 rabbitmq 服务程序启动时配置参数的含义。

[root@Betty mnt]# ps aux|grep rabbit
root      3588  0.3  0.9 133420 37812 ?        Sl   09:35   0:11 /usr/local/lib/erlang/erts-5.9.2/bin/beam.smp -W w -K true -A30 -P 1048576 -- -root /usr/local/lib/erlang -progname erl -- -home /root -- -pa /usr/local/sbin/../ebin -noshell -noinput -s rabbit boot -sname rabbit@Betty -boot start_sasl -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/var/log/rabbitmq/rabbit@Betty.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@Betty-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/local/sbin/../plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@Betty-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@Betty" -noshell -noinput
     我们通常使用 erl <arguments> 命令启动 Erlang 的运行时系统,其中  arguments 就是我们启动时指定的各种参数。其类型如下:

+    emulator flag            there are a small number of "-" flags which now actually are emulator flags
-    flag    {init flag, user flag}  init process interprets init flags, and stores user flags.    
--   plain argument          init process plain argument, -extra causes everything that follows to become plain arguments
可以在 Erlang shell 或者 code 中通过如下调用获取相应的值:

init:get_argument/1                -- 获取指定 user flag 或者系统自定义 flag 的值
init:get_arguments/0              -- 获取所有 user flag 和系统自定义 flag 的值
init:get_plain_arguments/0     -- 获取所有 plain argument 的值
     下面将上面的启动参数进行分解说明:

/usr/local/lib/erlang/erts-5.9.2/bin/beam.smp

-W w

==========
+W w | i
Sets the mapping of warning messages for error_logger.
Messages sent to the error logger using one of the warning routines can be mapped either to errors (default), warnings (+W w), or info reports (+W i). The current mapping can be retrieved using error_logger:warning_map/0. See error_logger(3) for further information.
==========
-K true

==========
+K true | false
Enables or disables the kernel poll functionality if the emulator supports it. Default is false (disabled). If the emulator does not support kernel poll, and the +K flag is passed to the emulator, a warning is issued at startup.
==========
-A30

==========
+A size
Sets the number of threads in async thread pool, valid range is 0-1024. Default is 0.
==========
-P 1048576

==========
+P Number
Sets the maximum number of concurrent processes for this system. Number must be in the range 16..134217727.
Default is 32768.
==========
--

==========
--(init flag)
Everything following -- up to the next flag (-flag or +flag) is considered plain arguments and can be retrieved using init:get_plain_arguments/0.
==========

-root /usr/local/lib/erlang  
-progname erl

--  
-home /root  
--

-pa /usr/local/sbin/../ebin

==========
-pa Dir1 Dir2 ...
Adds the specified directories to the beginning of the code path, similar to code:add_pathsa/1. See code(3).
As an alternative to -pa, if several directories are to be prepended to the code and the directories have a common parent directory, that parent directory could be specified in the ERL_LIBS environment variable. See code(3).
-pz Dir1 Dir2 ...
Adds the specified directories to the end of the code path, similar to code:add_pathsz/1. See code(3).
==========
-noshell
-noinput

==========
-noinput
Ensures that the Erlang runtime system never tries to read any input. Implies -noshell.
-noshell
Starts an Erlang runtime system with no shell. This flag makes it possible to have the Erlang runtime system as a component in a series of UNIX pipes.
==========
-s rabbit boot

==========
-s Mod [Func [Arg1, Arg2, ...]](init flag)
Makes init call the specified function. Func defaults to start. If no arguments are provided, the function is assumed to be of arity 0. Otherwise it is assumed to be of arity 1, taking the list [Arg1,Arg2,...] as argument. All arguments are passed as atoms. See init(3).
==========
-sname rabbit @Betty -boot start_sasl

==========
-sname Name
Makes the Erlang runtime system into a distributed node, similar to -name, but the host name portion of the node name Name@Host will be the short name, not fully qualified.
This is sometimes the only way to run distributed Erlang if the DNS (Domain Name System) is not running. There can be no communication between nodes running with the -sname flag and those running with the -name flag, as node names must be unique in distributed Erlang systems.
==========

-kernel inet_default_connect_options [{nodelay,true}]  
-sasl errlog_type error  
-sasl sasl_error_logger false  
-rabbit error_logger {file,"/var/log/rabbitmq/rabbit@Betty.log"}  
-rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@Betty-sasl.log"}  
-rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins"  
-rabbit plugins_dir "/usr/local/sbin/../plugins"  
-rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@Betty-plugins-expand"  
-os_mon start_cpu_sup false  
-os_mon start_disksup false  
-os_mon start_memsup false  
-mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@Betty"

==========
-Application Par Val
Sets the application configuration parameter Par to the value Val for the application Application, see app(4)
and application(3).
==========
-noshell
-noinput

注:
上面参数中的 emulator flag 均使用的 - 号作为前缀,其在erts-5.9.2中的说明如下:

It can be noted that there are a small number of "-" flags which now actually are emulator flags
      上面未进行解释说明的 -root /usr/local/lib/erlang 、-progname erl 和 -home /root 均为 user flag 。这些参数为运行时系统自动定义的。其中

root         The installation directory of Erlang/OTP, $ROOT.
progname     The name of the program which started Erlang.
home         The home directory.
上面多处出现 -- 但其后并未指定任何 plain argument 。

转载于:https://blog.51cto.com/haibo600/1643706

RabbitMQ启动参数具体含义相关推荐

  1. 【原创】RabbitMQ启动参数具体含义

    2019独角兽企业重金招聘Python工程师标准>>> 本文详细说明了 rabbitmq 服务程序启动时配置参数的含义. [root@Betty mnt]# ps aux|grep ...

  2. java程序启动参数-D含义详解

    D<name>=<value>  :  set a system property  设置系统属性. 官方解释: Set a system property value. If ...

  3. PHP性能调优---php-fpm - 启动参数及重要配置详解

    一,php-fpm的启动参数   #测试php-fpm配置 /usr/local/php/sbin/php-fpm -t /usr/local/php/sbin/php-fpm -c /usr/loc ...

  4. php-fpm 启动参数及重要配置详解

    2019独角兽企业重金招聘Python工程师标准>>> php-fpm 启动参数及重要配置详解 约定几个目录 /usr/local/php/sbin/php-fpm /usr/loc ...

  5. SpringBoot笔记:SpringBoot启动参数配置

    文章目录 目的 测试代码 配置文件配置 获取自定义参数 项目打包发布 修改启动配置 方式一:系统变量 方式二:命令行参数 springboot启动参数解释 目的 1.熟悉springboot多环境配置 ...

  6. 多线程之线程池-各个参数的含义- 阿里,美团,京东面试题目

    阿里的面试官问了个问题,如果corepollSize=10,MaxPollSize=20,如果来了25个线程 怎么办, 答案: 当一个任务通过execute(Runnable)方法欲添加到线程池时: ...

  7. Java启动参数与内存调优一些学习笔记

    转载自  Java启动参数与内存调优一些学习笔记 .参数的含义 -Xms128m JVM初始分配的堆内存 -Xmx512m JVM最大允许分配的堆内存,按需分配 -XX:PermSize=64M JV ...

  8. eclipse.ini配置eclipse的启动参数

    Eclipse的启动由$ECLIPSE_HOME/eclipse.ini控制,如果$ECLIPSE_HOME 没有被定义,则Eclipse安装目录下的默认eclipse.ini会生效. eclipse ...

  9. mysql启动参数(/etc/my.cnf)详解汇总

    mysql启动参数(/etc/my.cnf)详解汇总 MYSQL–my.cnf配置中文详解 basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = ...

最新文章

  1. AI 热潮之下,初创企业能否躲过科技巨头的碾压?
  2. 灯光插件_Light Kit Pro 3灯光插件
  3. OpenCV学习记录(一):使用haar分类器进行人脸识别
  4. java求职_Java 求职怎么积累知识才可以找到工作
  5. 7-84 点赞狂魔 (25 分)
  6. 爬虫新宠requests_html 带你甄别2019虚假大学 #华为云·寻找黑马程序员#
  7. SQL server USE GO语句学习总结
  8. Yii2 使用 faker 生成假数据(转)
  9. Python面向对象中的多态与静态语言(C++,Java)的区别
  10. Android图片加载那些事(一)-实现加载手机中的所有图片
  11. 【暗恋不可耻但无用】QQ空间爬虫-Java版(jzone-crawler)
  12. JAVA简单聊天室的实现
  13. BT656协议讲解与解码
  14. 关于时间轴发展历程等PPT模板展现方式的探讨
  15. 【黄啊码】微信小程序弹窗图片滚动
  16. 中病毒了文件夹变exe文件找到方法
  17. time datetime 总结
  18. elementUI之表格排序失效,表格宽度可拖拽变宽变窄
  19. 处理数据库镜像问题的一个案例——数据库主体与镜像断开连接
  20. 利用fiddler和低版本的iTunes实现iOS抓包

热门文章

  1. 活动目录管理之五种常见错误操作
  2. Java读写文件,中文乱码解决
  3. python的print换行
  4. 在ActionBar显示ShareActionProvider分享文本,点击可以打开进行分享(19)
  5. [笔记].如何使用Nios II的中断:PIO中断与定时器中断
  6. 对于一些手机内存概念的思考、深入理解java的finalize,对于内存优化的小总结...
  7. db2中的几个转义字符
  8. hihocoder 1490 Tree Restoration
  9. shllter自动和手动实例
  10. 在linux上面合并多个windows文件乱码的问题