之后的状态
代码语言:javascript复制[root@h102 ~]# ll /var/log/rabbitmq/
total 24
-rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 23 17:20 rabbit@h102.log
-rw-r--r-- 1 rabbitmq rabbitmq 15882 Oct 23 17:20 rabbit@h102.log.1
-rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 23 17:20 rabbit@h102-sasl.log
-rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 23 17:20 rabbit@h102-sasl.log.1
-rw-r--r-- 1 root root 0 Oct 21 22:18 shutdown_err
-rw-r--r-- 1 root root 42 Oct 21 22:18 shutdown_log
-rw-r--r-- 1 root root 0 Oct 23 16:37 startup_err
-rw-r--r-- 1 root root 2040 Oct 23 17:11 startup_log
[root@h102 ~]#
发现原来的日志已经加上了 .1 的后缀
Instruct the RabbitMQ node to rotate the log files.
命令汇总
yum install erlang.x86_64
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm
rpm -ivh rabbitmq-server-3.5.6-1.noarch.rpm
/etc/init.d/rabbitmq-server start
/etc/init.d/rabbitmq-server stop
/etc/init.d/rabbitmq-server status
cat /proc/2995/limits
netstat -an | grep -E "(4369|25672|5672|5671|15672|61613|61614|1883|8883)"
rabbitmqctl stop
rabbitmqctl stop_app
rabbitmqctl status
rabbitmqctl start_app
rabbitmqctl reset
rabbitmqctl force_reset
rabbitmqctl rotate_logs .1
ll /var/log/rabbitmq/
原文地址