Help Center> MapReduce Service> FAQs> MRS Overview> Can Sudo Logs of Nodes in an MRS Cluster Be Cleared?
Updated on 2023-10-19 GMT+08:00

Can Sudo Logs of Nodes in an MRS Cluster Be Cleared?

Question:

Can Sudo Logs of Nodes in an MRS Cluster Be Cleared?

Answer:

The sudo log file on the nodes in the MRS cluster records the operations performed by user omm to facilitate fault locating. You can clear the file as you need.

You can delete the logs in earlier days to release storage space.

  1. If the log file is large, add the log file directory to /etc/logrotate.d/syslog to enable periodical deletion.

    Run sed -i '3 a/var/log/sudo/sudo.log' /etc/logrotate.d/syslog.

  2. Set the maximum number and size of logs in /etc/logrotate.d/syslog. If the threshold is exceeded, the logs will be automatically deleted. By default, logs are aged based on the size and number of archived logs. You can use size and rotate to limit the size and number of archived logs, respectively. If required, you can also add daily/weekly/monthly to specify how often the logs are cleared.

MRS Overview FAQs

more