Where is rotation policy of logs under /var/log/messages-*

log-fileslog-rotationlogginglogrotate

I would like to know how messages log file /var/log/messages are rotated.

I checked in /etc/logrotate.conf file and inside /etc/logrotate.d/ directory but nothing that could explain the rotation.

Eg: This is a small part of messages file:

Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added datanode[tcp-2:tcp]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added JobHistoryServer[tcp-0:tcp]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added JobHistoryServer[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added JobHistoryServer[http-2:http]-2> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added journalnode[tcp-1:tcp]-1> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added mesos-slave[http-0:http]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added DFSZKFailoverController[tcp-0:tcp]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added DFSZKFailoverController[tcp-0:tcp]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added NodeManager[tcp-0:tcp]-0> to health table
Oct 23 04:03:29 node2 grootd: DEBUG [groot.core.healthcheck.reactor] - added NodeManager[tcp-0:tcp]-0> to health table

Best Answer

Just type
sudo grep messages /etc/logrotate.d/*

On my system this returns
/etc/logrotate.d/rsyslog:/var/log/messages

Related Topic