查看限制
使用 cat /proc/$RABBITMQ_BEAM_PROCESS_PID/limits 可以看到限制
代码语言:javascript复制[root@h102 rabbitmq]# ps faux | grep rabbit
root 4627 0.0 0.0 103256 828 pts/0 S 22:08 0:00 _ grep rabbit
rabbitmq 2995 0.0 0.0 10828 476 ? S 21:55 0:00 /usr/lib64/erlang/erts-5.8.5/bin/epmd -daemon
root 4251 0.0 0.0 106364 1092 pts/0 S 22:07 0:00 /bin/sh /etc/init.d/rabbitmq-server start
root 4255 0.0 0.0 106096 1176 pts/0 S 22:07 0:00 _ /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/rabbitmq-server
root 4259 0.0 0.0 106096 1248 pts/0 S 22:07 0:00 _ /bin/sh /usr/sbin/rabbitmq-server
root 4276 0.0 0.1 163856 2172 pts/0 S 22:07 0:00 _ su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmq-server
rabbitmq 4280 0.0 0.0 106100 1336 ? Ss 22:07 0:00 _ /bin/sh -e /usr/lib/rabbitmq/bin/rabbitmq-server
rabbitmq 4384 2.5 1.7 1087528 33464 ? Sl 22:07 0:01 _ /usr/lib64/erlang/erts-5.8.5/bin/beam.smp -W w -A 64 -P 1048576 -K true -B i -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.6/sbin/../ebin -noshell -noinput -s rabbit boot -sname rabbit@h102 -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@h102.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@h102-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.6/sbin/../plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@h102-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@h102" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672
rabbitmq 4470 0.0 0.0 10792 508 ? Ss 22:07 0:00 _ inet_gethost 4
rabbitmq 4471 0.0 0.0 12896 644 ? S 22:07 0:00 _ inet_gethost 4
[root@h102 rabbitmq]# cat /proc/2995/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 10485760 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 1024 14779 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 14779 14779 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
[root@h102 rabbitmq]#