Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working on to set up log rotate for messages files, once they reach 10M . The requirement is compress will work on reaching the size of 10MB , without reaching for the daily cron to happen?
If there any option available other than a crontab triggering of the /etc/cron.daily/logrotate.
You don't have to run logrotate daily a'la the system daemon, you can run logrotate anytime you want.
What you are asking is precisely something I do on an embedded system, my main process runs logrotate every 5 minutes. The rules are constructed to prevent logs from growing too large because the system storage is small and cannot afford to have the space be used up if one particular log streams tons of errors, and therefore the "size" term matters mostly in that architecture.
You don't have to run logrotate daily a'la the system daemon, you can run logrotate anytime you want.
What you are asking is precisely something I do on an embedded system, my main process runs logrotate every 5 minutes
That is what I am looking for? The logrotate will be triggered to rotate the /var/log/messages , once it hits the size of 10M .As I do not have the facility to use cron , I am looking for other options .
You don't have to run logrotate daily a'la the system daemon, you can run logrotate anytime you want.
What you are asking is precisely something I do on an embedded system, my main process runs logrotate every 5 minutes
That is what I am looking for? The logrotate will be triggered to rotate the /var/log/messages , once it hits the size of 10M .As I do not have the facility to use cron , I am looking for other options .
It is one of many possible solutions. I will say that it would probably involve writing a script and establishing a service or daemon to manage it. If that doesn't fit with your parameters, then it does not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.