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.
- 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.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot